A deterministic linter, security inspector, and quantitative quality benchmark for Model Context Protocol (MCP) tool definitions.
Web Playground · Leaderboard (2,124) · Rules Catalog · npm Package
Point mcp-benchmark at any tools/list export, running server, or client config (claude_desktop_config.json, mcp.json). It reports schema gaps, ambiguous descriptions, prompt-injection directives, and the exact token cost injected into LLM contexts on every turn.
Runs 100% offline, calls zero LLMs, and produces identical results every time — making it an ideal deterministic gate for CI/CD pipelines.
npx mcp-benchmark -f tools.jsonTry the Browser Playground & Searchable Leaderboard (zero install, paste tools, get instant TQI and model token costs).
# Lint a tool definition file
npx mcp-benchmark -f tools.json
# Auto-fix common issues (clean fluff, add root type, fix enums)
npx mcp-benchmark -f tools.json --fix --write
# Estimate token consumption & API costs per 1,000 agent sessions
npx mcp-benchmark -f tools.json --cost
# Auto-discover and audit all MCP servers configured on your machine (Cursor, Claude, VS Code)
npx mcp-benchmark --discover
# Lint a local live server over stdio
npx mcp-benchmark --cmd "node build/index.js"npm install -g mcp-benchmark
# or in your project:
npm install -D mcp-benchmarkAdd deterministic MCP quality verification and Code Scanning alerts to your pull requests:
- name: Lint MCP Tool Definitions
uses: yunusarda-sudo/mcp-benchmark@v1
with:
file: tools.json
fail-under: '80'
sarif: mcp-results.sarif
- name: Upload SARIF to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: mcp-results.sarifInstall as an autonomous agent skill so coding agents can audit your tools and propose fixes automatically:
npx skills add yunusarda-sudo/mcp-benchmarkOr in Claude Code:
/plugin install mcp-benchmark --marketplace yunusarda-sudo/mcp-benchmark
Running on the bundled examples/sample-mcp-tools.json (3 tools):
$ mcp-benchmark -f examples/sample-mcp-tools.json
| Rank | MCP Server | Grade | TQI Score | Schema Strictness | Semantic Density | Token Efficiency | Avg Tokens/Tool |
|:---:|:---|:---:|:---:|:---:|:---:|:---:|:---:|
| 1 | sample-mcp-tools | C | 75/100 | 47% | 90% | 100% | 95 tok |
sample-mcp-tools (Grade: C · TQI: 75/100)
* search_knowledge_base (100/100) — Estimated tokens: 145
* No findings.
* send_notification (68/100) — Estimated tokens: 42
* WARNING schema.root-type (/inputSchema/type): inputSchema missing root type: "object".
* WARNING schema.parameter-types (/inputSchema/properties): 2 parameters lack explicit JSON primitive types.
* WARNING schema.parameter-descriptions (/inputSchema/properties): Multiple input parameters lack descriptions.
* handle_data (58/100) — Estimated tokens: 98
* WARNING schema.root-type (/inputSchema/type): inputSchema missing root type: "object".
* WARNING schema.parameter-types (/inputSchema/properties): 2 parameters lack explicit JSON primitive types.
* WARNING schema.parameter-descriptions (/inputSchema/properties): Multiple input parameters lack descriptions.
* INFO description.filler (/description): Description contains conversational filler phrases.
Mechanical defects and conversational fluff can be repaired automatically:
$ mcp-benchmark -f examples/sample-mcp-tools.json --fix --write
✨ Fixed 3 issue(s) across 3 tool(s).
- [send_notification] set-root-type: Set inputSchema.type to "object"
- [handle_data] set-root-type: Set inputSchema.type to "object"
- [handle_data] clean-fluff-description: Cleaned conversational fluff from description
Every tool definition is injected into the model's context window on every single agent turn. Bloated schemas cause significant latency and API costs:
$ mcp-benchmark -f tools.json --cost
* Catalog Size: 285 tokens per model turn (~95 tok/tool)
* 15-Turn Agent Session: 4,275 tokens consumed by tool schemas alone
* At 1,000 sessions/month: 4,275,000 tokens injected into LLM context
The Tool Quality Index (TQI, 0 to 100) is calculated across three primary dimensions, with deductions for security risks:
- Schema Strictness (40%): Validates root
type: "object", explicit parameter primitive types, property descriptions, and constraints (enums, array items, regex patterns). - Semantic Density (35%): Analyzes description clarity, optimal length (25–400 chars), and flags conversational fluff that confuses tool selection.
- Token Efficiency (25%): Measures context consumption against a per-tool budget of
80 + 40 × property counttokens, so rich schemas are not punished for the tokens their properties need. Ratio ≤ 1 scores 100, ≤ 1.5 scores 85, ≤ 2 scores 70, ≤ 3 scores 50, above that 30. - Security & Prompt Hygiene (Penalties): Detects prompt injection overrides, data exfiltration directives, and covert actions hidden inside tool or parameter descriptions.
| Rule ID | Domain | Default Severity | Description |
|---|---|---|---|
schema.root-type |
Schema | Warning | Requires inputSchema.type: "object" for JSON Schema compliance. |
schema.required-fields |
Schema | Critical | Ensures required is an array of strings referencing defined properties. |
schema.property-boolean-required |
Schema | Warning | Flags invalid OpenAPI/boolean required: true/false inside property objects. |
schema.parameter-types |
Schema | Warning | Flags parameters lacking explicit JSON primitive types (string, number, etc.). |
schema.array-without-items |
Schema | Warning | Flags arrays missing an items schema (causes LLM argument hallucination). |
schema.empty-enum |
Schema | Critical | Flags empty enum: [] arrays that make valid arguments impossible. |
description.empty |
Semantic | Critical | Disallows tools with empty or missing descriptions. |
description.length |
Semantic | Info | Encourages optimal description length (25–400 characters). |
description.filler |
Semantic | Info | Flags conversational fluff phrases ("this tool allows you to..."). |
security.prompt-hygiene |
Security | Critical | Flags prompt injection, system overrides, and secret exfiltration directives. |
efficiency.context-footprint |
Efficiency | Info | Flags definitions above 3× their token budget (80 + 40 × properties) or above 600 absolute context tokens. |
tool.empty-name |
Naming | Critical | Ensures every tool has a non-empty name. |
tool.name-length |
Naming | Warning | Checks that tool names stay under 64 characters for LLM function calling. |
tool.invalid-name-format |
Naming | Warning | Ensures tool names only use alphanumeric characters, underscores, hyphens, and dots. |
Grades: A+ ≥ 95, A ≥ 88, B ≥ 78, C ≥ 65, D ≥ 50, otherwise F.
- Zero-argument tools no longer get free strictness. A tool with no properties scores
20fortype: "object",+30baseline, and+10whenadditionalProperties: false(maximum 60), instead of a flat 80. - Token efficiency is relative to schema size (budget
80 + 40 × properties) instead of the raw size of the whole definition. The large-definition info diagnostic fires above 3× the budget, or above 600 tokens. - Grade thresholds were raised: A+ ≥ 95 (was 90), A ≥ 88 (was 80), B ≥ 78 (was 70), C ≥ 65 (was 60). Scores and grades from earlier versions are not comparable.
- Security checks are narrower. Secret disclosure needs a directive to send secrets, credentials or environment data to an external destination; silent execution needs a verb after "silently" or "without notifying the user"; phrases quoted by a detector ("detects ignore previous instructions") are ignored.
- The browser playground engine is now identical to the CLI and covered by a parity test over the whole registry.
The project continuously probes and benchmarks remote, auth-free servers from the official MCP Registry.
All 2,124 synced servers are categorized into 16 domain sectors:
- AI, LLMs & Agents · Developer Tools & DevOps · Databases & Storage · Vector DBs & AI Search
- Finance, Crypto & Web3 · E-Commerce & Retail · Design, UI & 3D Media · Web Scraping & Automation
- Communication & Alerting · Productivity & Notes · Healthcare & Wellness · Jobs, Career & Learning
- Travel, Maps & Navigation · Security & Identity · Observability & Analytics · Social, Media & Knowledge
Explore the full interactive leaderboard with sorting, search, and tool inspection at:
👉 https://yunusarda-sudo.github.io/mcp-benchmark/
| Published | Server | Grade | TQI | Tools | Data |
|---|---|---|---|---|---|
| 2026-11-30 | Counterlure Agent Exchange · com.counterlure/agent-exchange |
B |
86 | 14 | json |
| 2026-11-30 | Oscillian · com.oscillian/oscillian |
A |
94 | 12 | json |
| 2026-11-30 | ai.foura/mcp | B |
83 | 4 | json |
| 2026-11-30 | TokenSafe · dev.tokensafe/tokensafe |
A |
92 | 13 | json |
| 2026-11-30 | app.sallim/korea-realty | B |
80 | 57 | json |
| 2026-11-30 | app.sallim/contract-compass | C |
77 | 11 | json |
| 2026-11-30 | Reoon Email Verifier MCP by usefulapi · io.usefulapi/reoon-email-verifier |
B |
87 | 4 | json |
| 2026-11-30 | The notacompany newsletter · com.notacompany/newsletter |
A |
89 | 18 | json |
| 2026-11-30 | Construct Computer Free Tools · computer.construct/tools |
A |
93 | 6 | json |
| 2026-11-30 | Windsurfrules, Clinerules & Copilot-Instructions Slimmer · io.github.oneandroid-max/windsurfrules-copilot-instructions |
A+ |
96 | 14 | json |
| # | Server | Grade | TQI | Tools | Tokens/tool | Data |
|---|---|---|---|---|---|---|
| 1 | Sidetrip GitHub · ai.sidetrip.connect/github |
A+ |
100 | 6 | 163 | json |
| 2 | Sidetrip Hacker News · ai.sidetrip.connect/hackernews |
A+ |
100 | 5 | 142 | json |
| 3 | Sidetrip demo: Less Annoying CRM · ai.sidetrip.connect/lacrm |
A+ |
100 | 2 | 189 | json |
| 4 | CentsPerPage · com.centsperpage/printer-cartridges |
A+ |
100 | 4 | 133 | json |
| 5 | 디지털자산기부연구회(DADA) 지식 · com.dadaforum/dada-knowledge |
A+ |
100 | 6 | 120 | json |
| 6 | Firstline Restoration Tools · com.firstlinerestoration/tools |
A+ |
100 | 12 | 219 | json |
| 7 | Game Chronica · com.gamechronica/gamechronica |
A+ |
100 | 3 | 146 | json |
| 8 | Wigoo · com.getwigoo/wigoo |
A+ |
100 | 4 | 222 | json |
| 9 | LifeVerse Product Discovery · com.gufreelancer.lifeverse/public-catalog |
A+ |
100 | 4 | 110 | json |
| 10 | QIXUA China-EU Trade, Supplier Risk & China Proxy MCP · com.hainanqingxuan/china-eu-trade-mcp |
A+ |
100 | 5 | 371 | json |
| 11 | Injection Check · com.injectioncheck/injectioncheck |
A+ |
100 | 1 | 197 | json |
| 12 | It's My Life Dog video info · com.itsmylifedog/video |
A+ |
100 | 4 | 107 | json |
| 13 | GiftBack · com.joingiftback/giftback |
A+ |
100 | 3 | 250 | json |
| 14 | Kidincare · com.kidincare/kidincare |
A+ |
100 | 4 | 136 | json |
| 15 | Klarum · com.klarum/klarum |
A+ |
100 | 3 | 110 | json |
5422 servers · 74589 tools · last sync 2026-11-30. Last run: 78227 registry entries scanned, 47090 auth-free remote candidates, 910 returned tools, 561 required authentication, 29 failed (probe cap reached). Probed newest first by registry publish date, at most 1500 per run and at most 3 listed servers per operator (registrable domain of the remote host).
The complete ranked list of all 2,124 servers is published in LEADERBOARD.md.
| Command / Option | Description |
|---|---|
mcp-benchmark -f tools.json |
Lint and score any tool definitions file. |
mcp-benchmark -f tools.json --fix --write |
Auto-clean conversational fluff, fix missing root types, and repair schemas in place. |
mcp-benchmark -f tools.json --cost |
Estimate multi-turn context token consumption and monthly API costs. |
mcp-benchmark --discover |
Automatically scan local machine for Claude Desktop, Cursor, and VS Code MCP configs. |
mcp-benchmark -c ~/.cursor/mcp.json |
Benchmark all servers configured in a client config file. |
mcp-benchmark --cmd "node build/index.js" |
Connect to a local stdio MCP server, execute tools/list, and score output. |
mcp-benchmark --url "https://api.example.com/sse" |
Benchmark a live remote MCP server over HTTP+SSE with optional -H headers. |
mcp-benchmark -f tools.json --fail-under 80 |
Set a minimum threshold score (exits code 1 if overall TQI is below threshold). |
mcp-benchmark -f tools.json --sarif report.sarif |
Export GitHub Code Scanning SARIF v2.1.0 diagnostic report. |
mcp-benchmark -f tools.json --badge badge.svg |
Generate an SVG quality badge for your repository README. |
mcp-benchmark -f tools.json --html report.html |
Export an interactive standalone HTML report. |
mcp-benchmark --baseline v1.json -f v2.json |
Catch breaking changes (removed tools, newly required parameters) between versions. |
mcp-benchmark --ecosystem |
Benchmark all local registry server exports in bulk. |
mcp-benchmark --rules |
List all available benchmark heuristics and default severities. |
import { analyzeToolDefinition, autoFixTools, benchmarkServerTools } from 'mcp-benchmark';
// 1. Analyze an individual tool definition
const result = analyzeToolDefinition({
name: 'query_user_records',
description: 'Retrieve user account profile and subscription status.',
inputSchema: {
type: 'object',
required: ['user_id'],
properties: {
user_id: { type: 'string', description: 'Unique user identifier.' }
}
}
});
console.log(`Tool Score: ${result.metrics.overallScore}/100`);
console.log(`Diagnostics: ${result.findings.length} issue(s)`);
// 2. Auto-fix an array of tools
const { fixedTools, changeCount } = autoFixTools([/* raw tools */]);
console.log(`Applied ${changeCount} automatic repairs.`);We welcome community contributions, bug reports, and new linter rules!
- Submit an MCP Server: If your server is published to the official MCP Registry with an auth-free remote, our weekly sync will automatically probe and rank it. You can also submit manual community entries using
mcp-benchmark --submit <path> --name <name> --category <category>(see CONTRIBUTING.md). - Add a Linter Rule: Rules live in
src/rules/. Follow the Rule Authoring Guide. - Report an Issue: Found an edge case or scoring mismatch? Open a GitHub Issue.
MIT © 2026 Yunus Arda Güney