
Ship reliable MCP servers
with confidence
Record sessions, generate mock servers, gate your CI pipeline, and catch Tool Poisoning — all without writing a single line of test code. The reliability platform for Model Context Protocol servers.
$
npm install -g mcpspec
# 1. Explore a server interactively
mcpspec inspect "npx my-server"
# 2. Record a session (no test code needed!)
mcpspec record start "npx my-server"
# 3. Generate a mock for your team
mcpspec mock my-recording --generate ./mocks/server.js
# 4. Add CI gating in 30 seconds
mcpspec ci-init
Why MCPSpec?
Deterministic
Unlike LLM-based testing, MCPSpec runs are fast and repeatable. No flaky tests, no token costs. Ideal for CI pipelines.
Secure
Catch Tool Poisoning (prompt injection in descriptions) and Excessive Agency (destructive tools without safeguards) before they reach production.
Collaborative
Record server interactions and share mocks with your team. Frontend developers and CI can test against mocks — no API keys required.
Get started in 30 seconds
No config files needed. Try a pre-built collection or explore a server interactively.
2
Run a community collection (no setup required)
mcpspec test examples/collections/servers/filesystem.yaml
MCPSpec running Filesystem Server Tests (12 tests)
✓ Read a file (124ms)
✓ Handle missing file (89ms)
✓ List directory (45ms)
...
Tests: 12 passed (12 total)
Time: 1.23s
3
Or scaffold your own project
mcpspec init --template standard && mcpspec test
Everything you need
13 CLI commands, 10 assertion types, 8 security rules, 5 reporter formats, and a full web dashboard.
Record & Mock
Record inspector sessions, replay to catch regressions, and generate mock servers. Standalone .js files for CI.
Security Audit
8 rules including Tool Poisoning and Excessive Agency. Passive mode is safe for production. Active mode auto-skips destructive tools.
Test Collections
YAML-based suites with 10 assertion types, environments, variable extraction, tags, retries, and parallel execution.
MCP Score
0–100 quality rating across 5 categories. Opinionated schema linting with 6 sub-criteria. SVG badges for your README.
CI/CD Integration
Run mcpspec ci-init to generate GitHub Actions, GitLab CI, or shell scripts. Exit codes for pipeline gating.
Web Dashboard
Full React UI with 10 pages: servers, collections, runs, inspector, recordings, audit, benchmarks, score, and docs. Dark mode.
70 pre-built tests, ready to run
Community collections for popular MCP servers. See all examples
| Collection | Server | Tests |
|---|---|---|
| filesystem.yaml | @modelcontextprotocol/server-filesystem | 12 |
| memory.yaml | @modelcontextprotocol/server-memory | 10 |
| everything.yaml | @modelcontextprotocol/server-everything | 11 |
| time.yaml | @modelcontextprotocol/server-time | 10 |
| fetch.yaml | @modelcontextprotocol/server-fetch | 7 |
| github.yaml | @modelcontextprotocol/server-github | 9 |
| chrome-devtools.yaml | chrome-devtools-mcp | 11 |