sift-mcp
Read-only MCP server that exposes deterministic NTFS timestomp detection tools for autonomous forensic triage, with architectural guarantees against evidence modification.
README
logflip-sift-agent
Autonomous NTFS anti-forensics triage for Protocol SIFT: a read-only MCP server and a self-correcting Claude agent built on the
logflipdetection engine. The agent finds timestomping on a disk image, reasons about each candidate, and self-corrects when the evidence does not add up - while a signed, never-false-confirm engine makes hallucinated findings structurally impossible.
License: MIT | SANS FIND EVIL! hackathon | Architecture: Custom MCP Server (#2) + Direct Agent Extension (#1)
What it does
logflip-sift-agent turns the deterministic logflip
engine (NTFS $LogFile reverse-replay timestomp detection, corroborated across
$LogFile, $UsnJrnl, and $SI-vs-$FN) into a fully autonomous incident-response agent:
- Read-only MCP server (
sift-mcp) exposes the engine as typed forensic tools and nothing else. There is no write, delete, or shell tool, so the agent physically cannot modify or spoliate the evidence. The guarantee is architectural, not a prompt the model could ignore. - Self-correcting agent loop (
sift-agent) scans the image, investigates each record that disagrees with the journal, and on a single-source anomaly pivots to an independent corroboration channel before concluding. It accepts the engine's bounded verdict, including an honest "cannot confirm." - Signed audit trail: every finding's verdict traces to the tool execution
that derived it (
produced_by_seq); a corroborated anomaly links the independent tools that corroborated it (corroborated_by_seq); and journaled findings carry an HMAC-signed evidence leaf a judge can re-verify offline.
It maps to Rob T. Lee's bar for Protocol SIFT directly: the AI directs verified tools and self-corrects; it does not interpret raw bytes or decide verdicts.
Architecture at a glance
flowchart TD
A["NTFS image / streams (READ-ONLY)"] --> B
subgraph B["sift-mcp (FastMCP) -- ARCHITECTURAL BOUNDARY 1"]
B1["scan_image - detect_record - inspect_mft<br/>inspect_usnjrnl - verify_leaf - verify_db<br/>(no write / delete / shell tool exists)"]
end
B --> C
subgraph C["logflip engine (unmodified) -- ARCHITECTURAL BOUNDARY 2"]
C1["reverse_replay - mft_parser - usnjrnl - fingerprint<br/>4-gate never-false-confirm + HMAC-signed leaf"]
end
C --> D
subgraph D["sift-agent (Claude/OpenAI or deterministic policy) -- PROMPT BOUNDARY"]
D1["triage heuristic + self-correction + max-iterations cap"]
end
D --> E["verdict guard -- ARCHITECTURAL BOUNDARY 3<br/>(claim clamped to the signed leaf)"]
E --> F["signed leaves + structured JSONL session log<br/>(finding -> tool execution -> leaf)"]
Full write-up and the architectural-vs-prompt boundary table: docs/ARCHITECTURE.md.
Quickstart (no API key, deterministic policy driver)
# 1. Install the engine (pre-existing component) and this agent.
pip install "git+https://github.com/javierdejesusda/logflip-closed"
pip install -e . # from this repo root
# 2. Build the synthetic demo case (two journaled stomps + one anomaly).
python cases/demo_stomp/generate.py
# 3. Run the agent. It scans, investigates, and self-corrects on the anomaly.
python -m sift_agent --image cases/demo_stomp/case.img --usnjrnl-record 42 \
--log logs/session.jsonl --leaf-dir cases/demo_stomp/leaves
Expected: records 5 and 7 report provisional (with signed leaves), record 12
reports anomaly (corroborated, then honestly not escalated). Exit code 2.
The full reasoning and tool trace is written to logs/session.jsonl.
A pre-generated sample trace (deterministic policy driver) is committed at
logs/sample_session.jsonl. A second sample from the
OpenAI driver, logs/sample_session_openai.jsonl,
shows the same triage with per-turn token usage and the model's own reasoning.
Try it out (Docker, one command)
docker compose up --build
This builds an image with the engine and the agent installed, generates the demo case, runs the agent, and prints the triage report plus the session-log path.
LLM-driven mode (real autonomous reasoning)
# Anthropic (Claude)
export ANTHROPIC_API_KEY=sk-ant-...
python -m sift_agent --image cases/demo_stomp/case.img --usnjrnl-record 42 \
--driver claude --model claude-sonnet-4-6 --log logs/session.jsonl
# OpenAI
export OPENAI_API_KEY=sk-...
python -m sift_agent --image cases/demo_stomp/case.img --usnjrnl-record 42 \
--driver openai --model gpt-4o --log logs/session.jsonl
Same tools, same guards; the model chooses the sequence and narrates its reasoning,
and each turn's token usage is recorded in the session log. A .env file holding
the key is auto-loaded. Without a key, the LLM drivers fall back to the
deterministic policy so the agent always runs for a judge.
Repository layout
| Path | What |
|---|---|
sift_mcp/ |
Read-only MCP server: engine.py (adapters), server.py (FastMCP surface) |
sift_agent/ |
Agent loop (orchestrator.py), guard.py, clients.py (policy), llm_client.py (Claude), llm_client_openai.py (OpenAI), session_log.py, tools.py, prompts.py, __main__.py |
cases/demo_stomp/ |
Synthetic case generator and sample outputs |
docs/ |
Architecture, dataset, accuracy report, project description |
tests/ |
42 tests (read-only surface, guard, loop, self-correction, log, CLI, LLM drivers) |
Evidence integrity (never-false-confirm)
A confirmed verdict requires all four engine gates to pass simultaneously
(complete $LogFile inversion, a signed fingerprint match at >= 0.85 confidence,
and two independent failure-mode classes), a real engagement key, and a signed
fingerprint DB. The demo key cannot produce a confirmed leaf by construction, so
the demo's honest ceiling is provisional. Anomalies (no $LogFile coverage) can
never be confirmed. See docs/ACCURACY_REPORT.md.
Tests
python -m pytest tests/ -q # 42 agent/MCP tests
The underlying engine ships its own 809-test suite (run from the logflip-closed
checkout).
Documentation
License
MIT. The logflip engine is a separate, pre-existing MIT component reused here;
the novel contribution of this repository is the autonomous MCP agent, the verdict
guard, the self-correction loop, and the signed session log.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。