Tool Info
| Field | Value |
|---|---|
| Name | mcp-bench |
| Type | CLI (conformance / security / token-usage benchmark runner for MCP servers) |
| GitHub | Adjureee/mcp-bench |
| Stars | 28 (checked 2026-11-29; published the day before, 0 forks) |
| Language | TypeScript |
| License | MIT |
| Install | git clone, then npm install && npm run build (the same-named npm package is an unrelated project — see "Things to Watch") |
What Problem It Solves
Every MCP server you connect injects its tool definitions into every single turn, and it runs with your own permissions — yet most MCP servers ship with no automated check for whether a tool description hides a poisoning string, how many tokens its schema is quietly burning, or whether it leaks a stack trace or local file path the moment it receives malformed input. Yesterday's pick, mcp-sentinel, solves the "after you've already connected it" half of this — a firewall that sits in front of a server you're already running. Nobody tells you whether the server itself is clean before you wire it in.
mcp-bench turns that check into one command. It spawns the MCP server you want to test over stdio, with zero LLM API keys required: first a round of initialize/tools/list to check every tool's name, description, and schema for poisoning strings (<IMPORTANT> tags, "ignore previous instructions", zero-width Unicode steganography) or obvious structural bugs; then, with --fuzz, it deliberately omits required arguments on every tool to see whether the server returns a well-behaved validation error or leaks a local username path or stack trace instead. In parallel, it converts every tool description into an estimated token count and docks points once it crosses budget. Running all 13 rules (2 security, 4 schema, 2 token, 3 conformance, 1 startup-latency) takes the score down from 100 and produces a 0-100, A-F scorecard — typically finished in under a second locally.
- mcp-bench CLI spawns the target MCP server and sends initialize
- The server responds with capabilities, completing the handshake
- The CLI sends tools/list
- The server responds with tool definitions and schemas
- The CLI sends a --fuzz call omitting a required argument
- The server responds with an error, possibly leaking a stack trace or path
- The CLI scores the run against its rule table and produces a 0-100, A-F scorecard
Simplified from the official README's rule table and sample output; the full rule set has 13 entries — this diagram only shows the initialize/tools-list/fuzz round trips and the final scoring step.
It's a fit for gating your own MCP server in CI (--fail-on high turns the PR red directly), or for running a once-over on an unvetted community MCP server before you decide whether it's safe to wire into Claude Desktop or Cursor.
Getting Started
Install
git clone https://github.com/Adjureee/mcp-bench.git
cd mcp-bench
npm install
npm run build
Basic usage
# Test your own Node/TypeScript MCP server
node ./dist/cli/index.js -- node /path/to/server/dist/index.js
# Test a Python (FastMCP) server or a compiled Go/Rust binary, with --fuzz for error-handling checks
node ./dist/cli/index.js --fuzz -- python /path/to/server.py
# Test an MCP server published to npm (npx launches the SERVER, not mcp-bench itself)
node ./dist/cli/index.js --json -- npx -y @modelcontextprotocol/server-everything
Advanced usage (optional)
The programmatic API needs mcp-bench installed as a dependency first — npm install github:Adjureee/mcp-bench (not npm install mcp-bench; see "Things to Watch" for why) — before this import resolves:
import { benchmarkStdioServer, formatBenchReport } from 'mcp-bench';
const report = await benchmarkStdioServer('node', ['./dist/index.js'], {
fuzz: true,
maxTotalTokens: 1500,
timeoutMs: 10000,
});
console.log(formatBenchReport(report));
if (report.summary.counts.critical > 0 || report.summary.counts.high > 0) {
process.exit(1);
}
Wiring it into GitHub Actions as a quality gate means building it first, then calling the CLI:
- name: Build mcp-bench
run: |
git clone --depth 1 https://github.com/Adjureee/mcp-bench.git mcp-bench
cd mcp-bench && npm install && npm run build
- name: Benchmark MCP server
run: |
node mcp-bench/dist/cli/index.js --fuzz --fail-on high --max-total-tokens 2000 -- node ./dist/index.js
How It Compares
| mcp-bench | MCP Inspector (official) | mcp-scan (Invariant Labs) | |
|---|---|---|---|
| Target | CI quality gate for one MCP server | Interactive debugging of one server | Scans every server already installed in a client (Cursor, Claude Desktop, etc.) |
| Output | 0-100 score + A-F grade; --fail-on maps straight to an exit code | No score — manual inspection in a web/CLI/TUI client | Lists findings (tool poisoning, rug pulls, cross-origin escalation), not a continuous score |
| Checks token usage | (per-tool and total budgets) | ||
| Needs an LLM API key | (rule-based and static matching, not LLM judgment) | ||
| Continuous monitoring | (one run, then it exits) | (mcp-scan proxy can run persistently) | |
| Install | Node ≥ 20, git clone | npx @modelcontextprotocol/inspector | uvx mcp-scan@latest (Python/uv) |
Things to Watch
- npm already has an unrelated package with the same name:
mcp-benchon the npm registry (published by karankraina, currently 0.0.3, ISC license) is a different tool — a local web UI for connecting to and debugging an MCP server — with nothing to do with this benchmark CLI. The GitHub README's own CI example runsnpx mcp-bench, which will actually pull that unrelated package; copying it as-is installs the wrong thing. The only reliable paths right now aregit cloneplusnode ./dist/cli/index.js, ornpm install github:Adjureee/mcp-benchto pull it straight from GitHub as a dependency. - This is a brand-new, single-maintainer project published 2026-11-28 — 28 stars, 0 forks, no external review yet. The 13 rules only cover common poisoning strings and obvious schema problems; the
--fuzzstack-trace detector only recognizes a handful of common Node/Python/Go/Rust error formats. This isn't a comprehensive MCP security audit. - The score only reflects the tool-definition and handshake layer — it never actually calls your business logic to check permission scoping or data-access boundaries. An A grade means the server didn't trip any of these 13 known issues, not that the server is safe in your specific environment.
Today's Takeaway
What the MCP ecosystem is filling in right now isn't just "how do we block it after we've connected it" — it's also "how do we check it before we connect it." Yesterday's mcp-sentinel is the firewall for after you've wired a server in; mcp-bench is the checkup for before you do. One covers whether the server itself has a problem, the other covers whether running it can be abused — and neither closes the gap on its own.