Making MCP cheaper via CLI

Published: (February 25, 2026 at 03:29 PM EST)
4 min read

Source: Hacker News

Every AI agent using MCP is quietly overpaying. Not on the API calls themselves – those are fine. The tax is on the instruction manual.

Before your agent can do anything useful, it needs to know what tools are available. MCP’s answer is to dump the entire tool catalog into the conversation as JSON Schema. Every tool, every parameter, every option.

CLI does the same job but cheaper.

Same tools, different packaging

I took an MCP server and generated a CLI from it using CLIHub. Same tools, same OAuth, same API underneath. Two things change: what loads at session start, and how the agent calls a tool.

The numbers below assume a typical setup: 6 MCP servers, 14 tools each, 84 tools total.

1. Session start

MCP dumps every tool schema into the conversation upfront. CLI uses a lightweight skill listing – just names and locations. The agent discovers details when it needs them.1

MCP loads this (~185 tokens × 84 = 15 540):

{
  "name": "notion-search",
  "description": "Search for pages and databases",
  "inputSchema": {
    "type": "object",
    "properties": {
      "query": {
        "type": "string",
        "description": "The search query text"
      },
      "filter": {
        "type": "object",
        "properties": {
          "property": { "type": "string", "enum": ["object"] },
          "value": { "type": "string", "enum": ["page", "database"] }
        }
      }
    }
  },
  {
    "name": "notion-fetch",
    ...
  }
  // … (84 tools total)
}

CLI loads this (~50 tokens × 6 = 300):


  
    notion
    CLI for Notion
    ~/bin/notion
  
  
    linear

  
  

2. Tool call

Once the agent knows what’s available, it still needs to call a tool.

MCP tool call (~30 tokens):

{
  "tool_call": {
    "name": "notion-search",
    "arguments": {
      "query": "my search"
    }
  }
}

CLI tool call (~610 tokens):

# Step 1: Discover tools (~4 + ~600 tokens)

$ notion --help
notion search  [--filter-property ...]
  Search for pages and databases
notion create-page  [--parent-id ID]
  Create a new page
... 12 more tools

------------------------------------------------

# Step 2: Execute (~6 tokens)

$ notion search "my search"

MCP’s call is cheaper because definitions are pre‑loaded. CLI pays at discovery time – --help returns the full command reference (~600 tokens for 14 tools), then the agent knows what to execute.

Token comparison

Tools usedMCP (tokens)CLI (tokens)Savings
Session start~15 540~30098 %
1 tool~15 570~91094 %
10 tools~15 840~96494 %
100 tools~18 540~1 50492 %

CLI uses roughly 94 % fewer tokens overall.

Anthropic launched Tool Search, which loads a search index instead of every schema and then fetches tools on demand. It typically drops token usage by 85 %.

Same idea as CLI’s lazy loading. But when Tool Search fetches a tool, it still pulls the full JSON Schema.2

Token comparison

Tools usedMCP (tokens)Tool Search (TS) (tokens)CLI (tokens)Savings vs TS
Session start~15 540~500~30040 %
1 tool~15 570~3 530~91074 %
10 tools~15 840~3 800~96475 %
100 tools~18 540~12 500~1 50488 %

Tool Search is more expensive, and it’s Anthropic‑only. CLI is cheaper and works with any model.

CLIHub

I struggled finding CLIs for many tools, so I built CLIHub, a directory of CLIs for agent use.

  • Open‑sourced the converter – a single command (clihub) creates CLIs from MCP definitions.
  • I like using the formatting of Openclaw’s available_skills block for CLI. It can be modified to other formats.
  • Tool Search: ~500 tokens at session start + ~3 K per search (loads 3‑5 tools) + ~30 per call. Assumes 1 search for 1‑10 calls, 3 searches for 100 calls.

Footnotes

  1. The agent discovers tool details only when it needs them, rather than loading every schema up front.

  2. Even with lazy loading, Tool Search still retrieves the full JSON Schema for each fetched tool.

0 views
Back to Blog

Related posts

Read more »

The whole thing was a scam

Probably you already saw how it all turned out. On the very same day that Sam Altman offered public support to Dario Amodei, he signed a deal that effectively t...