๐ง Save 70โ95% tokens in Claude Code, Cursor, Windsurf & Cline. Local Tree-sitter code graph MCP server: surgical edit context instead of full-file reads, refactor safety checks, and a hook that blocks
surgical-context-mcp โ Surgical AST Code Context & Knowledge Graph for AI Coding Agents
Stop feeding 3,000-line files into your LLM context window. surgical-context-mcp is a zero-LLM-cost, embedded SQLite + Tree-sitter Code Knowledge Graph and MCP Server that gives AI coding agents (Claude Code, Cursor, Windsurf, Cline, Claude Desktop) the exact surgical context they need to edit, refactor, and navigate codebases safely โ cutting token consumption by 70โ95% without sacrificing code quality.
Real run on this repo: editing a function in a 1,264-line file costs ~3.7k tokens instead of ~13.3k (โ72%) โ and you still get the skeleton, callers and helpers.
That's it โ your agent now calls geteditcontext instead of reading whole files. Using Cursor, Windsurf, Cline or Claude Desktop? See Step 1. Also listed on the official MCP Registry as io.github.erayerturk/surgical-context-mcp.
0. Quick Start (30 seconds) 1. Why Use surgical-context-mcp? 2. How Much Does It Save & When Should You Use It? 3. Supported Languages & Ecosystem Resolvers 4. How It Works (Architecture) 5. Installation 6. How to Use (Step-by-Step Setup Guide) 7. Real Output Examples 8. MCP Tools Reference 9. CLI Reference 10. Recommended CLAUDE.md / .cursorrules Configuration
The 3 Core Problems with AI Coding Agents Today
1. Full-File Reads Burn Hundreds of Thousands of Tokens: When you ask an AI agent (or when it spawns subagents) to fix a bug or add a feature, its default instinct is to run Grep and then Read entire 1,500โ3,000 line files into the context window. Because every subsequent tool call re-sends the
From the project README.
Add the radar badge to your README โ it shows your project was picked up by MCP Radar and links to this page:
[](https://mcp.liqiwa.com/s/erayerturk--surgical-context-mcp.html)
Keep the signal. Cut the noise. Local CLI + MCP โ fold verbose tool output for Claude Code, Codex, Cursor & Desktop.
Novaya-AI/novgraphOpen-source client for Novgraph, Novaya's proprietary hosted code knowledge graph. Gives coding agents recorded intent, related-code context, ranked change impact and architecture context over MCP or
Farukes/TokenJarZero-cost token optimization engine for AI coding assistants (Claude Code, Cursor, Antigravity, Windsurf). Saves 70-95% tokens via AST skeletons, differential cache, and line slicing.
Graphicle-AI/graphicleCode graph and memory for your coding agents, in one Rust program. For Claude Code, Codex, Cursor and any MCP client.
ParsaVictor/code-context-engineLocal-first MCP context engine for AI coding agents โ cuts token cost ~90% via a per-project code graph + code folding. Works with Cursor, Claude Code, Codex & any MCP client. Web + ML/PyTorch codebas
HARSHNEXX/TokenMSLocal-first MCP server for intelligent code retrieval, AST-based indexing, relationship mapping, and token-efficient AI coding context.
The top new MCP servers of the week, every Monday. No spam, unsubscribe anytime.