Skip to main content

ghidra_mcp/
lib.rs

1//! The agent-agnostic half of the Ghidra MCP stack.
2//!
3//! Everything here is shared by every agent's plugin: the MCP server and its 19
4//! tools, the worker lifecycle glue, the config contract, and the embedded
5//! `GhidraMcpWorker.java` and driver skill. An agent plugin contributes only a
6//! binary that calls [`cli::dispatch`], plus its own manifest and skills.
7
8pub mod cli;
9pub mod config;
10pub mod execute;
11pub mod logging;
12pub mod paths;
13pub mod poison;
14pub mod server;
15pub mod skill_asset;
16pub mod state;
17pub mod tools;
18pub mod worker_asset;
19
20use std::path::{Path, PathBuf};
21
22/// Extract the embedded worker script into `dir`. Returns the script path; IO
23/// failures (full disk, read-only temp dir) are returned, never panicked —
24/// the shipped `boot-smoke` path calls this on a real filesystem.
25pub fn worker_asset_extract(dir: &Path) -> std::io::Result<PathBuf> {
26    worker_asset::extract_worker(dir)
27}