</>MCP Agents Market
Plugin

Graft

by trailhq5.2kTypeScriptUpdated 2026-08-31

Turbocharge Claude Code, Cursor, Codex, Gemini & every coding agent: faster, cheaper, with contextual understanding specific to your codebase.

Claude CodeCursorCodexGeminiCopilotWindsurf

Graft is an open-source context layer for AI coding agents that builds a persistent knowledge graph of your codebase, enabling faster and cheaper agent operations. It integrates deeply with Claude Code, Cursor, Codex, Gemini, and other coding assistants by generating a local graph of markdown nodes that explain code architecture, dependencies, and relationships. The graph automatically refreshes as code changes, providing agents with contextual understanding without repeated exploration, reducing tool calls by 46%, tokens by 42%, and latency by 60% while improving correctness by 12 percentage points on SWE-bench Verified.

Key Features

Persistent codebase knowledge graph stored as linked markdown files that agents can read and traverse
Deep Claude Code integration with live statusline, auto-sync hooks, and blast-radius warnings after edits
Zero-cost structural code graph built with tree-sitter (no LLM needed for basic builds)
MCP server exposing six tools: graft_find_code, graft_file_api, graft_trace_calls, graft_find_all, graft_repo_map, graft_check_freshness
Automatic graph refresh on every query to reflect uncommitted working-tree changes
Support for 23 programming languages including TypeScript, Python, Go, Java, Rust, and C++
Multi-repo and monorepo support with scoped ranking and federated queries
Provider-agnostic LLM integration (OpenAI, Anthropic, OpenRouter, Groq, local models)

Use Cases

  • 01Reduce AI coding agent exploration overhead by providing pre-built codebase understanding
  • 02Enable agents to understand large codebases without re-reading files on every task
  • 03Track blast radius of code changes to identify dependent modules and affected tests
  • 04Onboard new team members or agents to unfamiliar repositories with architecture maps
  • 05Optimize agent token usage and response time on repetitive codebase queries
  • 06Maintain contextual awareness across multiple coding sessions without session memory loss

Related Plugins

View more

Graft — FAQ

What is Graft?+

Graft is a context layer that builds a persistent knowledge graph of your codebase and integrates with AI coding agents like Claude Code, Cursor, and Codex to provide faster, cheaper operations with better contextual understanding.

How do I install Graft?+

Install globally with npm install -g @nanonets/graft, then run graft init in your project directory to build the graph and wire it into your coding agents. The init command detects Claude Code, Cursor, and other agents automatically.

Which AI coding agents does Graft work with?+

Graft integrates with Claude Code (deep integration with hooks and statusline), Cursor, Codex, Gemini, Copilot, Windsurf, Kiro, Grok, and AdaL. It also provides an MCP server for any MCP-compatible client.

Do I need an API key to use Graft?+

The basic structural code graph (graft build) requires no API key and uses only tree-sitter parsing. The --deep mode that adds LLM-generated summaries requires an API key from OpenAI, Anthropic, OpenRouter, or another compatible provider.

Is Graft free and open source?+

Yes, Graft is open source under the MIT license. The structural graph generation is completely free. Optional LLM-powered enrichment uses your own API key and costs are based on your provider's rates.

How does Graft keep the graph fresh as code changes?+

Graft automatically refreshes the graph before every query by comparing working-tree file hashes. For Claude Code, post-edit hooks trigger automatic background rebuilds after code changes, keeping the graph synchronized with uncommitted edits.

How do I install Graft?+

Open the source repository on GitHub and follow its README. Graft is a plugin — MCP Agents Market links you directly to the official repo.

Is Graft free?+

Graft is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.

Related searches