Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words

Surgical Context MCP

by erayerturkversion 0.1.0i★ 4iRuns on your computerRepository ↗
Registry nameio.github.erayerturk/surgical-context-mcp

How to install

What it does

Local Tree-sitter code graph: surgical edit context for AI agents instead of full-file reads.

  • Connects Runs on your computer
  • Account or key No key needed
  • Category Developer tools

Use together with

Skills that teach the AI this kind of work; they work alongside this one

rea

Reverse engineer anything with agents, from app behavior down to native binaries.

by morluto★ 467,2351 skills

Skill · How-to guide

andrej-karpathy-skills

A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.

by multica-ai★ 234,1251 skills

Skill · How-to guideNo license stated

graphify

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

by Graphify-Labs★ 149,8731 skills

Skill · How-to guide

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity8/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness12/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score20/100

Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Let your AI install it with one sentence

Please install Surgical Context MCP. Follow https://mcp.popnx.com/i/erayerturk-surgical-context-mcp.md, show me the commands and wait for my OK before running them.

Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 13, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Surgical Context MCP for Claude on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "surgical-context": { "command": "uvx", "args": [ "surgical-context-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Surgical Context MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  3. Paste these settings and save the file

    {
      "mcpServers": {
        "surgical-context": {
          "command": "uvx",
          "args": [
            "surgical-context-mcp"
          ]
        }
      }
    }
  4. Quit Claude and open it again

  5. Try it

    Use Surgical Context MCP and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using Surgical Context MCP or shows a Surgical Context MCP tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect Surgical Context MCP yet

Surgical Context MCP runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect Surgical Context MCP

  • Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • Install Python (uv) on your computer first (one time)
  • Install Python (uv) on your computer first (one time)
  • Install Python (uv) on your computer first (one time)

B · Others in Developer tools that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Surgical Context MCP for Claude Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user surgical-context -- uvx surgical-context-mcp 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Surgical Context MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  3. Paste this command and press Enter

    claude mcp add --scope user surgical-context -- uvx surgical-context-mcp
  4. Type /mcp in Claude Code

    You should see Surgical Context MCP listed as connected

  5. Try it

    Use Surgical Context MCP and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using Surgical Context MCP or shows a Surgical Context MCP tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Surgical Context MCP for Cursor on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "surgical-context": { "command": "uvx", "args": [ "surgical-context-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Surgical Context MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  3. Open the AI chat in Cursor in Agent mode

  4. Try it

    Use Surgical Context MCP and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using Surgical Context MCP or shows a Surgical Context MCP tool in the answer, you are connected

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Surgical Context MCP for VS Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "surgical-context": { "type": "stdio", "command": "uvx", "args": [ "surgical-context-mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the Surgical Context MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  3. Open the AI chat in VS Code in Agent mode

  4. Try it

    Use Surgical Context MCP and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using Surgical Context MCP or shows a Surgical Context MCP tool in the answer, you are connected

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use Surgical Context MCP💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user surgical-context -- uvx surgical-context-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "surgical-context": {
      "command": "uvx",
      "args": [
        "surgical-context-mcp"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "surgical-context": {
      "command": "uvx",
      "args": [
        "surgical-context-mcp"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "surgical-context": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "surgical-context-mcp"
      ]
    }
  }
}

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

Downloads per weeki
56/wk
Connection
Runs on your computer
Latest versioni
0.1.0
Published to registryi
Nov 1, 2026
Code last changedi
Nov 1, 2026
Maker
erayerturk
Packages
pypi: surgical-context-mcp
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 19, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account erayerturk, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed 18 days ago

  • ✓ Pass

    Has a licence

    Uses MIT

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

No entries on OSV.dev for surgical-context-mcp@0.1.0

Checks only this package version, not every dependency · checked Nov 15, 2026

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/erayerturk-surgical-context-mcp.svg)](https://mcp.popnx.com/en/servers/erayerturk-surgical-context-mcp)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Developer toolsi

  • More stars than 83% of the other 6116 servers in this category
  • Published to the registry more recently than 61% of the other 6116 servers in this category
  • Basic checks equal to or better than 99% of the other 6116 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is Surgical Context MCP safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed 18 days ago, and the latest version (0.1.0) reached the registry 18 days ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv) on your computer.

What can I use instead?

In the same category: GitDiagram, Appllama, Cloudflare MCP, Omnara, Repowise

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

GitDiagram

Architecture diagrams, explanations and Mermaid source for public GitHub repositories.

by ahmedkhaleel2004Widely used★ 19KUpdated 2 months ago

Runs in the cloud✓ service owner · gitdiagram.comTried by the PopNx team

Appllama

Study screens, flows and paywalls from top-earning iOS apps, then build from what wins.

by AppllamaWidely used★ 5.2KUpdated 3 months ago

Runs in the cloud✓ service owner · appllama.io

Repowise

Codebase intelligence for AI coding agents: graph, git history, docs, decisions, code health.

by repowise-devWidely used↓ 6.5K/wk★ 8.2K Stars for the whole repoUpdated 6 days ago

Computer or cloud✓ service owner · repowise.dev
Compared with similar ones
This one
Surgical Context MCP
GitDiagramAppllamaCloudflare MCPOmnaraRepowise
Runs whereInstalls on your computerRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installCloud or install on your computer
Needs a keyNoNoNoNoNoNo
Add with + in ClaudeNoNoNoYesNoNo
Basic checks3/34/44/44/44/45/5
LicenseMITMITMITApache-2.0Apache-2.0AGPL-3.0
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

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.

⚡ Quick Start (30 seconds)

# 1. Install (or: pipx install / pip install surgical-context-mcp)

uv tool install surgical-context-mcp

2. Register with Claude Code

claude mcp add code-graph -- code-graph serve

3. Index your project + install the token-saving guard hook

code-graph install-hooks /path/to/your/project

That's it — your agent now calls get_edit_context 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.


Table of Contents

  1. Quick Start (30 seconds)
  2. Why Use surgical-context-mcp?
  3. How Much Does It Save & When Should You Use It?
  4. Supported Languages & Ecosystem Resolvers
  5. How It Works (Architecture)
  6. Installation
  7. How to Use (Step-by-Step Setup Guide)
  8. Real Output Examples
  9. MCP Tools Reference
  10. CLI Reference
  11. Recommended CLAUDE.md / .cursorrules Configuration

Why Use surgical-context-mcp?

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 entire conversation history (cache reads), a single large file read early in a session compounds into 100k–300k wasted tokens.
  2. Narrow Line-Range Reads Cause Hallucinations & Code Duplication: If you force an agent to read only lines 240–260 of a file to save tokens, the agent becomes blind to:
  • Class attributes, self.x fields, @onready / @export variables, constants, and struct / interface definitions at the top of the file.
  • Helper functions that already exist in the same file (causing the LLM to write duplicate code).
  • How callers actually pass arguments to the function (±5 lines around call sites).
  • The file's coding style (indentation, typing conventions, error handling idioms).
  1. Pure Static AST Graphs Miss Dynamic Dispatch & Scene/Template Wiring: Standard call graphs only see static foo() calls. If a function is invoked via getattr(obj, "foo") in Python, call("foo") or a .tscn signal connection in Godot, SendMessage("foo") in Unity/C#, or referenced in a .vue/.html/.proto file, a naive graph reports *"0 callers — safe to delete"*, breaking production code.
How surgical-context-mcp Solves All Three
  • `get_edit_context(symbol)` — One Call Before Any Edit: Instead of reading a 2,500-line file, the agent makes one MCP call (get_edit_context) and receives a strictly budgeted (≤ 4,000 tokens) surgical package containing:
  1. Target Function Full Body (with exact line numbers for Edit)
  2. File Skeleton (all imports, interface/struct/enum blocks, class fields, constants — without other function bodies)
  3. Used Members & Direct Callees (definitions of class fields used by the target function + full bodies of short same-file helpers ≤ 25 lines)
  4. Direct Callers (`d=1`, `±5` Line Windows) (exact call-site context without dumping 200-line caller functions)
  5. Other Function Signatures in the File (so the agent reuses existing helpers instead of duplicating them)
  6. Style Hints & Coverage Warnings (flags dynamic string calls, .tscn connections, templates, and protocol references)
  • `check_rename_or_delete(symbol)` — One Call Before Any Refactor: Checks AST callers (exact/scoped), inheritance overrides across parent/child classes, .tscn/template connections, signal emit/connect sites, and workspace-wide dynamic string references.
  • Cross-Language Contracts (`shares_contract`) — Server ↔ Client ↔ Config in One Call:
  • Protocol Opcodes (`contract::opcode::0xCC`): Automatically links hex opcode constants across languages (e.g., Go OpSGMOnline = 0xCC and GDScript/TypeScript const S_GM_ONLINE = 0xCC), so querying either constant shows both server senders and client packet handlers together.
  • Config & Schema Keys (`contract::config:: `): Automatically links Go struct json:"max_chars_per_ip" field tags, frontend/panel schema strings ('multi_guard.max_chars_per_ip'), and seed/*.json config entries ("max_chars_per_ip": 2) into a single shared contract node.
  • Data, Seed & Translation (`i18n`) Graph (`check_translations`): Indexes seed/*.json, shared/maps/*.json, locales/*.json, and .po files alongside code. Links tr("...") and noticeT(..., "n.x") calls to locale definitions and audits missing keys, accidental raw non-key literals, %d/%s/{} placeholder count mismatches, and unused locale keys.
  • Automated Test Discovery (`tests_for`) & Git Diff Blast Radius (`get_diff_impact`):
  • tests_for(symbol) identifies every test exercising a symbol and returns the exact runnable CLI command (go test ./pkg -run '^TestFoo$', godot --headless --path client -s tests/..., pytest ... -k ...).
  • get_diff_impact(base_ref="HEAD") parses git diff hunks, maps changed lines to modified AST symbols, and reports their callers, affected cross-language contracts, and runnable test commands in one call — built for code-review subagents (final-reviewer).
  • Concept Search & Engine Lifecycle Noise Suppression:
  • Indexes inline/preceding comments and docstrings (doc_comment) so searching by concept (e.g. "attack stat") finds KOAP (// attack power stat bonus).
  • Recognizes engine-invoked virtual callbacks (_ready, _draw, _process, _physics_process, _input, Awake, Update) and suppresses false text-match noise warnings when AST upstream is empty.
  • Direct Token Savings Telemetry (`get_token_savings`): Every MCP/CLI query records its returned token count vs. the raw token size of touched files in SQLite (usage_telemetry), answering *"How many tokens did code-graph save?"* with direct measurements instead of estimates.
  • Zero LLM Indexing Cost & Sub-Second Speed: Built on native C Tree-sitter grammars and embedded SQLite (WAL mode). Indexes ~600 files in `< 0.6` seconds using 0 API tokens, and automatically refreshes modified files (mtime + SHA-1) on every query.
  • Enforced via Claude Code `PreToolUse` Hook: Includes a built-in hook guard (code-graph install-hooks) that blocks unbounded `Read` calls on files `> 300` lines and returns the file's AST symbol table (Lstart-end: signature), ensuring both main agents and subagents stay on the surgical path.

How Much Does It Save & When Should You Use It?

1. Token & Cost Economics (Single-Turn vs. Multi-Turn Compounding Savings)

In agentic coding tools (Claude Code, Cursor, Cline), every tool call re-sends the entire conversation history up to that point. When an agent reads a 2,500-line file (~22,000 tokens) on Turn 2 of a 12-turn coding task, those 22,000 tokens are billed on Turn 2, Turn 3, Turn 4 ... all the way to Turn 12 (22,000 × 10 = 220,000 cumulative context tokens).

By replacing full-file reads with get_edit_context (~2,500–3,500 tokens), surgical-context-mcp prevents context bloat from compounding across turns.

Benchmark Across Common Developer Tasks

*(Measured on a 593-file multi-language repository: 2,607-line Godot client controller + Go backend + JS web dashboard)*

Developer ScenarioStandard Agent (Read + Grep)With surgical-context-mcpDirect Token Savings10-Turn Compounded Savings
1. Initial Repo Orientation ("How is this codebase structured?")~18,500 tokens (multiple ls, Glob, Read calls)`~650` tokens (GRAPH_REPORT.md / get_architecture_map)96% fewer tokens~178,000 tokens saved
2. Modifying a Function in a Large File (2,607 lines)~22,400 tokens (reads whole target file + 1 caller file)`~2,900` tokens (get_edit_context returns skeleton + body + callers)87% fewer tokens~195,000 tokens saved
3. Tracing an End-to-End Request / Event Flow (Client -> Packet -> Server Handler)~31,000 tokens (grepping strings and reading 4–6 files)`~1,200` tokens (find_flow + get_symbol_impact)96% fewer tokens~298,000 tokens saved
4. Safe Refactoring / Dead-Code Deletion ("Can I delete or rename this method?")~14,000 tokens (grepping & reading candidate files; still misses dynamic refs)`~450` tokens (check_rename_or_delete checks AST + overrides + .tscn + dynamic strings)97% fewer tokens~135,000 tokens saved
5. Multi-Subagent Parallel Execution (Spawning 2–3 subagents for backend/frontend)200,000–350,000 tokens (each subagent independently reads huge files)`35,000–60,000` tokens (PreToolUse hook blocks >300L reads in all subagents)80–85% fewer tokensPrevents rate-limits & context compaction

2. When Does surgical-context-mcp Provide the Biggest Gains?
High-Impact Scenarios (80%–97% Savings & Higher Code Accuracy)
  • Large or Monolithic Source Files (`300` to `5,000+` lines): Game controllers (main.gd, PlayerController.cs), large backend services (`s

Only the beginning is shown; read the rest in the repo