DecisionGraph MCP Server
Enables preserving, querying, and managing engineering decisions with reasoning and evidence through CLI, HTTP API, and MCP tools.
README
DecisionGraph
Engineering Decision Memory System with CLI + API + MCP, plus a docs frontend in docs.
<p align="center"> <img src="./assets/decisiongraph-logo.svg" alt="DecisionGraph logo" width="460"> </p>
Why DecisionGraph
Software teams usually remember what changed, but lose why it changed. DecisionGraph keeps that reasoning traceable with evidence so teams can move fast without repeating old mistakes.
- Preserve architectural decisions with supporting evidence.
- Answer
why / who / when / what-changedqueries quickly. - Add pre-change guardrails before risky refactors.
- Expose the same decision memory through CLI, HTTP API, and MCP tools.
Visual Architecture
Core Capabilities
1) Ingestion
- Local text/files/directories.
- Git commit history.
- GitHub PRs and Issues.
- Slack export JSON.
- Jira export JSON.
- Generic JSONL event streams.
2) Decision Intelligence
- Decision query with confidence + warnings.
- Decision list/search with filters (
q,tag,component,owner,decision_type). - Supersede flow to link newer decisions over older rationale.
- Merge/deduplicate flow for overlapping decisions.
- Timeline view by component/tag/owner/type.
- Evidence quality scoring with weak-decision detection.
- Contradiction detection.
- Stale assumption detection from live metrics.
- Assumption watcher with
warn/criticalescalation tracking, audit log, and optional connector notification (webhook|slack|discord|teams). - Governance policy mode (
off|warn|strict) for required decision fields. - Summary report and graph snapshot.
3) Ops + Strategy Utilities
- KPI snapshots and scenario checks.
- Evaluation against JSONL benchmark datasets.
- Security audit, doctor checks, release checks.
- Strategy section library/search for GTM and product framing.
Quickstart (Backend)
python -m pip install -e ".[dev]"
decisiongraph init --reset
decisiongraph seed-demo
decisiongraph serve --host 127.0.0.1 --port 8000 --seed-demo
Quickstart demo:

Health check:
curl http://127.0.0.1:8000/health
Open API docs:
http://127.0.0.1:8000/docs
Quickstart (Docker)
cp .env.example .env
docker compose up --build -d
Check health:
curl http://127.0.0.1:8000/health
Tail logs / stop:
docker compose logs -f decisiongraph
docker compose down
Production note:
- If
DECISIONGRAPH_ENV=production, setDECISIONGRAPH_API_TOKENin.env(or setDECISIONGRAPH_REQUIRE_TOKEN_IN_PRODUCTION=falseintentionally).
CLI-Only Mode (No Web Server)
If you only want terminal usage, skip decisiongraph serve.
python -m pip install -e ".[dev]"
decisiongraph init --reset
decisiongraph seed-demo
decisiongraph chat
Windows Command Prompt (cmd):
py -m pip install -e ".[dev]"
decisiongraph init --reset
decisiongraph seed-demo
decisiongraph chat
Inside chat, ask questions directly or use commands:
/help
/list 20
/find <query>
/supersede <new_id> <old_id>
/merge <primary_id> <duplicate_id>
/timeline 20
/quality
/get <decision_id>
/guard <change request>
/contradictions
/stale
/watch
/audit 20
/metrics
/graph
/report json
/exit
Non-interactive CLI equivalents:
decisiongraph list
decisiongraph list --q "rabbitmq" --tag queues
decisiongraph find "rabbitmq" --tag queues
decisiongraph list --owner finance --decision-type risk-policy
decisiongraph query "Why did we cap payment retries at 2?"
decisiongraph supersede <new_decision_id> <old_decision_id>
decisiongraph merge <primary_decision_id> <duplicate_decision_id> --note "dedupe"
decisiongraph timeline --component payment-retry --exclude-superseded
decisiongraph evidence-quality --weak-threshold 0.5
decisiongraph quality --weak-threshold 0.5
decisiongraph watch-assumptions --notify --notify-target slack
decisiongraph watch
decisiongraph audit-log --limit 100 --event assumption.watch_run
decisiongraph audit --limit 100 --event assumption.watch_run
decisiongraph guardrail "Increase retry attempts in payment flow"
If decisiongraph command is not available in PATH:
python -m decisiongraph list
python -m decisiongraph query "Why did we cap payment retries at 2?"
Quickstart (Docs Frontend)
cd docs
npm install
npm run dev
MCP Server (stdio)
decisiongraph mcp
Environment Setup
Create env file:
cp .env.example .env
Windows PowerShell:
Copy-Item .env.example .env
Windows Command Prompt (cmd):
copy .env.example .env
Key variables:
DECISIONGRAPH_ENV=developmentDECISIONGRAPH_DATA_PATH=data/decisiongraph.jsonDECISIONGRAPH_API_TOKENoptional API key (x-api-keyheader)DECISIONGRAPH_REQUIRE_TOKEN_IN_PRODUCTION=trueblocks startup in production without tokenDECISIONGRAPH_AUTO_SEED_DEMO=falseauto seed demo data atdecisiongraph servestartupDECISIONGRAPH_GOVERNANCE_MODE=offgovernance policy mode (off|warn|strict)DECISIONGRAPH_GOVERNANCE_REQUIRED_FIELDS=owners,assumptions,risksrequired fields when governance is enabledDECISIONGRAPH_RATE_LIMIT_PER_MINUTE=240per-client rate limit (0disables)DECISIONGRAPH_AUDIT_LOG_RETENTION=5000max retained audit eventsDECISIONGRAPH_CORS_ORIGINS=http://localhost:3000,http://127.0.0.1:5173DECISIONGRAPH_GITHUB_TOKENfor GitHub ingestionDECISIONGRAPH_GITHUB_BASE_URL=https://api.github.comDECISIONGRAPH_ALERT_WEBHOOK_URLdefault watcher webhookDECISIONGRAPH_ALERT_SLACK_WEBHOOK,DECISIONGRAPH_ALERT_DISCORD_WEBHOOK,DECISIONGRAPH_ALERT_TEAMS_WEBHOOKconnector-specific watcher webhooksSE_URLlegacy fallback (preferDECISIONGRAPH_GITHUB_BASE_URL)GROQ_API_KEY,GROQ_MODELSoptional model integration
Security note:
- Never commit real secrets in
.env. - Commit only
.env.example.
End-to-End Demo (2 Minutes)
- Seed data and run API:
decisiongraph init --reset
decisiongraph seed-demo
decisiongraph serve --host 127.0.0.1 --port 8000
- Ask a why-question:
curl -X POST http://127.0.0.1:8000/api/query \
-H "content-type: application/json" \
-d '{"question":"Why did we cap payment retries at 2?"}'
- Run guardrail before change:
curl -X POST http://127.0.0.1:8000/api/guardrail \
-H "content-type: application/json" \
-d '{"change_request":"Increase retry attempts in payment flow"}'
- Check stale assumptions:
curl http://127.0.0.1:8000/api/assumptions/stale
- Search decisions with filters:
curl "http://127.0.0.1:8000/api/decisions?limit=10&q=rabbitmq&tag=queues"
curl "http://127.0.0.1:8000/api/decisions?owner=finance&decision_type=risk-policy"
- Link a replacement decision with supersede flow:
curl -X POST http://127.0.0.1:8000/api/decisions/supersede \
-H "content-type: application/json" \
-d '{"decision_id":"<new_decision_id>","superseded_decision_id":"<old_decision_id>"}'
- Merge duplicate decision records:
curl -X POST http://127.0.0.1:8000/api/decisions/merge \
-H "content-type: application/json" \
-d '{"primary_decision_id":"<primary_id>","duplicate_decision_id":"<duplicate_id>","note":"same rationale"}'
- Run assumption watcher:
curl -X POST http://127.0.0.1:8000/api/assumptions/watch \
-H "content-type: application/json" \
-d '{"warn_severities":["medium","high"],"critical_severities":["high"],"notify":true,"notify_target":"slack"}'
API Surface (Main Endpoints)
System
GET /GET /healthGET /api/report/summary?format=json|markdown
Decisions
GET /api/decisions(supportslimit,q,tag,component,owner,decision_type)GET /api/decisions/timelineGET /api/decisions/evidence-qualityGET /api/decisions/{decision_id}POST /api/decisions/supersedePOST /api/decisions/mergePOST /api/queryPOST /api/guardrailGET /api/contradictionsGET /api/assumptions/stalePOST /api/assumptions/watchGET /api/audit/logsGET /api/metricsPOST /api/metricsGET /api/graph
Ingestion
POST /api/ingestPOST /api/ingest/directoryPOST /api/ingest/gitPOST /api/ingest/jsonlPOST /api/ingest/githubPOST /api/ingest/slack-exportPOST /api/ingest/jira-json
Intelligence / Ops
GET /api/scenarios/runGET /api/kpi/snapshotPOST /api/eval/datasetPOST /api/eval/benchmark-checkPOST /api/research/scorecardGET /api/research/interview-scriptPOST /api/research/design-partner-progressGET /api/strategy/sectionsGET /api/strategy/section/{section_id}GET /api/strategy/search?q=...GET /api/ops/doctorGET /api/ops/runbookGET /api/ops/release-checkGET /api/ops/security-auditGET /api/schema/info
CLI Reference
Core
decisiongraph init [--reset]decisiongraph seed-demodecisiongraph chat [--list-limit 20] [--guardrail-limit 3]decisiongraph list --limit 20 [--q ...] [--tag ...] [--component ...] [--owner ...] [--decision-type ...]decisiongraph find <query> [--limit ...] [--tag ...] [--component ...] [--owner ...] [--decision-type ...](alias of search/list)decisiongraph get <decision_id>decisiongraph supersede <decision_id> <superseded_decision_id>decisiongraph merge <primary_decision_id> <duplicate_decision_id> [--note ...]decisiongraph timeline [--limit 200] [--component ...] [--tag ...] [--owner ...] [--decision-type ...] [--exclude-superseded]decisiongraph evidence-quality [--limit 200] [--weak-threshold 0.45]decisiongraph quality [--limit 200] [--weak-threshold 0.45](alias)decisiongraph query "..."decisiongraph guardrail "..."decisiongraph contradictionsdecisiongraph stale-assumptionsdecisiongraph watch-assumptions [--warn medium,high] [--critical high] [--notify --notify-target slack --webhook-url ...]decisiongraph watch [--warn medium,high] [--critical high] [--notify --notify-target ...](alias)decisiongraph audit-log [--limit 100] [--event ...]decisiongraph audit [--limit 100] [--event ...](alias)decisiongraph metric-set --key ... --value ... [--unit ...]decisiongraph metricsdecisiongraph graphdecisiongraph report --format markdown|json [--output ...]
Runtime
decisiongraph serve [--host 127.0.0.1] [--port 8000] [--seed-demo|--no-seed-demo]decisiongraph mcp
Ingestion
decisiongraph ingest --source <file> --source-id <id> [--source-type note]decisiongraph ingest-text --source-id <id> --text "..." [--source-type note]decisiongraph ingest-dir --directory <dir> [--pattern "*.md"]decisiongraph ingest-git --repo <repo_path> [--max-commits 200] [--ref HEAD]decisiongraph ingest-jsonl --source <file.jsonl> [--source-type external]decisiongraph ingest-github --owner <org> --repo <name> [--state all]decisiongraph ingest-slack-export --export-dir <dir> [--max-messages 1000]decisiongraph ingest-jira-json --source <jira.json>
Insights + Ops
decisiongraph scenariosdecisiongraph kpidecisiongraph eval-dataset --dataset <eval.jsonl>decisiongraph benchmark-check --dataset <eval.jsonl> [--min-top1 0.7] [--min-keyword-coverage 0.7]decisiongraph research-score --pain-frequency ... --impact ...decisiongraph research-scriptdecisiongraph design-partner-progressdecisiongraph strategy-list | strategy-show <section> | strategy-search "..."decisiongraph doctor | runbook | release-check | security-audit | schema-info
MCP Tooling
Run stdio server:
decisiongraph mcp
Tool groups:
- Core tools: query, list/filter, supersede, merge, timeline, evidence quality, guardrail, contradictions, stale assumptions, watch assumptions, audit logs, metrics, graph, report.
- Ingestion tools: git/jsonl/github/slack/jira connectors.
- Insight tools: scenarios, KPI snapshot, dataset evaluation, benchmark gate, research scoring.
- Strategy/Ops tools: strategy sections, doctor, runbook, release check, security audit.
Project Structure
src/decisiongraph/
api.py FastAPI app assembly
service.py Core orchestration logic
store.py JSON store with locking + atomic writes
integrations.py Connectors (git, GitHub, Slack, Jira, JSONL)
mcp_server.py MCP server bootstrap
cli.py Typer CLI entrypoint
api_routes/ API routers
cli_commands/ CLI command groups
mcp_toolsets/ MCP tool groups
tests/ Backend test suite
tools/ CI benchmark datasets and helper artifacts
docs/ Frontend docs app (Vite + React)
assets/ README visual assets
Quality and Validation
Local quality commands:
python -m pytest -q
decisiongraph benchmark-check --dataset tools/ci_eval.jsonl --seed-demo --min-top1 0.65 --min-keyword-coverage 0.65
cd docs && npm run lint && npm run build
Latest local validation (2026-04-25):
- Backend tests: pass (
59 passed) - Benchmark gate (
tools/ci_eval.jsonl): pass - Frontend lint: pass
- Frontend build: pass
CI pipeline:
.github/workflows/ci.yml- Backend matrix tests + benchmark gate on
tools/ci_eval.jsonl
Release notes:
Delivery Scope (3 Rounds)
- Round 1 (Core): ingestion, extraction, query, guardrail, contradiction, stale assumptions.
- Round 2 (Surface): connectors + CLI/API/MCP interfaces.
- Round 3 (Outer Ring): insights, strategy, ops, docs, operational checks.
Notes for Contributors
- Keep backward compatibility for API and CLI contracts.
- Add tests for any behavior change.
- Prefer evidence-linked decision entries over free-form notes.
Tiếng Việt (Tóm tắt nhanh)
DecisionGraph là hệ thống lưu trí nhớ quyết định kỹ thuật để trả lời nhanh câu hỏi "vì sao code đang như vậy". Bạn có thể ingest từ Git/GitHub/Slack/Jira/JSONL, query theo ngữ nghĩa, chạy guardrail trước refactor, và expose cùng logic qua CLI + API + MCP.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。