Skip to main content
Second Foreman LLC · Oklahoma City, OK SAM.gov UEI: U4BYU2ELNVW1 OK SOS: #3513997463 OK Tax Permit: #796020736 Veteran-Owned Small Business
hello@secondforeman.com
MODEL CONTEXT PROTOCOL · SCHEMA BUDGETING

Auditing MCP Server Tool-Schema Token Overhead Before Tool Call #1

Connecting 6 verbose MCP servers can inject 25,000–55,000 hidden JSON-Schema tokens into every single turn. Measure and trim MCP overhead.

Key Rules & Field Checklist

  • Every registered MCP tool description and inputSchema is serialized into the model system prompt on every turn.
  • Disable idle MCP servers per-project using workspace-scoped .mcp.json instead of global profile defaults.
  • Prefer concise remote Streamable HTTP MCP servers (https://secondforeman.com/api/mcp) exposing 3–4 focused tools.
  • Audit combined instruction + .mcp.json startup token weight in under 50ms with ContextGuard.

Run in terminal: npx --allow-git=all --yes github:oneandroid-max/contextguard-mcp audit . --max-boot-tokens 6000

Related Study & Engineering Guides

How to Stop AI Coding Context-Compaction Loops & 5x Prompt-Cache Burn · The <5 KB START.md Boot-Card Pattern for AGENTS.md & .cursorrules Repositories · Preventing package-lock.json, pnpm-lock.yaml & Build Artifacts from Leaking into Agent Context · Connect Second Foreman Remote Streamable HTTP MCP Server