MCP Servers Eating 40k Tokens? Dev Open-Sources CLI to Save Context
gnoraz_theorc · reddit · 2026-08-01
The author measured that connecting a GitLab MCP server loads massive JSON Schemas upfront, consuming 40k tokens and severely eating into the context window.
To solve this, they built mduct, a CLI daemon tool:
- On-Demand Loading: Keeps connections in the background, maintains a minimal index in the prompt, and fetches full schemas from disk only when needed.
- Pipe Filtering: Uses shell pipes to process returned data, projecting only desired fields and reducing a 24k character payload to 1.7k.
- Concurrency & Nudging: Supports configurable per-server concurrent calls to speed up response times; notes that injecting tool names into the namespace effectively increases agent usage rates.
More from coding & agent
- Turning Claude Into a Personal Investment Agent with Live Market Data — blaizedsouza · 2026-08-01
- Stop Vibe Coding: How Amazon Drives AI Code Generation with Specs — blaizedsouza · 2026-08-01
- Build an Auto-Organizing AI Second Brain with Claude and Obsidian — blaizedsouza · 2026-08-01
- AI agents can merge code to main unattended but can't send an email: a paradox of safety boundaries — themaxthule · 2026-08-01
- Reddit user to livestream building 5 AI agents next week, asks community for ideas — tahpot · 2026-08-01
- Burning $700 to Refuse Work: Devs Frustrated by Claude Opus 'AI Psychosis' — repligate · 2026-08-01