mcp-graph
Open-source CLI (v7.0) that converts PRDs into persistent execution graphs, coordinates 5 MCPs, reduces tokens by up to 85%, and includes 155 multimodal skills. Anti-vibe-coding with Harness Engineering.
The problem
AI coding agents are powerful, but the way most developers use them - so-called vibe coding - creates three concrete problems:
-
Every session starts from scratch. The agent doesn’t remember what it did yesterday. You spend 30-50% of tokens re-explaining context, re-reading files, re-describing the architecture.
-
PRDs become disconnected tasks. You import a requirements document and tasks land with no connection between them. No dependencies, no calculated priorities, no traceability.
-
AI tools don’t communicate. Your code assistant doesn’t talk to impact analysis. Documentation search doesn’t feed the task planner. Zero coordination.
-
No discipline is enforced. The agent generates code without tests, without typing, without following project patterns. It works until it breaks in production.
The solution
mcp-graph is a local-first TypeScript CLI that converts PRDs (Markdown, TXT, PDF, HTML) into persistent execution graphs stored in SQLite.
The system automatically generates a hierarchical task tree with 9 node types - epics, tasks, subtasks, requirements, constraints, milestones, acceptance criteria, risks, and decisions. It infers dependencies, estimates priorities, and creates a navigable graph that any AI agent can query.
Technical differentiators
Token Economy - 70-85% reduction
3-tier compression to deliver only the necessary context to the agent:
| Tier | Tokens/node | Usage |
|---|---|---|
| Summary | ~20 | Structure overview |
| Standard | ~150 | Context + dependencies + BM25 snippets |
| Deep | 500+ | Complete documents + acceptance criteria |
Intelligently allocated budget: 60% graph, 30% knowledge, 10% metadata.
Multi-Agent Intelligence Mesh
Coordination of 5 MCPs via reactive EventBus:
- mcp-graph → source of truth (graph + knowledge store)
- Serena → code analysis, semantic navigation, agent memory
- GitNexus → code intelligence, impact analysis, blast radius
- Context7 → up-to-date library documentation, local cache
- Playwright → browser validation, screenshots, interface testing
100% Local Knowledge Pipeline
- Keyword search via SQLite FTS5 with BM25 ranking
- Semantic search via TF-IDF (~10 MB vs ~400 MB transformer models)
- Hybrid mode with automatic deduplication
- 5 indexed sources: uploads, Serena memories, code, docs, web captures
- SHA-256 deduplication
No API keys. No per-query costs. No data leaving your environment.
Anti-Vibe-Coding methodology
mcp-graph embeds a methodology based on Extreme Programming (XP):
- TDD enforced - every feature requires a test BEFORE implementation
- Skeleton & Organs - the human defines the architecture, the AI implements with discipline
- Anti-one-shot - decomposition into atomic tasks tracked in the graph
- 8-phase cycle: ANALYZE → DESIGN → PLAN → IMPLEMENT → VALIDATE → REVIEW → HANDOFF → LISTENING
Project numbers (v7.0)
| Metric | Value |
|---|---|
| Version | 7.0 |
| Tests | 910+ across 105 files (1,337+ test cases) |
| Indexed symbols | 1,017 |
| Graph relationships | 2,650 |
| Execution flows | 67 |
| MCP tools | 26 |
| REST endpoints | 44 |
| Multimodal skills | 155 (audio, video, CV, autonomous orchestration) |
| Dashboard tabs | 6 |
| TypeScript | strict mode, zero any |
| Determinism | 100% (Deterministic-First architecture) |
Harness Engineering (v7.0)
v7 introduced the Harnessability Score concept, a composite metric that evaluates how safe the code is for agents to manipulate:
- Unified Gate System: 50% less overhead per MCP call, 50% fewer database reads
- Knowledge Autoprune: RAG stays fast (under 20ms for 500 documents)
- DORA Metrics Elite: 25.4 tasks/day, MTTR 0h, Change Failure Rate 0%
- Security Hardened: protection against 20 Path Traversal vectors in a single barrier
Ecosystem
- 26 MCP tools compatible with Claude, Copilot, Cursor, Windsurf, Zed
- 44 REST endpoints with full API
- 155 multimodal skills (audio, video, computer vision, orchestration)
- Interactive dashboard built with React 19 + React Flow
- npm:
@mcp-graph-workflow/mcp-graph - License: MIT
Technologies used
- TypeScript / Node.js (strict mode)
- SQLite (database + FTS5)
- React 19 + React Flow (dashboard)
- TF-IDF + BM25 (local hybrid search)
- MCP (Model Context Protocol)