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.

TypeScriptMCPAIopen-sourceTDD

The problem

AI coding agents are powerful, but the way most developers use them - so-called vibe coding - creates three concrete problems:

  1. 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.

  2. PRDs become disconnected tasks. You import a requirements document and tasks land with no connection between them. No dependencies, no calculated priorities, no traceability.

  3. AI tools don’t communicate. Your code assistant doesn’t talk to impact analysis. Documentation search doesn’t feed the task planner. Zero coordination.

  4. 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:

TierTokens/nodeUsage
Summary~20Structure overview
Standard~150Context + dependencies + BM25 snippets
Deep500+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)

MetricValue
Version7.0
Tests910+ across 105 files (1,337+ test cases)
Indexed symbols1,017
Graph relationships2,650
Execution flows67
MCP tools26
REST endpoints44
Multimodal skills155 (audio, video, CV, autonomous orchestration)
Dashboard tabs6
TypeScriptstrict mode, zero any
Determinism100% (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)