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
- DeepMind turns coding agent Antigravity into a science tool, surfacing novel antimicrobial peptide in one session — pushmeet · 2026-10-16
- Cross-review coding workflow: Claude writes the plan, Codex audits it — theteknosaur · 2026-10-16
- Simon Willison: code mode is the future of tool calling, if it can be sandboxed — springrod · 2026-10-16
- Normalizing Claude's schema-free MCP output before it hits downstream n8n nodes — snowingbol · 2026-10-16
- Agent named 'Ilya' reportedly scores 1.1pt higher on benchmarks — daniel_mac8 · 2026-10-16
- A plain notes.md fixed my agent's cross-session amnesia better than chat history — rahul_watertech · 2026-10-16