Forensics MCP Server
自己組織化フォレンジックMCPサーバー (FastMCP / Python)
PythonとFastMCP(mcp>=2.0.0)で構築された、モジュール式のデジタルフォレンジックおよびインシデントレスポンス(DFIR)**Model Context Protocol(MCP)**サーバーです。
起動時にホストおよびコンテナのフォレンジックユーティリティを動的に検出し、ローカルのLLMや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 LLMエージェント(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 / リモートLLM向け)
cd /home/b47m4n/Projects/forensics-mcp-framework
uv run src/server.py --transport sse --port 8000🔌 ローカルLLMおよびエージェントへの接続
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経由のローカルLLM
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.
| Name | Required | Description | Default |
|---|---|---|---|
| case_id | No | CASE-DEFAULT | |
| file_hash | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses a safe offline fixture fallback, implying reliability. However, it does not mention if the tool is read-only, whether it may hit external APIs, or any latency implications.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is one clear sentence, front-loading the primary action and key detail about fallback. No wasted words. Could slightly improve by adding context about parameters.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool invokes an external database query with fallback, has 2 parameters (one unexplained), and an output schema exists, the description is adequate but incomplete. It should clarify the return value (the output schema may help, but it's not referenced).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, meaning the schema provides no descriptions. The description only mentions 'file_hash' implicitly (says 'for a file hash') but fails to explain the purpose of 'case_id' or its default value. This is a significant gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool queries threat intelligence databases for a file hash, and mentions a safe offline fixture fallback. The verb 'queries' and resource 'threat intelligence databases' are specific. However, it does not differentiate from the sibling 'scan_iocs', which may also query threat intel.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like 'scan_iocs'. The description does not state prerequisites, context (e.g., only for certain hash types), or when to avoid it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
extract_metadataB
Extracts file metadata, computes cryptographic hashes (MD5, SHA-1, SHA-256, SHA-512), and detects MIME-type masquerading.
| Name | Required | Description | Default |
|---|---|---|---|
| case_id | No | CASE-DEFAULT | |
| file_path | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully disclose behavioral traits. It correctly indicates that the tool computes multiple hash types and detects MIME-type masquerading—both are non-obvious and valuable. However, it does not mention whether the tool modifies the file, requires network access, or what happens if the file is missing. The absence of annotations means the bar is higher, and this description just meets the minimum by covering key side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, information-dense sentence that front-loads the core action ('Extracts file metadata') and then lists specific capabilities (hash types, masquerading detection). No extraneous words or redundancy exist. Every phrase adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (multiple hash computations, masquerading detection) and that an output schema exists, the description provides an overview but omits important details like whether hashes are returned as hex strings, what MIME-type detection criteria are used, or the behavior for invalid paths. With no annotations, the description carries more burden and is only partially complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema coverage is 0%, meaning neither parameter has a description in the schema. The tool description mentions 'file_path' indirectly by specifying 'Extracts file metadata', but it does not explain the 'case_id' parameter at all. Two out of two parameters lack documentation, and the description adds no value for 'case_id'. The baseline expectation is higher given zero schema coverage, so this is insufficient.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the tool's purpose: extracting file metadata and computing cryptographic hashes. It specifies the resources (file metadata, hashes) and the action (extracts), and the mention of MIME-type masquerading detection adds a distinguishing feature. However, it lacks explicit differentiation from sibling tools like 'extract_strings', which might also work on files, leaving some ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'extract_strings' or 'scan_iocs'. It does not mention prerequisites (e.g., file must exist on disk), error scenarios (e.g., unsupported file types), or when it is inappropriate to use. The context signals include sibling names, but the description itself fails to help the agent choose correctly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
extract_stringsC
Extracts printable ASCII & Unicode strings from an evidence artifact.
| Name | Required | Description | Default |
|---|---|---|---|
| case_id | No | CASE-DEFAULT | |
| file_path | Yes | ||
| min_length | No | ||
| max_results | No | ||
| pattern_filter | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden for behavioral disclosure. It only states the basic extraction function but omits critical details such as whether the operation is read-only, how results are returned, edge cases like missing files, or any performance implications.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise (10 words, single sentence), but this conciseness sacrifices essential information. It lacks structure and reads as a fragment, failing to earn its place when more detail is needed.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 5 parameters, no schema descriptions, and an available but unused output schema, the description is woefully incomplete. It does not address parameter roles, return value format, or how to interpret results, leaving the agent with insufficient context to use the tool effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds no information about any of the 5 parameters (case_id, file_path, min_length, max_results, pattern_filter). Since schema description coverage is 0%, the description fails to compensate, leaving the agent without any semantic understanding of required or optional inputs.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (extracts), the resource (printable ASCII & Unicode strings), and the source (evidence artifact). It effectively distinguishes from sibling tools like extract_metadata and scan_iocs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. There is no mention of appropriate contexts, prerequisites, or exclusions, which is critical for an agent to decide between extract_strings and siblings like extract_metadata.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
scan_iocsC
Scans an evidence artifact for Indicators of Compromise: IPs, C2 URLs, email addresses, suspicious commands, and Base64 payloads.
| Name | Required | Description | Default |
|---|---|---|---|
| case_id | No | CASE-DEFAULT | |
| file_path | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It lists the types of IOCs scanned but does not disclose whether scanning is read-only, destructive, or has side effects. No mention of permissions, runtime characteristics, or error behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, 22 words, front-loads the action and lists IOC categories. No wasted text; every part contributes to understanding the tool's core function.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
While an output schema exists, the description omits essential context: file format support, size limits, relationship to case_id (e.g., required if multiple cases), and how results are structured. Incomplete for an agent to use confidently.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate. It adds zero explanation for either parameter (file_path, case_id). The agent cannot infer what case_id is for or what format file_path expects.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it scans an evidence artifact for Indicators of Compromise and lists specific IOC types (IPs, C2 URLs, emails, commands, Base64). This differentiates it from siblings like extract_metadata and check_threat_intel, though it does not explicitly contrast them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus the siblings. It does not specify prerequisites, contexts, or limitations (e.g., file types, size, or that it should be used before checking threat intel).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
system_health_checkA
Inspects real-time host forensic capability readiness, storage, and chain-of-custody status.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full responsibility. It explicitly says 'inspects' (not modifies or deletes), and outlines three specific areas (capability readiness, storage, chain-of-custody). This is transparent about the non-destructive, read-only nature of the tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with 13 words, front-loading the key verb 'inspects' and then listing the three areas. There is no waste; every word contributes to the purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the tool's purpose and scope sufficiently for a zero-parameter, read-only health check tool. The output schema exists but the description doesn't need to explain return values. It could mention that the output schema details the health status, but overall it's complete for the tool's simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and there are zero parameters. The description doesn't need to elaborate on parameters since there are none, but it does explain what the tool inspects, adding value beyond the empty schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it inspects 'real-time host forensic capability readiness, storage, and chain-of-custody status'. This provides a specific verb ('inspects') and a noun ('host forensic capability') that distinguishes it from sibling tools like scan_iocs or extract_metadata.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies this is a diagnostic/readiness check for forensic hosts, distinct from sibling tools that deal with extracted data or IOCs. It doesn't explicitly state when not to use it, but given its clear purpose and the zero-parameter input, the context is well-understood.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.1.0- First observed
check_threat_intel - First observed
extract_metadata - First observed
extract_strings - First observed
scan_iocs - First observed
system_health_check
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 trustlessly verify ForceDream AI agents with cryptographic proofs. 17 tools.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Hyperion — MCP tool marketplace for AI agents: web, OSINT, security, research via one key.
A registry of AI agent tools — MCP servers, APIs, CLIs, SDKs — kept current by automated ingestion.
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 conduct evidence-grounded forensic triage of compromised hosts, with architectural safeguards against evidence spoliation and hallucinated findings, supporting self-correction and chain of custody.MIT