Graft 🔌 MCP server Open source
Local codebase knowledge graph + MCP server that gives coding agents persistent structural context
- GitHub stars
- 9.5k
- Stars this week
- +288
- Forks
- 874
- Licence
- MIT
- Last push
- 2026-10-02
- Maintainer
- trailhq
npm install -g @nanonets/graft
graft initThird-party MCP servers run with your permissions. Read the source before installing, and prefer pinned versions.
Works with
Built on the open MCP standard, so it works in every app that supports MCP.
About Graft
What it does
Graft builds a local, linked-markdown knowledge graph of your codebase (via tree-sitter parsing plus optional LLM summarization) so coding agents can look up structure and context instead of re-exploring the repo from scratch on every task. Unlike a one-off grep or a static docs site, the graph tracks working-tree state, including uncommitted edits, and regenerates automatically as code changes, so it stays current mid-session.
Tools it gives your agent
- A CLI (
graft) to build, initialize and maintain the graph - An MCP server for native tool access from MCP-capable clients
- Deep, first-class integration with Claude Code, including a statusline and auto-sync
- Support for 23 languages, including TypeScript, Python, Go, Java, Rust and C++
- Optional LLM-generated summaries layered on top of the tree-sitter structural data
Works with
Claude Code (deepest integration), plus Cursor, Codex/OpenCode, Gemini, GitHub Copilot, Windsurf, Grok (xAI), Kiro and AdaL through its MCP server.
How to install
npm install -g @nanonets/graft
graft init
Can also be run without a global install via npx @nanonets/graft init.
Maintenance and safety
Actively maintained, MIT licensed, with 9k+ stars and 800+ forks. The graph is stored locally and is regenerable (not meant to be committed to your repo); telemetry is optional and anonymous and can be disabled. No code or file paths are sent anywhere without an explicit LLM-summarization request using your own provider key (OpenAI, Anthropic, OpenRouter, Fireworks, etc.). Treat the README's benchmark numbers ("up to 4x cheaper, 3x faster," SWE-bench gains) as vendor-reported rather than independently verified.
Who should use it
Developers working in large or unfamiliar codebases with Claude Code, Cursor, or similar agents who want to cut down on repeated file exploration and token spend by giving the agent a persistent, auto-updating map of the codebase's structure.
Pros
- Builds a local, auto-updating markdown knowledge graph (tree-sitter + optional LLM summarization) across 23 languages, tracking uncommitted working-tree state
- Deep, first-class Claude Code integration (statusline, auto-sync) plus MCP server and broad agent support (Cursor, Codex/OpenCode, Gemini, Copilot, Windsurf)
- Actively maintained (MIT, 8.8k stars, 806 forks); graph is local/regenerable, telemetry is optional, and no code is sent anywhere without an explicit LLM call u
Cons
- Headline performance claims ("up to 4x cheaper, 3x faster", +12 points on SWE-bench Verified) are vendor-reported benchmarks, not independently verified
- Value depends on an extra LLM-summarization pass during graph building, which adds its own token/cost overhead for large repos
Similar MCP servers
All developer tool MCP servers →GitHub MCP Server 🔌 MCP serverFree
GitHub's official MCP server: issues, pull requests, code, Actions and security alerts
XcodeBuildMCP 🔌 MCP serverOpen source
Build, run, test and debug iOS and macOS apps from AI agents, maintained by Sentry
Sentry MCP 🔌 MCP serverFreemium
Sentry's MCP server: pull errors, stack traces and issues into your agent
🔥 Sentry for Startups: up to $5,000 in credits (12-month expiry) for companies founded in the last 2 years with under $5M raisedMCP Reference Servers 🔌 MCP serverFree
The official reference MCP servers: fetch, filesystem, git, memory and more
Unity MCP 🔌 MCP serverOpen source
Lets AI agents drive the Unity Editor: scenes, C# scripts, assets, tests and builds
n8n-MCP 🔌 MCP serverFreemium
n8n node docs, templates and validation so agents build workflows that actually run
🔥 Startup Plan: 50% off the self-hosted Business plan (fewer than 20 employees, under €5M raised)