back to posts
#38 Part 4 2026-01-09 10 min

How 1,247 Tools Became Usable Overnight, Thanks to a Hidden Claude Code Flag

The hidden flag that turned our impossible blockchain MCP ecosystem into production infrastructure

How 1,247 Tools Became Usable Overnight, Thanks to a Hidden Claude Code Flag

How 1,247 Tools Became Usable Overnight, Thanks to a Hidden Claude Code Flag

I built 24 blockchain MCP servers. Together they had 1,247 tools. And they were completely unusable - until one Claude Code environment variable changed everything.


The Infrastructure I Built

Over the past year, I created an ecosystem of MCP servers, many for blockchain development:

8 Mainnet Servers:

15 Testnet Servers:

Plus utility servers:

Total: 1,247 tools across 24 blockchain MCPs and 10 utility MCPs.

The problem? I couldn’t use them.


The Math That Broke Everything

Every MCP tool has a JSON schema - parameter names, types, descriptions, validation rules. Claude Code loads ALL schemas into context at startup.

Here’s what my blockchain ecosystem actually cost:

Mainnet Servers

ServerToolsEst. Tokens% Context
algorand-mcp-server25~5,0002.5%
aptos-mcp-server34~6,8003.4%
bitcoin-mcp-server116~23,20011.6%
cardano-mcp-server25~5,0002.5%
hedera-mcp-server25~5,0002.5%
polkadot-mcp-server25~5,0002.5%
stellar-mcp-server25~5,0002.5%
tezos-mcp-server25~5,0002.5%
Mainnet Subtotal156~50,80025.4%

Testnet Servers (The Heavy Hitters)

ServerToolsEst. Tokens% Context
osmosis-testnet165~33,00016.5%
bitcoin-testnet116~23,20011.6%
evm-chains116~23,20011.6%
solana-devnet88~17,6008.8%
cosmos-theta84~16,8008.4%
bsc-testnet83~16,6008.3%
worldchain-testnet80~16,0008.0%
near-testnet54~10,8005.4%
base-sepolia44~8,8004.4%
arbitrum-sepolia41~8,2004.1%
ethereum-sepolia39~7,8003.9%
sui-testnet11~2,2001.1%
nft-pipeline4~8000.4%
nft-utils4~8000.4%
Testnet Subtotal929~185,80092.9%

The Total

CategoryToolsTokens% Context
Utility MCPs134~33,00016.5%
Blockchain Mainnet156~50,80025.4%
Blockchain Testnet929~185,80092.9%
TOTAL1,247~255,600127.8%

127.8% of context. Claude’s window is 200,000 tokens. My infrastructure needed 255,600 just for tool schemas.

It literally could not fit.


Discovering the Problem

I built these servers, started testing them, and watched my context window evaporate. That’s when I learned MCP schemas were front-loaded - every tool definition injected into context at startup, whether you used it or not.

Most people hadn’t encountered this yet. In early 2025, MCP was still new. Most developers weren’t building MCP servers. Most weren’t even installing them. The few who were typically had 2-3 simple servers with a handful of tools.

I had 24 servers with 1,247 tools. I hit the wall that others wouldn’t see for months.

So I waited. Lazy loading is a solved pattern - I figured someone would implement it eventually. In January 2026, paddo.dev discovered Claude Code had quietly added an experimental flag. The wait was over.


The Fix: One Environment Variable

ENABLE_EXPERIMENTAL_MCP_CLI=true

Add this to ~/.claude/settings.json:

{
  "env": {
    "ENABLE_EXPERIMENTAL_MCP_CLI": "true"
  }
}

Quit Claude Code completely. Restart. Done.

Before: 255,600 tokens for schemas (impossible) After: ~500 tokens for CLI instructions

The entire 1,247-tool ecosystem became usable overnight.


How It Works

Instead of front-loading all schemas, Claude discovers tools on-demand:

CommandPurpose
mcp-cli serversList connected MCP servers
mcp-cli tools [server]List available tools
mcp-cli grep <pattern>Search tool names/descriptions
mcp-cli info <server>/<tool>Get schema (REQUIRED before call)
mcp-cli call <server>/<tool> '<json>'Invoke the tool
mcp-cli call <server>/<tool> -Invoke via stdin

The flow:

  1. Claude searches for relevant tools
  2. Claude fetches only the schemas it needs
  3. Claude invokes the tools
  4. Results return through stdout

You only pay for what you use.


Critical Gotchas

mcp-cli is an Alias, Not a Binary

This is the biggest thing tutorials miss: mcp-cli only exists within a Claude Code session. You cannot:

It only works when Claude invokes it through the Bash tool.

Info Before Call is MANDATORY

This isn’t optional. The system requires mcp-cli info before mcp-cli call. Think of it like “Read before Edit.”

# WRONG
mcp-cli call server/tool '{"param": "value"}'

# RIGHT
mcp-cli info server/tool
mcp-cli call server/tool '{"param": "value"}'

JSON Escaping

For complex JSON, use stdin:

mcp-cli call server/tool - <<'EOF'
{
  "key": "value with 'quotes'"
}
EOF

What This Actually Enables

The flag doesn’t just save tokens. It enables entirely new patterns:

1. MCP Stacking

Run 10+ complex MCPs simultaneously. Before: impossible. After: routine.

I can now have Osmosis (165 tools), Bitcoin testnet (116 tools), and EVM chains (116 tools) all active in the same session. That’s 397 tools from three servers alone.

2. Specialized Ecosystems

Build domain-specific tool suites without worrying about context budget. Blockchain, AI orchestration, DevOps automation - pick your domain, build deep tooling.

3. Production Infrastructure

MCPs become viable for real enterprise use. You can build comprehensive tooling knowing the delivery mechanism won’t break under scale.


The Two Audiences

For casual users: “Save 30k tokens on startup.”

For power users: “This flag is the difference between MCP being a toy and MCP being production infrastructure.”

I had 1,247 tools sitting unused because the delivery mechanism was broken. The flag fixed it overnight.


How We Measured This

  1. Counted tool files in each server’s src/tools directory
  2. Measured actual schema sizes from existing MCPs (ranged 276-5,305 characters)
  3. Used ~200 tokens per tool as conservative average
  4. Claude’s context window is 200,000 tokens

The methodology is reproducible. Count your tools, multiply by 200, divide by 200,000.


Setup Summary

  1. Add to ~/.claude/settings.json:
{
  "env": {
    "ENABLE_EXPERIMENTAL_MCP_CLI": "true"
  }
}
  1. Quit Claude Code completely (Cmd+Q)

  2. Restart Claude Code

  3. Verify with mcp-cli servers

The flag is global. Set it once, works everywhere.


The Bigger Picture

This flag represents a pattern shift in how AI tools handle extensibility.

The naive approach - load everything upfront - doesn’t scale. As ecosystems grow, context becomes the bottleneck. Lazy loading is the inevitable solution.

Claude Code shipped it as an experimental flag. It will likely become default behavior. But for now, you have to opt in.

If you’re building serious MCP infrastructure, opt in today. The difference is night and day.


Credit to paddo.dev for discovering the flag. This post documents what happens when you actually stress-test it with production-scale tooling.