Reducing MCP token usage by replacing servers with CLI alternatives

Token optimization through MCP server reduction
A developer discovered that each MCP server added to their setup was dumping its entire tool schema into the context window with every message, consuming 30-40% of their available context. This was causing them to hit context limits faster than expected.
Specific MCP-to-CLI replacements
After auditing their setup, they identified several MCP servers that had CLI equivalents and made these replacements:
agentmail mcp → agentmail cli(installed vianpm install -g agentmail-cli) - allows Claude to manage inbox, send emails, and check messages through bashgithub mcp → gh cli- using commands likegh issue createandgh pr listpostgres mcp → psql- using commands likepsql -c "select * from users"
MCP servers kept in the setup
Two MCP servers were retained because they lacked good CLI alternatives:
- playwright mcp - for browser automation tasks
- memory mcp - for persistent memory functionality
Resulting configuration and rule
The developer reduced their MCP server count from 6 to 2 while maintaining all previous functionality. They established a new rule: "if there's a CLI, skip the MCP. Only add MCPs for stuff that genuinely doesn't have a command line option." This change made their context window feel larger and reduced how often they hit limits.
📖 Read the full source: r/ClaudeAI
👀 See Also

Building a Developer Portfolio with Claude Code: A Junior Dev's Workflow and Lessons Learned
A 21-year-old junior MERN stack dev shares how he built nidhil.live using Claude Code, emphasizing the importance of specific prompting and understanding generated code instead of blind copy-pasting.

Day 1 Configuration: Prevent 90% of Common OpenClaw Problems
Set spending limits, write a SOUL.md, and adjust heartbeat interval to avoid surprise bills, rogue behavior, and cost shock.

Multi-model routing reduces OpenClaw API costs by 50%
A developer cut OpenClaw API costs by 50% by routing different tasks through different models: Claude for complex reasoning, DeepSeek for file operations and test generation, and Gemini or GPT for mid-range tasks.

OpenClaw Agents Become Unresponsive After Week 1: Telegram Integration Issues?
User reports OpenClaw agents going silent after the first week, suspecting Telegram integration or long-term runtime issues. Restarts help temporarily.