Your AI agent is wasting tokens on every MCP you connect (here's the fix)
So, just looking to continue the conversation regarding token efficiency, yesterday I told you guys about lazy loading your MCPs. Now, as of January, Anthropic pretty much ships this natively by default. It's called tool search.
Previously, it was enable experimental MCP CLI. But, anyone running a version of Claude code that hasn't been updated since January, you're probably still loading full MCP schemas and it's getting re-ingested in your contacts on every turn, which is causing the context blow. But, there's another really efficient way to call tools that not everybody's really talking about and that's CLIs.
Think of CLI as just a native language for the most part the LLMs know by heart. These models were trained on this, no different than English. When they need to call a tool, they're able to write a single command line for exactly how to call that tool, regardless of what program, app, or whatever they're connecting to.
Whereas, MCPs, even with the lazy load, aka tool search, the model still has to pull the schema, which is the instructions of how to use that tool. And that instruction, that schema, stays in context and gets re-ingested on every single turn. In 2024, when Anthropic made MCPs kind of the go-to, every company raced to build out MCPs for agents to connect to, which was great.
But, what we're seeing is as these models are getting larger, a lot of companies are starting to lean back into CLI, which has been around since like the '60s or '70s. With the CLI, your agent already knows the exact command line that it needs to be able to call your calendar. No instructions, nothing to bring into it.
It simply just executes. Google finally released their CLI. You don't have to use gog.exe anymore.
Firecrawl, GitHub, Brave Search, uh Notion, there's a lot of them. These are allowing these agents to really maximize your context windows and not have to consistently and continuously re-digest instructions for every single tool call. Another benefit to CLIs is they can run outside of your session.
Your Cloud Code session does not have to be active. So, when it comes to automation, CLIs are definitely the way to go, as well as just being much more efficient.
See this running in your business — free 30-minute consultation