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
- Subsola: a free open-source 3D map of underground utilities in 10 US cities, built with Claude Code — anselm · 2026-12-02
- "CI/CD is dead": Developer lays out the AI Software Factory replacing traditional pipelines — Pavan_Belagatti · 2026-12-02
- Codex lead confirms upgraded harness not shipped yet; current one 'will seem primitive in 2-3 months' — VraserX · 2026-12-02
- banger: open-source agent skill writes hit-style Suno songs hook-first — tetsuoai · 2026-12-02
- Agent skills cut AI music video generation to under 2 hours, Suno skill released — tetsuoai · 2026-12-02
- Redditor secretly undid Claude Code's work every 10s; agent honestly reported a "ghost" — 32minutos · 2026-12-02