GhostMCP

by mq1n

Not rated
GitHub

About

Injectable MCP server for AI-driven reverse engineering inside processes

Details

Author
mq1n
Categories
Developer Tools

Setup

Install GhostMCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/mq1n/GhostMCP

Follow the installation instructions in the repository README, then restart your MCP client.

Talk to your binaries.Point the AI at a process and let him cook.

Ghost-MCP is an injectable MCP (Model Context Protocol) server for vibe reverse engineering assistant on Windows. It combines memory inspection, disassembly, debugging, and code injection into a single tool that any MCP-compatible AI client can use. Inject it into a target process and interact through natural conversation.

⚠️EXPERIMENTAL: This project is highly experimental and under development. APIs may change without notice, features may be incomplete or unstable, and documentation may not reflect the current state. Use at your own risk.

- "Find the health value in this game and freeze it at 100"
- "Show me all functions that reference this string"
- "Set a breakpoint on MessageBoxA and tell me when it gets called"
- "Disassemble the function at this address and explain what it does"
- "Find all pointers that lead to this address"

The AI handles the technical details. You just describe what you want.

Ghost-MCP uses a modular multi-server architecture to provide 250+ tools while staying under MCP client limits:

- Agent listens on13338; core server usesstdio, analysis/static on TCP
- scripts/launch-mcp.ps1starts one or all servers
- Destructive operations require safety tokens: callsafety_request_token, then includetoken_id

Everything you need to hunt down values and manipulate memory:

- Read/write memorywith automatic type conversion (integers, floats, strings, bytes)
- Region enumerationwith protection flags (readable, writable, executable)
- Pattern scanningwith AOB wildcards (48 8B ?? ?? 90)
- Pointer chain resolutionfor complex data structures

Advanced pattern matching for malware analysis and signature scanning:

- AOB scanningfor Array of Bytes with wildcard support
- String scanningfor ASCII, Unicode (UTF-16), and UTF-8 patterns
- Regex patternswith byte-level matching (requiresyarafeature)
- YARA integrationto load and run rules against memory
- Signature databasesto store, import, and export named patterns
- Named signaturesto organize patterns with tags and descriptions

Full process memory dumping with PE reconstruction:

- Full process dumpsto capture all committed memory regions
- Selective region dumpsfor specific address ranges
- Module dumpsto extract DLLs/EXEs with PE reconstruction
- Minidump creationin WinDbg-compatible format
- Incremental dumpsto track changes between snapshots
- Binary diffto compare dumps and find modifications
- Pattern searchwithin dumps using AOB patterns
- Annotationsto bookmark and label interesting locations
- PE reconstructionwith Scylla-style import table rebuilding
- Dump catalogto organize and manage multiple dumps

A full Cheat Engine-style scanner with session management:

- 12 scan modesincluding exact, changed, unchanged, increased, decreased, greater, less, between, unknown initial, fuzzy, and more
- Iterative scanningto refine results across multiple scans
- Smart filteringfor writable-only, executable, module-only, custom address ranges
- Fast scan modewith alignment-based skipping for 4x+ speedup
- Live progresswith real-time tracking and cancellation
- Export/Importto save results as JSON, CSV, or Cheat Engine XML

Find stable pointer paths to dynamic addresses:

- Multi-level scanningwith configurable depth (1-10 levels) to find pointer chains
- Static base filteringto only include module-relative pointers that survive restarts
- Offset constraintswith configurable max offset and alignment options
- Pointer rescanningto validate paths after process restart with stability scoring
- Stability scoringthat tracks pointer validity across rescans (0.0-1.0 score)
- Session comparisonto find common valid pointers between scan sets
- Pointer resolutionto follow chains and read values at resolved addresses
- Export/Importin JSON, CSV, or Cheat Engine pointer format (.ptr)
- Paginationfor large result sets with configurable limits
- Progress trackingwith real-time updates and cancellation support

- Disassemblyvia Capstone engine (disasm_at,disasm_function)
- Decompilationwith Hex-Rays style pseudo-C generation
- Module inspectionto list all DLLs, their exports and imports
- Symbol resolutionvia PDB loading with DbgHelp and full stack walking support
- Cross-referencesto find all CALL/JMP/LEA references to any address
- String extractionto pull ASCII/Unicode strings from any module

Full in-process debugging without an external debugger:

- Software breakpointsusing INT3 injection with automatic byte restoration
- Hardware breakpointsvia DR0-DR3 debug registers (4 slots)
- Single steppingwith trap flag based instruction-by-instruction execution
- Thread controlto list, suspend, resume any thread
- Register accessto read/write all x64 registers (RAX-R15, RIP, RFLAGS)
- Stack walkingfor full call stack with symbol resolution

Run arbitrary code inside the target process:

- Assemblerfor x86/x64 text-to-bytes assembly using iced-x86 (pure Rust, actively maintained)

- Supports common instructions: MOV, ADD, SUB, XOR, PUSH, POP, CALL, JMP, conditional jumps, etc.
- Multiple syntax options: newline or semicolon-separated instructions
- Hex immediates:0x1234or1234hformat
- Shellcode generation helpers for function calls (x64 Windows ABI)

- Direct call in current thread
- New thread (CreateThread, NtCreateThreadEx)
- APC injection
- Thread hijacking

- Process listingto enumerate running processes with filtering
- Process spawningto launch processes (normal or suspended)
- Attach/detachto connect to processes by name or PID
- Multiple launch modesincluding Normal, Suspended, Debug, Delayed, WaitForModule

- Process detailsincluding PID, path, architecture, thread/handle counts, PEB address
- PEB accessfor BeingDebugged flag, image base, loader data, OS version info
- Memory mapsshowing complete virtual memory layout with protection and region types
- Thread introspectionwith enumeration, TEB access, TLS slots, priority info
- Module detailswith base address, size, entry point, version info
- Window enumerationwith title, class, styles, hierarchy and filtering
- Token analysisfor user SID, privileges, elevation status, integrity level
- Privilege manipulationto enable/disable privileges like SeDebugPrivilege
- Environment accessto read environment variables and working directory

- Capability discoveryto list all available tools with categories
- Documentationto get detailed help and examples for any tool
- Health checksto verify agent connection and script engine status
- Version infofor server version and build information

Seamless integration for AI-assisted analysis:

- Command batchingto execute multi-step command sequences with conditions
- Command historyto query and replay previous commands
- Event subscriptionsfor breakpoint hits, exceptions, memory changes, hook triggers
- AI-friendly summarieswith context-aware summarization of operation results
- Diff reportingto compare states (memory, registers, modules) with structured diffs
- Error explanationswith natural language messages and suggested fixes
- Debug sessionsfor conversational debugging with findings, hypotheses, and next steps
- Breakpoint recommendationswith AI-driven suggestions for breakpoint locations
- Vulnerability analysisfor automated security pattern detection
- Pattern learningto save and recall code patterns, behaviors, and data structures

Comprehensive hooking toolkit for function interception:

- Inline hookswith trampoline-based detours (5/14-byte jumps), mid-function hooks, hot-patching, INT3 breakpoint hooks
- IAT/EAT hooksfor Import and Export Address Table hooking with enumeration
- VEH/PAGE_GUARD hooksfor hardware-less memory breakpoints via vectored exception handling
- Syscall hooksvia ntdll stub patching for syscall interception
- Shellcode generationfor position-independent code templates (call function, load library, etc.)
- Shellcode encodingwith XOR encoder and decoder stub generation
- ROP gadget finderto search loaded modules for return-oriented programming gadgets
- Hook managementwith enable/disable, chaining, and transactions for atomic multi-hook operations

API Call Tracing & Monitoring (Rohitab API Monitor-style)

Full Win32 API call tracing with argument decoding:

- Trace sessionsto create, start, stop, pause, resume tracing
- Event pipelinewith configurable ring buffer and backpressure strategies (drop oldest, block, sample)
- API packswith JSON-based definitions for kernel32, user32, ntdll, ws2_32, advapi32
- Server-side filteringto include/exclude by API name, module, thread, return value
- Pattern matchingwith prefix, suffix, contains, wildcard, and regex support
- Filter presetsincluding built-in presets (File Ops, Network, Registry, Errors Only) plus custom
- Statisticsfor per-API call counts, durations, success/failure rates
- Queue monitoringfor depth, drops, events per second

Extended monitoring capabilities for deep analysis:

- Dynamic API monitoringto track GetProcAddress/LdrGetProcedureAddress resolutions
- Process chillto freeze/resume threads for static analysis (all, specific, or filtered)
- COM object scanningto detect and enumerate COM interfaces with vtable analysis
- DLL monitoringto capture LoadLibrary/FreeLibrary events with call stacks
- Delayed importsto scan and monitor delayed DLL loads (__delayLoadHelper2)

API Override & Conditional Breakpoints

Full parameter and return value manipulation with conditional control:

- Conditional breakpointswith before/after call timing, argument/return conditions, thread ID filters
- Compound conditionsusing AND/OR/NOT logic, hit count triggers (Nth call, every Nth call)
- Parameter overrideto modify integers, booleans, pointers, strings (ANSI/Unicode), buffers, NULL injection
- Return value overridefor return code modification, HRESULT/NTSTATUS helpers, SetLastError control
- Pause mechanismfor thread coordination, configurable timeouts with auto-continue
- Audit trailwith full logging of all modifications, before/after values, export to JSON/CSV

Powerful instruction-level search capabilities:

- Instruction sequencesto find code patterns with wildcard mnemonics and operand matching
- Operand searchto find instructions by register type, immediate values, memory operands
- Immediate searchto locate values in code/data with range matching and alignment options
- String searchfor ASCII/UTF-16 pattern matching with case sensitivity control
- Cross-reference searchto find all code/data references to addresses
- Unified searchwith cursor pagination for large result sets

Comprehensive safety system to prevent accidents:

- Safety modeswith Educational (blocks dangerous ops), Standard (requires approval), Expert (minimal restrictions)
- Protected processeswith automatic detection and blocking for system processes (csrss, lsass, svchost, etc.)
- Rate limitingusing token bucket algorithm for global ops and write-specific throttling
- Size limitswith configurable limits for read/write/scan operations and warnings at 80% threshold
- Approval workflowrequiring explicit token-based approval for dangerous operations
- Patch historywith full undo capability viapatch_undotool
- Dry-run previewto preview patches before applying withpatch_preview
- Auto-backupfor automatic state backup and crash recovery

- LoadLibraryExWfor standard Windows injection
- Process attachmentby PID, name, or wait-for-process
- Launch modesincluding Normal, Suspended, Debug, Delayed, WaitForModule
- x86/x64 supportfor both 32-bit and 64-bit processes

Connect to your favorite reverse engineering tools:

- Radare2with full r2pipe integration (cross-platform)
- Ghidravia headless mode or JSON-RPC through ghidra-pipe
- IDA Provia idalib (requires IDA v9.x)
- Unified APIproviding a consistent interface across all backends

Ghost-MCP uses a modular multi-server architecture to stay under MCP's ~100 tool limit while providing 250+ tools:

┌─────────────────────────────────────────────────────────────────────────────┐ │ AI CLIENTS │ │ Claude Desktop │ Cursor │ Windsurf │ Custom │ └───────┬─────────────┬─────────────┬─────────────┬───────────────────────────┘ │ │ │ │ ▼ ▼ ▼ ▼ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ │ghost-core-mcp │ │ghost-analysis │ │ghost-static │ │ghost-extended │ │ Port 13340 │ │ Port 13341 │ │ Port 13342 │ │ Port 13343 │ │ 85 tools │ │ 82 tools │ │ 84 tools │ │ 85 tools │ │ Memory, Debug │ │ Scanner, Dump │ │ R2, IDA, AI │ │ Inject, Input │ └───────┬───────┘ └───────┬───────┘ └───────┬───────┘ └───────┬───────┘ │ │ │ │ └─────────────────┴─────────────────┴─────────────────┘ │ IPC (TCP localhost:13338) ▼ ┌─────────────────────────────────────────────────────────────────┐ │ LAYER 2: INJECTED AGENT │ │ ghost-agent.dll │ │ ┌──────────────────────────────────────────────────────────┐ │ │ │ ghost-core (static library) │ │ │ │ Memory │ Disasm │ Debug │ Hooks │ Scanner │ Exec │ │ │ └──────────────────────────────────────────────────────────┘ │ └───────────────────────────────┬─────────────────────────────────┘ │ Direct Access ▼ ┌─────────────────────────────────────────────────────────────────┐ │ TARGET PROCESS │ │ (game.exe, app.exe, etc.) │ └─────────────────────────────────────────────────────────────────┘

Each server includes 4 shared meta tools (mcp_capabilities,mcp_documentation,mcp_version,mcp_health) and stays under the 90-tool MCP limit.

- Safetybecause the agent is tiny and crash-resistant; heavy lifting happens in the host
- Flexibilitysince the same core works as injected DLL or standalone EXE
- AI-friendlywith structured JSON responses, pagination, clear error messages

Add to your Claude Desktop config (%APPDATA%\Claude\claude_desktop_config.json):

{ "mcpServers": { "ghost-core": { "command": "path/to/ghost-core-mcp.exe", "args": ["--transport", "stdio"] }, "ghost-analysis": { "command": "path/to/ghost-analysis-mcp.exe", "args": ["--port", "13341"] }, "ghost-static": { "command": "path/to/ghost-static-mcp.exe", "args": ["--port", "13342"] }, "ghost-extended": { "command": "path/to/ghost-extended-mcp.exe", "args": ["--port", "13343"] } } }

Start chatting with your favorite AI about your target process.

# Validate all server registries .\scripts\launch-mcp.ps1 -ValidateOnly # Or launch everything with one command .\scripts\launch-mcp.ps1 -Target game.exe
# Run all tests (370+ unit tests) cargo test --workspace # Build release binaries cargo build --release # Format and lint cargo fmt --all --check cargo clippy --workspace -- -D warnings

We use a multi-layered testing approach:

- Unit testsCore modules have comprehensive tests for memory ops, pattern matching, disassembly, hooks, IPC, and type conversions
- Integration teststests/integration/validates end-to-end flows: injection, memory R/W, pattern scans, breakpoints, hooks
- IPC fuzzingtests/integration/ipc_fuzzing.rsstress-tests the protocol with malformed/random messages
- CI pipelineGitHub Actions runs the full test suite on every push

# CLI testing examples ghost-client --stdio --host-binary ./target/release/ghost-host tools ghost-client --stdio --host-binary ./target/release/ghost-host call mcp_version ghost-client --stdio --host-binary ./target/release/ghost-host repl

- Safety Firstso we never crash the target process
- AI-Firstwith structured outputs, clear errors, pagination
- Modularwith clean separation between host, core, and agent
- Extensiblevia trait-based design for easy backend swapping

Ghost-MCP uses a capability-based security model with comprehensive safety guardrails:

Destructive operations requiresafety tokensfor authorization:
- Client requests token:safety_request_token(scope: "write", ttl_secs: 300)
- Agent validates client has required capability and issues token
- Client includestoken_idin subsequent write operations
- Token auto-expires or client releases it explicitly

Tokens have configurable TTL (max 24 hours) and are one-time use for maximum safety.

Dangerous operations require explicit confirmation in Standard mode. Usesafety_set_mode expertto disable approval requirements.

- Security Researchfor vulnerability analysis, exploit development, fuzzing
- Malware Analysisfor dynamic analysis, unpacking, anti-debug bypass
- Game Hackingfor value scanning, pointer resolution, trainers
- Software Testingfor fault injection, behavior modification, coverage analysis
- Learningto understand how programs work at the binary level

Ghost-MCP is a powerful tool that provides deep access to process internals. With that power comes responsibility.

- Educational purposesto learn reverse engineering and understand how software works at the binary level
- Security researchto analyze vulnerabilities in software you own or have explicit authorization to test
- Game moddingto modify single-player and offline games for personal enjoyment
- Software developmentto debug your own applications, test edge cases, analyze performance

- Online multiplayer cheating- do not use this tool to gain unfair advantages in online games
- Circumventing protections illegally- do not bypass DRM, licensing, or security measures on software you don't own
- Malicious activities- do not use for malware development, unauthorized access, or any illegal purposes
- Violating terms of service- respect the EULA and ToS of software you interact with

You are solely responsible for ensuring your use complies with applicable laws and regulations in your jurisdiction.
- Fork the repository
- Create a feature branch (git checkout -b feature/your-feature)
- Commit your changes (git commit -m 'Add your feature')
- Push to the branch (git push origin feature/your-feature)
- Open a Pull Request

Runcargo fmt --allandcargo clippy --workspace -- -D warningsbefore submitting.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Create crafted UI components inspired by the best 21st.dev design engineers.

Bring agent evaluations, observability, and synthetic test set generation directly into your IDE for free with Galileo's new MCP server

An MCP server to help AI assistants to answer questions and generate AccelByte Extend SDK code more effectively .

MCP server for AI Diagram Maker — generate beautiful software engineering diagrams directly inside Cursor, Claude Desktop, Claude Code, or any MCP-compatible AI agent

ALAPI MCP Tools,Call hundreds of API interfaces via MCP

AI-powered SVG animation generator that transforms static files into animated SVG components using the Allyson platform

MCP server that gives AI assistants on-demand access to 1,500+ amCharts docs, ~300 code examples, and 1000+ class API references.

APIMatic MCP Server is used to validate OpenAPI specifications using APIMatic. The server processes OpenAPI files and returns validation summaries by leveraging APIMatic’s API.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.