mcp-footprint
Discovers and audits Windsurf (Codeium) MCP configuration from ~/.codeium/windsurf/mcp_config.json and workspace ./.windsurf/mcp_config.json to count exact BPE tokens per server/tool and flag schema bloat, duplicates, and parse errors.
Discovers and audits OpenAI Codex MCP configuration (~/.codex/config.toml, ~/.codex/config.json, and workspace ./.codex/...) and reads Codex session JSONL logs to attribute tool-call counts and flag unused (zombie) servers and tools.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-footprint
Protocol-level MCP (Model Context Protocol) context footprint analyzer. Discovers local MCP client configs, probes live JSON-RPC 2.0 servers (stdio, Streamable HTTP, Legacy HTTP+SSE) or offline snapshots, counts exact BPE tokens (cl100k_base / o200k_base), flags schema bloat, duplicate tools, and zombie servers/tools, and generates concrete pruning diffs. Listed on Glama MCP Servers with MCP Inspector snapshot verification.
Zero telemetry — runs 100% locally; never phones home or sends schemas to third parties.
Secret-safe by design — redacts
env,headers,bearer_token_env_var, URL credentials, and secret CLI flags before returning or printing any report.Zero prompt retention — session log correlation reads only numeric tool-call counts (
mcp__<server>__<tool>), never prompt text or tool arguments.
Quick Start
# Audit all local MCP configs (Claude Code, Cursor, VS Code, Claude Desktop, Windsurf, Codex)
npx mcp-footprint
# Audit a static tools/list or multi-server JSON snapshot offline
npx mcp-footprint --static ./snapshot.json
# Generate a concrete pruning diff & enforce a CI token budget
npx mcp-footprint --diff --max-tokens 6000
# Export GitHub PR Markdown, JSON, or a standalone SVG badge
npx mcp-footprint --markdown
npx mcp-footprint --json
npx mcp-footprint --svg-badge --output mcp-footprint.svgRelated MCP server: context-surface-analyzer
Supported Clients & Formats
Client | Global Config Paths | Workspace Configs | Format & Root Keys |
Claude Code |
|
| JSON ( |
Cursor |
|
| JSON/JSONC ( |
VS Code | User |
| JSONC ( |
Claude Desktop | Platform app data | — | JSON ( |
Windsurf |
|
| JSON/JSONC ( |
OpenAI Codex |
|
| TOML ( |
CLI Options
Flag | Description |
| Explicit config file path(s), repeatable or comma-separated |
| Inspect a static JSON snapshot ( |
| Discover & validate configs without probing servers |
| Scan current workspace configs only |
|
|
| Session log lookback window in days (default: |
| Per-server live probe timeout in ms (default: |
| Exit code |
| Emit structured JSON report |
| Emit GitHub-flavored Markdown report |
| Emit concrete config pruning patch / unified diff |
| Emit standalone SVG badge |
| Write output to a file |
| Start as a lean, read-only stdio MCP server |
Diagnostic Rules
DESC_BLOAT— Tool description exceeds 150 tokens / 600 chars (warning) or 400 tokens / 1,600 chars (error).SCHEMA_COMPLEXITY— Deeply nested JSON Schema (depth >= 4), excessiveanyOf/oneOf/allOfunions (>= 4), or wide parameter objects (>= 15properties).DUPLICATE_TOOL— Exact or normalized tool name collision across multiple active servers.ZOMBIE_SERVER/ZOMBIE_TOOL— Active server or tool with 0 observed calls in local Claude Code / Codex session JSONL logs (skipped cleanly when no session logs exist).BUDGET_EXCEEDED— Context footprint exceeds--max-tokens(or default 10k/20k thresholds).CONFIG_PARSE_ERROR/PROBE_TIMEOUT/PROBE_FAILED/AUTH_REQUIRED/ENV_VAR_UNRESOLVED— Config or transport diagnostics with RFC 6901jsonPointercoordinates.
GitHub Action (action.yml)
- uses: nodebudget/mcp-footprint@v0.1.3
with:
static-path: .mcp/snapshot.json
max-tokens: "8000"
fail-on-error: "true"
comment-pr: "true"Programmatic TypeScript / ESM API
import {
discoverConfigs,
analyzeFootprint,
inspectStaticSnapshot,
generatePruningDiff,
generateSvgBadge,
} from "mcp-footprint";
const report = await inspectStaticSnapshot("./snapshot.json", {
tokenizer: "cl100k_base",
maxTokens: 8000,
});
const diff = generatePruningDiff(report);
const svg = generateSvgBadge(report);Read-Only MCP Server Mode (--mcp)
mcp-footprint --mcp exposes three minimal read-only tools (inspect_mcp_snapshot, analyze_mcp_config, diff_mcp_budget) over stdio JSON-RPC 2.0 (2025-03-26).
Related NodeBudget Resources
Interactive MCP Token Overhead Calculator — Estimate monthly JSON schema token burn across attached MCP servers and model LiteLLM + Progressive MCP Gateway savings.
LiteLLM + MCP Gateway Token Reduction Guide — Engineering guide for cutting agent schema overhead with self-hosted LiteLLM Proxy and progressive tool loading.
NodeBudget Open Coding-Agent & MCP TCO Benchmark Datasets — CC BY 4.0 datasets covering MCP schema overhead, coding-agent TCO, and self-hosted AI infrastructure benchmarks.
License
MIT — see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Statically audits MCP tool surfaces for token cost, schema quality, and design issues.
MCP Spec Compliance MCP — audits any MCP server.json against the official Model Context Protocol
Audit MCP servers for tool poisoning and shadowing. Scan a remote server by URL or paste its tools.
Free MCP contract auditing for AI agents and developers. Check tool schemas, detect potential breaking changes between versions, and get structured compatibility findings before deployment. Static analysis only.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables analyzing and optimizing context window token usage by measuring, compressing, and eliminating waste from MCP tool definitions.58 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables deterministic analysis of a single Agent tool-catalog snapshot and comparison of two snapshots through read-only JSON-RPC tools, reporting digests, schema statistics, duplicates, collisions, budget checks, and diffs.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables auditing MCP servers' tools by their estimated context token cost, ranking verbose names, descriptions, and schemas before they consume the agent window. Can run as an MCP tool so agents can budget their own context.1MIT
- AlicenseAqualityBmaintenanceChecks the MCP server you're building the way clients and agents meet its tool list. It flags what agents misread (vague parameters, writes marked read-only), what breaks clients or prompt caches (tools that appear mid-session, schemas that change on every call), and breaking changes between releases with the version bump they need. Same input, same answer: no LLM involved.6912 npm2MIT