mcp-vcr
VCR for MCP servers: record and replay AI agent tool calls to test agentic workflows without side-effects or rate limits.
๐ฏ Why?
Developers building AI agents with MCP servers struggle to test workflows that trigger side-effects (sending emails, creating tickets) or hit API rate limits during debugging loops. While VCR-style recording exists for HTTP, there is no lightweight, zero-dependency stdio proxy to record and replay JSON-RPC MCP traffic locally.
Target audience: AI agent developers, MCP server authors, and QA engineers who need deterministic, offline testing for agentic workflows.
โจ Features
- โจ Record MCP stdio traffic to a local JSON cassette file
- โจ Replay saved tool calls deterministically without spawning the upstream server
- โจ Zero-dependency, transparent stdio proxy that works with any MCP client (Claude Desktop, Cursor, etc.)
๐ Quick Start
# Install
pip install mcp-vcr
# Run
mcp-vcr --help
๐ฆ Installation
From Source
git clone https://github.com/YOUR_USERNAME/mcp-vcr.git
cd mcp-vcr
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest -v
๐ฌ Demo
The GIF above was recorded using Charm VHS:
vhs < demo.tape
๐ Usage
# Show help
mcp-vcr --help
# Common usage examples
mcp-vcr --example
๐๏ธ Architecture
graph LR
A[Input] --> B[Core Engine]
B --> C[Output]
B --> D[Plugins]
D --> E[Extensions]
๐ค Contributing
Contributions are welcome! Please:
- Fork the repo
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ License
MIT ยฉ 2026 โ See LICENSE for details.
If this project helped you, please โญ star it!