WeaveGraph MCP Server
# WeaveGraph
**Semantic Code-Graph Worktree Scheduler, Min-Cut Multi-Agent Task Partitioner & 3-Way AST Semantic Merge Verifier**
WeaveGraph solves the #1 bottleneck identified across the Global GitHub AI-500 & Complexity-100 Atlas (`AI Coding Agents & Dev Harnesses`, 121 repos): parallel coding agents (`Claude Code`, `Codex`, `OpenCode`, `Orca`) running in `git worktree` lanes frequently edit coupled files and pass text-based `git merge` cleanly while silently breaking function signatures, keyword parameters, imports, or schema fields.
## Key Capabilities
1. **Native C++20 CSR Graph Engine (`csrc/weavegraph_kernels.cpp`):**
- Iterative **Tarjan Strongly Connected Components** ($O(V+E)$)
- Shortest-hop **Reverse-Dependency Blast Radius BFS**
- **Fiduccia-Mattheyses / Kernighan-Lin Min-Cut Partitioning** minimizing cross-agent coupling across $K$ parallel git worktrees
- **Topological Dependency Wave Scheduling** over condensed SCC DAGs
2. **3-Way Semantic AST Merge Verifier (`verify-merge`):**
- Catches 5 classes of silent cross-agent contract breaks invisible to `git merge`: `SIGNATURE_ARITY_BREAK`, `REMOVED_KEYWORD_PARAM`, `DANGLING_IMPORT_OR_SYMBOL`, `CONTRACT_FIELD_REMOVED`, and `DUPLICATE_DEFINITION_CLASH`.
3. **Drop-In CLI, FastAPI REST Server & Stdio MCP Server (`.mcp.json`):**
- Exposes `weavegraph_index_repo`, `weavegraph_blast_radius`, `weavegraph_plan_worktrees`, and `weavegraph_verify_merge` to Claude Code, Cursor, and Codex.
4. **Interactive React 18 + TypeScript Workbench (`ui/`):**
- Visualizes worktree lanes, cross-agent coupling reduction, semantic merge violations, and blast-radius hops.
## Quickstart
```bash
uv sync --python 3.13 --all-extras
uv run weavegraph demo
uv run weavegraph scan .
uv run weavegraph plan . --agents 3
uv run weavegraph serve --port 8150
```
## Verification & Quality Gates
```bash
uv run ruff format --check src tests
uv run ruff check src tests
uv run mypy src tests
uv run pytest --cov=weavegraph --cov-report=term-missing --cov-fail-under=95
cd ui && npm ci && npm run build
```
---
## Author, LinkedIn & Enterprise AI Architecture Hub
Built by **[Nagarjuna Reddy Kamireddy](https://nagarjunak-pixel.github.io/)** (*Nagarjuna Kamireddy / Nagarjuna K*) — Lead AI Architect | Production Agentic AI, Hybrid RAG & LLM Evals (750K+ Workflows/Yr) | Ex-John Deere, GSK, Deloitte | AWS SA Pro & NVIDIA Agentic AI Certified.
- **Official LinkedIn & Daily Newsletter:** [linkedin.com/in/nagarjuna-kamireddy](https://www.linkedin.com/in/nagarjuna-kamireddy/) · [Autonomous SAP & Enterprise AI Newsletter](https://www.linkedin.com/newsletters/autonomous-sap-enterprise-ai-7528104436112441348/)
- **Canonical Portfolio & All 50 GitHub Projects:** [nagarjunak-pixel.github.io](https://nagarjunak-pixel.github.io/) · [Complete GitHub Atlas](https://nagarjunak-pixel.github.io/github-projects-atlas.html) · [`llms-full.txt`](https://nagarjunak-pixel.github.io/llms-full.txt)
TDQS
Scored across 4 tools
Each tool targets a clearly distinct operation: indexing, merge verification, blast-radius computation, and worktree planning. There is no meaningful overlap in purpose or likely inputs/outputs.
All tools use the same weavegraph_ snake_case prefix and mostly follow a verb_noun pattern. The exception is weavegraph_blast_radius, which omits an explicit verb such as compute_.
Four tools is a tight, well-scoped surface for this specialized graph-analysis workflow. Each tool earns its place without obvious redundancy.
The set covers indexing, impact analysis, merge safety, and parallel worktree planning, which is strong lifecycle coverage. It lacks a direct tool for querying or inspecting the indexed dependency graph beyond derived analyses.