Urgent.News

What's breaking now, across thousands of outlets.

AI

Stop Hand-Crafting MCP JSON for Cursor and Claude Code: Sync Once, Cut 98% Discovery Tokens

Last Friday, while cross-debugging a payment refactoring branch, I had Cursor open on my left monitor for frontend reviews and Claude Code running in my terminal on the right. To let both AI assistants inspect database schemas and query logs, I hooked up 4 MCP servers to each environment. When you only use a couple of lightweight plugins, the overhead feels unnoticeable. But as your project…

Last Friday, the reporter faced a dilemma while cross-debugging a payment refactoring branch with Cursor open on one monitor and Claude Code running in a terminal on the other. To enable both AI assistants to inspect database schemas and query logs, the reporter connected 4 MCP servers to each environment. As projects grow in complexity, managing numerous specialized MCP tools becomes increasingly challenging.

The reporter noticed that simply typing a prompt to review transfer logic caused the context window usage indicator to surge halfway up the gauge before the reporter had even read any application code. The reporter realized that the AI assistants were being forced to memorize an entire phonebook of tool schemas before every single exchange, causing context budgets to vanish quickly.

The reporter discovered that switching between AI clients required manually duplicating the identical setup across fragmented JSON files scattered in hidden system directories, with errors arising from missing commas or misplaced environment variables. The reporter proposed a lightweight workflow, declaring servers once, syncing them across all coding assistants with a single command, and reducing the permanent discovery context footprint by over 98%.

The numbers showed that traditional full JSON ingestion required 71,929 tokens, while the compact name index mode reduced this to just 581 tokens, a 99.2% compression ratio. The root cause was configuration silos and the context tax. Cursor and Claude Code each maintain their own dedicated configuration, leading to repetitive and error-prone manual edits when changing settings.

The silent context tax occurred as the client injected every tool's name, argument structure, and type descriptions at the start of every conversation, even when only a single read-only SQL query was needed. The reporter outlined three steps to streamline tool management: centralize server declarations, push configurations to all environments with a single synchronization command, and enable the name index gateway, which reduces token usage by presenting compact tool names to the model and hydrating full schemas on demand when needed.

The reporter noted that lightweight setups with only a couple of small query tools would not benefit from this approach, while those with complex toolchains would see significant gains. The reporter mentioned mcptoon, a tool that bridges Cursor, Claude Code, and other agent environments via CLI while stripping away redundant context overhead, and encouraged readers to share their experiences with managing multiple MCP tools in the comments below.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

VoxBuddy

What I Built I built my friend a voice-note assistant that keeps their audio on their laptop My friend has a habit I think a lot of us have: they record voice notes whenever something comes to mind…

  • Prathamesh2007-o7 developed VoxBuddy for Hacktoberfest weekend.
  • VoxBuddy processes voice notes locally on user's machine.
  • App ensures privacy, offline functionality, and model customization.

More from Sunday 4 October →