mcp-cassette turns a recorded MCP session into an offline test server
mcp-cassette records one real MCP session into a JSONL file and then serves that recording as an MCP server, so agent tests run offline with no credentials, rate limits or network. It also snapshots tool contracts for CI gates and runs 16 heuristic rules against tool poisoning.
- Record with npx mcp-cassette record -o session.cassette.jsonl; recognized secrets are redacted by default
- Replay speaks MCP over stdio or Streamable HTTP and supports the 2025-11-25 and 2026-07-28 revisions
- snapshot --check fails CI when a tool is removed or a parameter becomes required
- check runs 16 deterministic OWASP MCP Top 10 rules and outputs text, JSON or SARIF
Read next
Software