Performance Benchmarks

July 9, 2026 · View on GitHub

Filesystem MCP optimizes for batch operations and direct API calls instead of per-file shell round trips. These benchmarks measure handler throughput on a local fixture tree using Vitest's bench runner.

What we measure

ScenarioWhy it matters
read_content — single fileBaseline latency for one file read
read_content — 10 filesToken-efficient batch read in one MCP call
list_files — recursive treeDirectory discovery without shell find
search_files — regex across treeCode search without spawning rg per request

Results are machine- and fixture-specific. Use them to compare regressions on your hardware, not as absolute SLA numbers.

Reproduce

bun run benchmark

The benchmark script runs vitest bench against __tests__/benchmarks/throughput.bench.ts. Regular unit tests exclude *.bench.ts files so CI stays fast.

For the full test suite including coverage thresholds:

bun run test
bun run validate

Design goals the bench protects

  • Batching — most tools accept arrays and return per-item status.
  • Direct API — no shell spawn overhead per operation.
  • Project-root confinement — all paths resolve under the server cwd.

See the README comparison table for how batch MCP calls compare to individual shell commands.