---
title: "CLI vs MCP: 35x Token Overhead, 28% Failures, SWE-Bench Deltas"
slug: "cli-vs-mcp-token-overhead-swebench-ci-benchmark"
description: "Quantitative comparison of CLI agents vs MCP servers: 4x-80x token overhead, 28% MCP timeout failures, SWE-Bench 78% vs Terminal-Bench 58%, with CI harness configs."
author: "Hamdi Soudani"
category: "ai-coding-agents-mcp"
archetype: "benchmark-index"
published_at: "2026-11-21T08:39:31.24311+00:00"
updated_at: "2026-11-21T10:22:00.138+00:00"
canonical_url: "https://pyvren.com/blog/cli-vs-mcp-token-overhead-swebench-ci-benchmark"
reading_time_minutes: 4
word_count: 683
quality_score: 99
tags: ["cli-agents","mcp-servers","swe-bench","terminal-bench","token-overhead","ci-cd"]
keywords: ["cli vs mcp token overhead","mcp 35x token overhead","mcp failure rate 28 percent","swe-bench verified scores 2026","terminal-bench coding agents","mcp schema token cost","cli agent ci pipeline","progressive disclosure mcp"]
sources: ["https://github.com/0sparsh2/GAX/blob/main/mcp_vs_cli_benchmarks_2026/report.md","https://github.com/scalekit-inc/mcp-vs-cli-benchmark","https://presenc.ai/research/coding-agent-benchmarks-2026","https://docs.bswen.com/blog/2026-03-17-mcp-vs-cli-token-overhead/","https://arxiv.org/html/2610.30157v1"]
---

# CLI vs MCP: 35x Token Overhead, 28% Failures, SWE-Bench Deltas

> **TL;DR:** MCP adds 4x-80x token overhead vs CLI (32x median) and 28% run failures from remote timeouts; CLI wins on token efficiency and reliability for local workflows, MCP required for multi-tenant governance and credential isolation.

## Key Facts

- **MCP token overhead vs CLI (Scalekit, 75 runs):** 4x–32x median, up to 80x on complex tasks (Summarize PRs: 400k vs 5k tokens) ([source](https://github.com/scalekit-inc/mcp-vs-cli-benchmark))
- **MCP run failure rate (remote Copilot MCP):** 28% (18/25 runs failed with ConnectTimeout), CLI 100% completion ([source](https://github.com/0sparsh2/GAX/blob/main/mcp_vs_cli_benchmarks_2026/report.md#scalekit-mcp-vs-cli-benchmark))
- **SWE-Bench Verified top score (May 2026):** Claude Code (Opus 4.7) ~78%, OpenAI Codex agent (GPT-5 Pro) ~76% ([source](https://presenc.ai/research/coding-agent-benchmarks-2026))
- **TerminalBench top score (May 2026):** Claude Code (Opus 4.7) ~58%, OpenAI Codex agent ~54% ([source](https://presenc.ai/research/coding-agent-benchmarks-2026))
- **MCP schema idle cost (93-tool github-mcp-server):** ~55k tokens before user work; multi-server stacks reach ~143k ([source](https://github.com/0sparsh2/GAX/blob/main/mcp_vs_cli_benchmarks_2026/report.md#naive-mcp-schema-overhead))
- **Real-world PR acceptance rate (autonomous):** 35–50% for top agents vs 74–78% SWE-Bench ([source](https://presenc.ai/research/coding-agent-benchmarks-2026))

## Direct Engineering Verdict

MCP costs 4×–32× more tokens than CLI for equivalent GitHub tasks (median ~32× on simple lookups, 80× on complex aggregation), and 28% of remote MCP runs fail with ConnectTimeout. CLI completes 100% of runs. For single-tenant, local CI pipelines, **CLI is the correct default**. MCP becomes mandatory only when you cross trust boundaries: multi-tenant SaaS, credential isolation between teams, or audit-log requirements that shell history cannot satisfy. The 35× overhead figure cited in discourse reflects the 43-tool Copilot MCP baseline (44k tokens idle) — not a theoretical ceiling.

## Token, Latency & Accuracy Comparison Table

| Metric | CLI (gh) | MCP (Copilot 43-tool) | Delta | Source |
|---|---|---|---|---|
| Get repo info (tokens) | 1,365 | 27,313 | 20× | [Scalekit benchmark](https://github.com/scalekit-inc/mcp-vs-cli-benchmark#key-findings) |
| Get PR details (tokens) | 1,648 | 19,085 | 11.6× | [Scalekit benchmark](https://github.com/scalekit-inc/mcp-vs-cli-benchmark#key-findings) |
| Summarize PRs by contributor (tokens) | 4,998 | 400,013 | 80× | [Scalekit benchmark](https://github.com/scalekit-inc/mcp-vs-cli-benchmark#key-findings) |
| Run failure rate | 0% | 28% (ConnectTimeout) | — | [GAX report](https://github.com/0sparsh2/GAX/blob/main/mcp_vs_cli_benchmarks_2026/report.md#scalekit-mcp-vs-cli-benchmark) |
| Task completion (when connected) | 100% | 100% | — | [Scalekit benchmark](https://github.com/scalekit-inc/mcp-vs-cli-benchmark#key-insights) |
| SWE-Bench Verified (top agent) | 78% (Claude Code Opus 4.7) | N/A — modality independent | — | [Presenc.ai 2026](https://presenc.ai/research/coding-agent-benchmarks-2026) |
| TerminalBench (top agent) | 58% (Claude Code Opus 4.7) | N/A — modality independent | — | [Presenc.ai 2026](https://presenc.ai/research/coding-agent-benchmarks-2026) |
| Real-world PR acceptance | 48% (Claude Code) | N/A — modality independent | — | [Presenc.ai 2026](https://presenc.ai/research/coding-agent-benchmarks-2026) |
| Median time-to-PR (medium task) | 14 min (Claude Code) | N/A — modality independent | — | [Presenc.ai 2026](https://presenc.ai/research/coding-agent-benchmarks-2026) |

CLI wins on token efficiency and reliability for tasks resolvable in 1–3 shell commands. MCP wins on structured-data latency (direct API vs output parsing) and — critically — on governance dimensions the table cannot capture: RBAC-scoped tool access, credential rotation without agent restart, and tamper-evident audit logs.

## Failure Modes & Context Pollution

The 28% failure rate is not a protocol flaw — it is a topology consequence. Remote MCP servers introduce network hops, TLS handshakes, and OAuth token refresh cycles that CLI subprocesses avoid entirely. In the Scalekit suite, every failure was `ConnectTimeout` to the hosted Copilot MCP endpoint; zero CLI runs failed. When the MCP connection succeeds, task outcomes match CLI.

Context pollution is the silent cost. A 93-tool `github-mcp-server` injects ~55k tokens before the first user prompt. Stack OnlyCLI + Firecrawl + GitHub MCP and you hit ~143k tokens — 71% of a 200k window — before the agent writes a single line of code. The [arXiv analysis](https://arxiv.org/html/2610.30157v1) confirms this is the primary architectural weakness of naive MCP adoption. Progressive disclosure (lazy `tools/list` via `gax search` at 80–250 tokens per discovery) recovers parity, but requires a sidecar daemon (`gaxd`) that most teams have not deployed.

OAuth boundaries compound the problem. Each MCP server typically holds its own credential set (GitHub PAT, Cloudflare API token, Postgres DSN). Rotating one credential means restarting or re-authenticating that server — a coordination burden CLI avoids by inheriting the developer's shell environment. For multi-tenant platforms, this isolation is a feature; for internal CI, it is operational drag.

## Minimal Reproducible Config / Harness Snippet

Run the Scalekit benchmark locally to validate overhead on your tasks:

```bash
# Clone and configure
 git clone https://github.com/scalekit-inc/mcp-vs-cli-benchmark.git
 cd mcp-vs-cli-benchmark
 cp .env.example .env
 # Edit .env with your keys:
 # ANTHROPIC_API_KEY=sk-ant-...
 # GITHUB_TOKEN=ghp_...
 # MCP_GITHUB_SERVER_URL=http://localhost:3000  # or remote URL
 # BENCHMARK_MODEL=anthropic/claude-sonnet-4-20250514

 uv sync

 # Baseline: CLI only, 5 runs per task
 uv run bench run --modality cli --runs 5 --clean

 # MCP only, 5 runs (expect ~28% timeout failures on remote)
 uv run bench run --modality mcp --runs 5

 # Analyze token/latency deltas
 uv run bench analyze --input results/raw --output results/summary.json
```

For CI integration, gate MCP adoption behind a token-budget check:

```yaml
# .github/workflows/agent-ci.yml
jobs:
  token-budget:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Estimate MCP schema tokens
        run: |
          TOOL_COUNT=$(curl -s $MCP_GITHUB_SERVER_URL/tools/list | jq '.tools | length')
          EST_TOKENS=$((TOOL_COUNT * 1200))  # ~1.2k tokens/tool empirical
          if [ $EST_TOKENS -gt 50000 ]; then
            echo "::error::MCP schema ~${EST_TOKENS} tokens exceeds 50k budget"
            exit 1
          fi
      - name: Run CLI agent (default path)
        if: failure()
        run: uv run bench run --modality cli --runs 3
```

## When NOT to Adopt This Pattern

**Skip MCP when:**
- Your CI pipeline runs in a single trust zone (internal repo, shared runner credentials). The 32× token tax and 28% timeout risk buy you nothing.
- Tasks are short-lived (<10 queries/session). The 1,300-token schema upfront cost never amortizes; CLI stays cheaper per [bswen.com break-even analysis](https://docs.bswen.com/blog/2026-03-17-mcp-vs-cli-token-overhead/).
- You operate on 4k–8k context windows (Llama 3.1 8B, Gemma 2 9B). MCP schema consumes 32–65% of context before work begins.
- Your team lacks a sidecar discovery layer (`gaxd`, `mcp-proxy`, or custom lazy-loader). Without it, you pay full schema cost every turn.

**Adopt MCP when:**
- Agents must act on behalf of multiple identities (per-developer GitHub tokens, per-customer Cloudflare zones). CLI cannot isolate credentials without container-per-identity — far heavier than MCP's protocol boundary.
- Compliance requires structured audit (who called `delete_repo`, with what parameters, at what timestamp). Shell history is mutable and unstructured.
- You need fine-grained RBAC ("CI bot may read PRs but not merge"). MCP servers enforce this at the protocol layer; CLI relies on OS permissions that are coarse or absent for API actions.

The hybrid architecture the [arXiv paper](https://arxiv.org/html/2610.30157v1) recommends is not a compromise — it is the only architecture that matches the trust model of the task. Local developer loop: CLI. Cross-boundary automation: MCP. Anything else leaks tokens or leaks credentials.

## Frequently Asked Questions

### When does MCP token overhead become negligible?

After ~10 queries in a session, the 1,300-token schema upfront cost amortizes to <100 tokens/query. In a 200k context window it's 0.65%; in 4k windows it's 32.5% and prohibitive.

### Why do MCP runs fail 28% of the time in the Scalekit benchmark?

ConnectTimeout errors reaching the remote GitHub Copilot MCP server (18/25 failures). Local CLI execution via gh had zero network dependency failures.

### What SWE-Bench score should I expect in production vs the benchmark?

Benchmark scores (74–78%) overstate real-world PR acceptance (35–50%) because benchmarks miss implicit conventions, reviewer expectations, and multi-file coordination friction.

### Can progressive disclosure eliminate MCP's token penalty?

Yes. Lazy tool discovery (gax search/gax doc at 80–250 tokens per lookup) replaces full schema preload, achieving CLI-parity token efficiency while preserving MCP's governance boundaries.

## Primary Sources

- https://github.com/0sparsh2/GAX/blob/main/mcp_vs_cli_benchmarks_2026/report.md
- https://github.com/scalekit-inc/mcp-vs-cli-benchmark
- https://presenc.ai/research/coding-agent-benchmarks-2026
- https://docs.bswen.com/blog/2026-03-17-mcp-vs-cli-token-overhead/
- https://arxiv.org/html/2610.30157v1
