PCILeech MCP Server
PCILeech用MCPサーバー
English
DMAベースのメモリオペレーションのためにPCILeechへの標準化されたインターフェースを提供するModel Context Protocol (MCP) サーバーです。これにより、MCPクライアント(例:Claude Code)がツール呼び出しを通じてメモリ/デバッグワークフローを実行できるようになります。
著者: EVAN & MOER サポート: Discordに参加
Related MCP server: Volatility MCP
機能
19個のMCPツール(機能別にグループ化):
コアメモリ:
memory_read,memory_write,memory_formatシステム:
system_info,memory_probe,memory_dump,memory_search,memory_patch,process_listアドレス変換:
translate_phys2virt,translate_virt2phys,process_virt2physカーネルモジュール (KMD):
kmd_load,kmd_exit,kmd_execute,kmd_list_scripts_list高度な機能/FPGA:
benchmark,tlp_send,fpga_config
仮想アドレスモード: メモリツールは
pidまたはprocess_nameをサポート(相互排他)ノンブロッキングサーバー: PCILeechの呼び出しは
asyncio.to_threadを介して実行されます出力ヘルパー: 分析用のhexdump + ASCII + バイト/DWORDビュー
前提条件
Windows 10/11 (x64)
Python 3.10+
PCILeechハードウェア(適切に構成され動作していること)
PCILeechバイナリ (
pcileech/配下にバンドル)
クイックスタート
1. クローン
git clone https://github.com/Evan7198/mcp_server_pcileech
cd mcp_server_pcileech
// download release in https://github.com/ufrisk/pcileech for using the latest pcileech2. 依存関係のインストール
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txtMCPのインポートやバージョンに関する問題が発生した場合は、代わりに pyproject.toml からインストールしてください:
pip install -e .3. PCILeechの検証
cd pcileech
pcileech.exe probe4. Claude Code (MCP) の設定
サーバーエントリを追加します(パスは適宜調整してください):
"mcpServers": {
"pcileech": {
"command": "C:\\path\\to\\mcp_server_pcileech\\.venv\\Scripts\\python.exe",
"args": [
"C:\\path\\to\\mcp_server_pcileech\\main.py"
],
"cwd": "C:\\path\\to\\mcp_server_pcileech",
"env": {}
}
}MCP設定を編集した後、Claude Codeを再起動してください。
設定
config.json でPCILeechの実行可能パスとタイムアウトを制御します:
{
"pcileech": {
"executable_path": "pcileech\\pcileech.exe",
"timeout_seconds": 30
},
"server": {
"name": "mcp-server-pcileech",
"version": "1.0.0"
}
}使用例
設定が完了すると、自然言語でアクションを要求できます。クライアントがそれをツール呼び出しに変換します:
Read 256 bytes from address 0x1000Write the hex data 48656c6c6f to address 0x2000Show me a formatted view of 64 bytes at address 0x1000MCPツール(概要)
注意:
仮想メモリモード: メモリツールでは
pidまたはprocess_nameを使用してください(両方は不可)。FPGA専用: 一部の操作(
memory_probe,tlp_sendなど)にはFPGAベースのデバイスが必要です。
コアメモリ
memory_read(address, length, pid?, process_name?)→ 16進データ + メタデータmemory_write(address, data, pid?, process_name?)→ 成功/確認memory_format(address, length, formats?, pid?, process_name?)→ hexdump/ASCII/配列/raw
システム
system_info(verbose?)→ ターゲットシステム + デバイス情報memory_probe(min_address?, max_address?)→ 読み取り可能な領域 (FPGA専用)memory_dump(min_address, max_address, output_file?, force?)→ ダンプファイルのパス/結果memory_search(pattern? | signature?, min_address?, max_address?, find_all?)→ 一致箇所memory_patch(signature, min_address?, max_address?, patch_all?)→ パッチ適用結果process_list()→ PID/PPID/名前リスト
アドレス変換
translate_phys2virt(physical_address, cr3)→ 変換詳細translate_virt2phys(virtual_address, cr3)→ 変換詳細process_virt2phys(pid, virtual_address)→ 変換詳細
カーネルモジュール (KMD)
kmd_load(kmd_type, use_pt?, cr3?)→ ロード結果(KMDアドレスをキャッシュ)kmd_exit(kmd_address?)→ アンロード結果(省略時はキャッシュされたアドレスを使用)kmd_execute(script_name, kmd_address?, input_file?, output_file?, parameter_string?, parameter_int0?, parameter_int1?)kmd_list_scripts(platform?)→ プラットフォーム別にグループ化された利用可能な.kshスクリプト
高度な機能 / FPGA
benchmark(test_type?, address?)→ MB/sの結果(ハードウェアに依存)tlp_send(tlp_data?, wait_seconds?, verbose?)→ 送信/受信されたTLP (FPGA専用)fpga_config(action?, address?, data?, output_file?)→ 設定の読み取り/書き込み (FPGA専用)
アーキテクチャ
2層設計
MCPサーバー層 (
main.py)Stdioトランスポート、ツールスキーマ、検証、フォーマット
イベントループをブロックしないように
asyncio.to_thread()を使用
PCILeechラッパー (
pcileech_wrapper.py)pcileech.exeへのサブプロセス呼び出しアドレスアライメント + 256バイト単位のチャンク処理 (PCILeechの
display動作)出力解析、タイムアウト、エラーマッピング
トラブルシューティング
PCILeechが見つからない
エラー: PCILeech executable not found
修正: config.json → pcileech.executable_path を確認してください
ハードウェアが接続されていない
警告: PCILeech connection verification failed
修正: pcileech\pcileech.exe probe を実行し、ドライバーとケーブル接続を検証してください
メモリアクセス失敗
エラー: Memory read/write failed
修正: まずCLIでアドレス/範囲を検証してから、MCP経由で再試行してください
タイムアウト
エラー: PCILeech command timed out
修正: config.json の pcileech.timeout_seconds を増やしてください
プロジェクト構造
mcp_server_pcileech/
├── main.py
├── pcileech_wrapper.py
├── config.json
├── pyproject.toml
├── requirements.txt
├── README.md
├── README_CN.md
└── pcileech/
├── pcileech.exe
└── LICENSE.txt制限事項
Windowsのみ (このリポジトリのPCILeechはWindowsに特化しています)
実際のメモリオペレーションには互換性のあるPCILeechハードウェアが必要です
読み取りサイズの制限:
memory_read: 最大1MBmemory_format: 最大4KB (読み取り可能な出力)
一部のツールは FPGA専用 です (probe/TLP/config)
PCILeechコマンドは順次実行されます (サブプロセス呼び出しごと)
セキュリティと法的注意
このツールは、許可されたデバッグ、セキュリティ研究、教育を目的としています。不正アクセスや悪意のある活動には使用しないでください。適用される法律および規制を遵守する責任はユーザーにあります。
ライセンス
このプロジェクトはPCILeechをラップしており、PCILeechには独自のライセンスがあります。pcileech/LICENSE.txt を参照してください。
クレジット
バージョン
このリポジトリのツールセットには、現在19個のツールが含まれています。パッケージ/設定のバージョンについては以下を参照してください:
pyproject.toml([project].version)config.json(server.version)
サポート
Discord: Discordに参加
Issues: このリポジトリでIssueを開いてください
PCILeechドキュメント: PCILeech GitHub
MCPドキュメント: MCP Documentation
変更履歴
v1.0.0 (2025-12-16)
PCILeechの全機能をカバーする19個のMCPツールに拡張
メモリツールに仮想アドレスモード (
pid/process_name) を追加アドレス変換、KMD、FPGA/高度なツールを追加
検証とエラー処理を強化。ノンブロッキングサーバー実行
v0.1.0 (2025-12-10)
初回リリース
3つのMCPツール:
memory_read,memory_write,memory_format
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
- EngramOAuthapp.getengram
Persistent, verbatim, searchable memory for AI assistants — one memory across every MCP client.
Private cross-media memory for AI assistants: recommendations, progress and controlled actions.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceBridges AI models with WinDbg to analyze Windows crash dumps and perform remote debugging through natural language queries, enabling execution of debugger commands and automated crash analysis.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to perform memory forensics analysis using Volatility 3 through natural language prompts. Supports process listing, network connection analysis, and other memory artifact inspection from memory images.52Apache 2.0
- AlicenseNot gradedqualityBmaintenanceA Linux-native MCP server that gives AI assistants direct access to DMA-based memory operations for memory inspection, process analysis, reverse engineering, and game engine SDK extraction via natural language.13AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to control the x64dbg debugger through natural language, providing tools for breakpoints, memory, disassembly, tracing, PE dumping, and anti-debug bypass, all locally via stdio.131MIT