NanoNets just dropped Graft, a CLI that could fundamentally reshape how AI coding agents navigate large codebases. Instead of relying on Model Context Protocol (MCP) tool calls to explore files at runtime—which burns through tokens and latency—Graft builds a persistent semantic map once and keeps it updated via hooks. The result: Claude Code becomes dramatically more efficient at understanding your codebase's architecture without constantly polling the filesystem.
Why MCP Tool Calls Are a Bottleneck
Traditional AI coding agents using MCP must make repeated tool calls to read files, search directories, and understand project structure during every task. This exploration overhead adds up fast—especially in monorepos or projects with thousands of files. Each Read, Glob, or Grep call costs tokens and introduces latency. Graft sidesteps this by pre-computing a semantic understanding of your code that Claude Code can query directly through the graft command instead of spawning dozens of filesystem operations.
How It Works
Install Graft via npm, run graft init, and it scans your codebase to generate a persistent semantic map wired into Claude Code through hooks. When you ask Claude Code to work on a task, it queries this pre-built map rather than making dozens of exploratory tool calls. The tool automatically updates the map as files change, keeping context fresh without runtime overhead.
Performance Claims
Graft's developers report achieving 66% on SWE-bench Verified—a benchmark measuring an agent's ability to resolve real software engineering issues from open-source projects. While cross-benchmark comparisons require caution, this figure suggests meaningful improvement over baseline approaches that rely purely on MCP tool calls for codebase exploration. The key differentiator: Graft agents spend fewer tokens and API calls on exploration, potentially reducing costs significantly.
Key Takeaways
- Graft builds a persistent semantic map of your entire codebase via
graft init - Integration with Claude Code happens through hooks—no custom prompt engineering required
- Reduces exploratory tool calls by providing pre-computed context
- Benchmarks at 66% SWE-bench Verified, though real-world performance will vary by project type
- Open-source from NanoNets, installable immediately via npm
The Bottom Line
Graft represents a pragmatic shift in how we think about agent-context—moving from lazy runtime exploration to proactive indexing. Whether it actually delivers on its benchmark claims at scale remains to be seen, but the core idea of semantic pre-computation for AI coding agents is sound and overdue.