mcp_server_pcileech
A simple MCP server for using pcileech to read or write another pc's memory
claude mcp add --transport stdio evan7198-mcp_server_pcileech python main.py
How to use
This MCP server exposes PCILeech-based DMA memory operations through the MCP interface. It wraps a PCILeech-enabled workflow so clients can request core memory reads/writes, memory formatting, process/memory discovery, address translation, and FPGA/advanced actions via tool calls like memory_read, memory_write, memory_format, system_info, memory_probe, memory_dump, memory_search, memory_patch, process_list, translate_phys2virt, translate_virt2phys, kmd_load, kmd_exit, kmd_execute, kmd_list_scripts, benchmark, tlp_send, and fpga_config. The server runs non-blocking tool calls by delegating PCILeech operations to a dedicated thread, enabling responsive interactions for MCP clients such as Claude Code.
To use it, start the MCP server (as configured in the README). Then, within your MCP client, reference the server by its name (pcileech) and invoke the desired tool with the required parameters. Virtual memory mode is supported for memory tools, allowing you to specify either pid or process_name (mutually exclusive). Some operations (e.g., memory_probe, tlp_send) require FPGA-backed hardware. The server returns structured results including hex dumps, ASCII views, and metadata to help you analyze memory content and device information.
How to install
Prerequisites
- Windows 10/11 (x64) and a compatible PCILeech setup
- Python 3.10+ installed on the system
- PCILeech hardware properly configured and the bundled pcileech binaries present
Step-by-step installation
- Clone the repository and install dependencies
git clone https://github.com/Evan7198/mcp_server_pcileech
cd mcp_server_pcileech
python -m venv .venv
# Windows example:
.venv\Scripts\activate
# Linux/macOS example:
source .venv/bin/activate
pip install -r requirements.txt
- Ensure PCILeech binaries are present
- The repository includes a pcileech/ directory containing pcileech.exe (Windows). Ensure you have a compatible version for your platform and that the binaries are accessible under pcileech/ as described in the README.
- Run the MCP server
# From the repository root
python main.py
- Configure the MCP client
- Edit your MCP client config (e.g., Claude Code) to add an entry for the server named pcileech with the appropriate command path if you run the server from a virtual environment or a specific Python interpreter.
- Example config (adjust paths as needed):
"mcpServers": {
"pcileech": {
"command": "C:\\path\\to\\your\\venv\\Scripts\\python.exe",
"args": [
"C:\\path\\to\\mcp_server_pcileech\\main.py"
],
"cwd": "C:\\path\\to\\mcp_server_pcileech",
"env": {}
}
}
Additional notes
Tips and common issues:
- If PCILeech is not found or the executable path is incorrect, verify config.json and the pcileech executable path used by the wrapper.
- For hardware connection issues, run pcileech.exe probe manually to validate drivers and cabling before using MCP tools.
- Memory reads have size limits and may require chunking; for large reads, rely on memory_read with appropriate length settings and pagination.
- Some tools are FPGA-only; ensure your hardware supports them and enable the necessary FPGA features.
- The server is Windows-focused due to PCILeech; if you run on a different OS, ensure compatibility with the bundled binaries or build adapters accordingly.
Related MCP Servers
MCPSpy
MCP Monitoring with eBPF
paiml -agent-toolkit
Pragmatic AI Labs MCP Agent Toolkit - An MCP Server designed to make code with agents more deterministic
schedcp
MCP Server for Linux Scheduler Management and Auto optimization
neurondb
PostgreSQL extension for vector search, embeddings, and ML, plus NeuronAgent runtime and NeuronMCP server.
mcp
MCP server from FitzQ/mcp-server
esp_mcp_server
An ESP32 component that implements the Model Context Protocol (MCP) server, providing a standardized way for AI applications to integrate with ESP32 devices.