{"slug": "mcp-rtk-cut-90-of-mcp-server-tokens", "title": "MCP RTK: cut 90% of MCP server tokens", "summary": "Developer Thomas Tartrau built MCP RTK, an open-source Rust proxy that sits between Claude Code and MCP servers to filter tool responses before they reach the model's context. Across more than 38,000 commands, the tool reports saving 267 million tokens at an average reduction rate of 87%, roughly $4,000 in input-token costs on Opus 4.6. MCP RTK ships as a single binary with TOML-based presets for servers like GitLab, Grafana, and Sentry, and is distributed under the MIT license.", "body_md": "I use [Claude Code](https://dev.to/blog/en/claude-code-setup-2026) every day for development. Like many developers, I've connected several MCP servers (GitLab, Grafana, Sentry...) to give Claude direct access to my tools. The problem: every MCP call injects tens of thousands of tokens into the context, and the bill spirals fast.\n\nI built [MCP RTK](https://gitlab.com/ThomasTartrau/mcp-rtk) to fix this. It's an MCP proxy written in Rust that sits between Claude Code and MCP servers, filtering responses before they reach the model. Result: **over 267 million tokens saved** across my 38,000+ commands.\n\nThe MCP protocol ([Model Context Protocol](https://modelcontextprotocol.io/)) lets Claude interact with external tools. When Claude calls an MCP tool, the server returns a JSON response. The issue is that these responses often contain:\n\nA single `list_issues` call on GitLab can consume over 180,000 tokens. Claude only needs a fraction to answer the question. The rest is pure waste.\n\nOver a typical work session with 50 to 100 MCP calls, that easily adds up to 500,000 wasted tokens injected into the context.\n\nMCP RTK sits transparently between Claude Code and MCP servers. No workflow change needed: Claude keeps calling the same tools, but responses pass through a filtering pipeline before reaching the context.\n\nThe pipeline has 8 steps:\n\nEach step is independently configurable. You can enable or disable each filter, adjust thresholds, and define server-specific rules.\n\nConfiguration uses a TOML file. MCP RTK ships with community presets for popular servers:\n\n```\n[servers.gitlab]\npreset = \"gitlab\"\n\n[servers.grafana]\npreset = \"grafana\"\n\n[servers.sentry]\npreset = \"sentry\"\n```\n\nEach preset defines which fields to keep, which to exclude, and appropriate truncation thresholds for the server. For custom servers, you define rules directly:\n\n```\n[servers.my-api]\nwhitelist = [\"id\", \"name\", \"status\", \"created_at\"]\nmax_string_length = 500\nmax_array_length = 10\n```\n\nMCP RTK auto-detects installed MCP servers and offers to configure them.\n\nAcross my 38,000+ commands, MCP RTK has saved **267 million tokens** with an average reduction rate of 87%. On Opus 4.6 ($15/M input tokens), that's roughly **$4,000 in savings**:\n\nUseful information is preserved. Claude responds with the same accuracy, but consumes far fewer tokens per session. The `mcp-rtk gain` command lets you track savings in real time:\n\n```\nTokens saved:      267.1M (86.7%)\nEfficiency meter: █████████████████████░░░ 86.7%\n```\n\nMCP RTK is distributed as a single binary:\n\n```\ncargo install mcp-rtk\n```\n\nOne line change in your Claude Code config - wrap the existing MCP command with `mcp-rtk --`:\n\n```\n{\n  \"mcpServers\": {\n    \"gitlab\": {\n      \"command\": \"mcp-rtk\",\n      \"args\": [\"--\", \"npx\", \"-y\", \"@nicepkg/gitlab-mcp\"],\n      \"env\": { \"GITLAB_PERSONAL_ACCESS_TOKEN\": \"glpat-...\" }\n    }\n  }\n}\n```\n\nMCP RTK detects the upstream server from the command and loads the matching preset automatically.\n\nRust was a deliberate choice. The proxy must process every MCP response with minimal latency to avoid slowing down the workflow. Rust provides:\n\nMCP RTK is published under the MIT license on [GitLab](https://gitlab.com/ThomasTartrau/mcp-rtk) (mirror on [GitHub](https://github.com/ThomasTartrau/mcp-rtk)). Community presets are maintained by users: anyone can contribute their own configurations for new MCP servers.\n\nThe project is part of a tooling ecosystem I'm building around Claude Code, alongside [Skill Radar](https://gitlab.com/ThomasTartrau/skill-radar) (detecting repetitive patterns in sessions) and [Claude Deck](https://github.com/ThomasTartrau/claude-deck) (multi-workspace for parallel sessions). To learn how to write your own skills, see the guide on [effective skills](https://dev.to/blog/en/writing-effective-claude-code-skills). The [project page](https://dev.to/projects/mcp-rtk) has installation links and documentation.", "url": "https://wpnews.pro/news/mcp-rtk-cut-90-of-mcp-server-tokens", "canonical_source": "https://dev.to/thomastartrau/mcp-rtk-cut-90-of-mcp-server-tokens-aen", "published_at": "2026-09-11 16:54:06+00:00", "updated_at": "2026-09-11 17:14:04.454681+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents", "large-language-models", "ai-products"], "entities": ["MCP RTK", "Thomas Tartrau", "Claude Code", "Model Context Protocol", "GitLab", "Grafana", "Sentry", "Rust"], "alternates": {"html": "https://wpnews.pro/news/mcp-rtk-cut-90-of-mcp-server-tokens", "markdown": "https://wpnews.pro/news/mcp-rtk-cut-90-of-mcp-server-tokens.md", "text": "https://wpnews.pro/news/mcp-rtk-cut-90-of-mcp-server-tokens.txt", "jsonld": "https://wpnews.pro/news/mcp-rtk-cut-90-of-mcp-server-tokens.jsonld"}}