Forensics MCP Server
自组装取证 MCP 服务器(FastMCP / Python)
一个基于 Python 和 FastMCP(mcp>=2.0.0)构建的模块化数字取证与事件响应(DFIR)模型上下文协议(MCP) 服务器。
它在启动时动态发现主机和容器取证工具,并自动自组装功能性工具、资源和分类提示,供本地大语言模型和 AI 代理(Ollama、Claude、Cursor、Antigravity 等)使用。
🌟 特性
🔍 动态能力发现:探测主机环境路径、已安装的二进制文件(
exiftool、strings、volatility3、binwalk、tshark、objdump、gdb、yara)以及 Docker 运行时。缺失的工具会被优雅地报告而不会导致崩溃。🧩 自组装工具原语:仅自动注册主机环境中可用的工具。
🛡️ 隔离与离线就绪:内置离线威胁情报数据库,包含已知样本签名(EICAR、WannaCry、Mimikatz),用于安全、零数据泄露的事件响应。
📋 防篡改监管链:每次工具执行、检查的工件、SHA-256 校验和以及操作参数都会经过密码学哈希处理,并记录到仅可追加的分类账中(
evidence/chain_of_custody.jsonl)。🩺 自报告健康与资源:实时能力矩阵(
forensics://capabilities)、监管日志(forensics://custody)和系统健康状态(forensics://health)。⚡ 双传输方式:支持原生 MCP 客户端(Cursor、Claude、Antigravity)的标准 STDIO,以及 Web 大语言模型代理(Ollama、Open WebUI)的 SSE/HTTP。
Related MCP server: findevil-agent
🚀 快速开始
1. 前置要求
Python 3.10+(或 uv)
2. 运行服务器
选项 A:原生 STDIO 传输(适用于本地代理 / Cursor / Claude)
cd /home/b47m4n/Projects/forensics-mcp-framework
uv run src/server.py选项 B:SSE / HTTP 传输(适用于 Web / 远程大语言模型)
cd /home/b47m4n/Projects/forensics-mcp-framework
uv run src/server.py --transport sse --port 8000🔌 连接到本地大语言模型和代理
1. Antigravity / Claude / Cursor(claude_desktop_config.json / mcp.json)
{
"mcpServers": {
"forensic-analyzer": {
"command": "uv",
"args": [
"--directory",
"/home/b47m4n/Projects/forensics-mcp-framework",
"run",
"src/server.py"
]
}
}
}2. 通过 Ollama + MCP 连接本地大语言模型
通过 SSE 端点连接您的本地模型(例如 llama3.1、qwen2.5-coder):
http://localhost:8000/sse
🛠️ 已发现的工具目录
工具 | 类别 | 动态条件 | 描述 |
| 元数据与文件 | 始终可用 | 计算哈希(MD5/SHA256)、EXIF 标签,并检测 MIME 不匹配 |
| 静态分析 | 始终可用 | 提取可打印的 ASCII 和 Unicode 字符串 |
| 威胁检测 | 始终可用 | 扫描 C2 URL、IP 地址、Base64 块、命令执行 |
| 威胁情报 | 始终可用 | 根据离线签名和可选的实时 API 检查哈希 |
| 诊断 | 始终可用 | 健康状态、存储检查和工具就绪性 |
| 内存取证 |
| Volatility 3 |
| 内存取证 |
| Volatility 3 |
| 内存取证 |
| Volatility 3 |
| 内存取证 |
| Volatility 3 |
| 内存取证 |
| Volatility 3 |
| 文件提取 |
| 固件签名和文件系统提取 |
| 网络取证 |
| 解析 PCAP 网络数据包捕获 |
| 逆向工程 |
| 反汇编二进制机器指令 |
| 调试 |
| 自动化批量调试检查 |
| 签名匹配 |
| 根据 YARA 规则文件扫描证据 |
📂 项目架构
forensics-mcp-framework/
├── pyproject.toml
├── .env.example
├── README.md
├── evidence/ # Evidence locker & chain of custody ledger
│ ├── suspect_photo.jpg
│ ├── eicar_test.com
│ └── chain_of_custody.jsonl
└── src/
├── server.py # Master FastMCP bootstrap & dynamic assembler
├── core/
│ ├── discovery.py # Host & container capability scanner
│ ├── custody.py # Tamper-evident append-only chain of custody
│ └── health.py # System diagnostics & health reporter
├── tools/
│ ├── metadata.py # ExifTool & MIME mismatch detector
│ ├── strings_ioc.py # String & IOC scanner (IP, URL, Base64, shell)
│ ├── threat_intel.py # Offline/online threat intelligence
│ ├── memory_vol.py # Volatility 3 memory analysis engine
│ └── dynamic_cli.py # CLI wrappers (binwalk, tshark, objdump, gdb)
├── resources/
│ └── system_resources.py# MCP Resources
└── prompts/
└── triage_prompts.py # Structured DFIR workflowsAvailable Tools
5 toolscheck_threat_intelB
Queries threat intelligence databases (with safe offline fixture fallback) for a file hash.
Inputs: file_hash (required), case_id. Returns: result
extract_metadataB
Extracts file metadata, computes cryptographic hashes (MD5, SHA-1, SHA-256, SHA-512), and detects MIME-type masquerading.
Inputs: file_path (required), case_id. Returns: result
extract_stringsC
Extracts printable ASCII & Unicode strings from an evidence artifact.
Inputs: file_path (required), case_id, min_length, max_results, +1 more. Returns: result
scan_iocsC
Scans an evidence artifact for Indicators of Compromise: IPs, C2 URLs, email addresses, suspicious commands, and Base64 payloads.
Inputs: file_path (required), case_id. Returns: result
system_health_checkA
Inspects real-time host forensic capability readiness, storage, and chain-of-custody status.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct forensic task: system readiness, metadata extraction, string extraction, IOC scanning, and threat intel lookup. There is no functional overlap, and the descriptions clearly delineate their purposes.
All tool names follow a consistent verb_noun pattern (e.g., system_health_check, extract_metadata, scan_iocs), using snake_case throughout. The naming is predictable and aligns with forensic terminology.
Five tools is appropriate for a forensic server covering host readiness, file analysis, and threat detection. Each tool serves a necessary function without redundancy or gaps in the core workflow.
The toolset covers essential forensic steps: health check, metadata extraction, string extraction, IOC scanning, and threat intel. A minor gap is the absence of a tool for parsing specific artifact types (e.g., registry hives or logs), but the set is sufficient for basic evidence triage.
Maintenance
Related MCP Connectors
Discover, invoke, and verify ForceDream agents with cryptographic proofs. 14 local, 21 hosted tools.
34 security tools for AI agents: phishing links, exposure maps, DNS, SSL, PQC, history, pivots.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Agent tools for discovery, payment safety, data extraction, and DeFi.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interface with Velociraptor for digital forensics and incident response tasks, including file/memory scans, remediation actions, and artifact collection across multiple operating systems.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables autonomous digital forensics and incident response through 21 typed forensic tools covering disk, memory, registry, network, timeline, carving, and patterns, integrated with AI-driven reasoning and self-correction.MIT
- AlicenseNot gradedqualityBmaintenanceEnables autonomous digital forensics and incident response by wrapping SIFT Workstation tools as MCP tools and orchestrating a multi-agent AI pipeline for evidence analysis and remediation planning.2MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to analyze memory dumps for forensic investigation, leveraging a fast Rust engine and full Volatility3 plugin coverage via the Model Context Protocol.1MIT