This is a development tool that sits between your MCP client and the servers you're building. It lets you hot-swap server binaries without restarting your client session, so you can rebuild your Go or Node server and reconnect it while keeping the same tool names active. The proxy mode aggregates multiple servers with prefixed tool names and exposes management tools like server_add, server_remove, and server_reconnect for runtime control. It records all JSON-RPC traffic to JSONL files that you can replay later for regression testing. Reach for this when you're actively developing an MCP server and want faster iteration cycles than full restarts allow, or when you need to capture real client interactions for automated testing.
A debugging and development tool for Model Context Protocol (MCP) servers.
MCP Debug enables rapid development and testing of MCP servers with hot-swapping, session recording, and automated playback testing.
# Using uvx (Python - recommended)
uvx mcp-debug --help
# Using npx (Node.js)
npx @standardbeagle/mcp-debug --help
# Or install globally
pip install mcp-debug # Python
npm install -g @standardbeagle/mcp-debug # Node.js
# Or build from source
go install github.com/standardbeagle/mcp-debug@latest
# Start proxy with a config file
uvx mcp-debug --proxy --config config.yaml
# Or with mcp-tui for interactive testing
mcp-tui uvx mcp-debug --proxy --config config.yaml
# Basic proxy
uvx mcp-debug --proxy --config config.yaml
# With recording
uvx mcp-debug --proxy --config config.yaml --record session.jsonl
# With custom log file
uvx mcp-debug --proxy --config config.yaml --log /tmp/debug.log
Management Tools:
server_add - Add a server: {name: "fs", command: "npx -y @mcp/filesystem /path"}server_remove - Remove server completelyserver_disconnect - Disconnect server (tools return errors)server_reconnect - Reconnect with new commandserver_list - Show all servers and status# Replay recorded requests to test a server
uvx mcp-debug --playback-client session.jsonl | ./your-mcp-server
# Replay recorded responses to test a client
mcp-tui uvx mcp-debug --playback-server session.jsonl
# config.yaml
servers:
- name: "filesystem"
prefix: "fs"
transport: "stdio"
command: "npx"
args: ["-y", "@modelcontextprotocol/filesystem", "/home/user"]
timeout: "30s"
proxy:
healthCheckInterval: "30s"
connectionTimeout: "10s"
maxRetries: 3
MCP_LOG_FILE="/tmp/mcp-debug.log" # Log location
MCP_DEBUG=1 # Enable debug logging
MCP_RECORD_FILE="session.jsonl" # Auto-record sessions
MCP_CONFIG_PATH="./config.yaml" # Default config
# 1. Start with empty config
mcp-tui uvx mcp-debug --proxy --config empty-config.yaml
# 2. Add your server dynamically
server_add: {name: myserver, command: ./my-server-v1}
# 3. Test tools: myserver_read_file, myserver_process, etc.
# 4. Make changes and rebuild
go build -o my-server-v2
# 5. Hot-swap the server
server_disconnect: {name: myserver}
server_reconnect: {name: myserver, command: ./my-server-v2}
# 6. Same tools work immediately with new implementation!
uvx mcp-debug --help # Show help
uvx mcp-debug --version # Show version
uvx mcp-debug config init # Create default config
uvx mcp-debug config show # Show current config
uvx mcp-debug config validate # Validate config file
uvx mcp-debug env list # List environment variables
uvx mcp-debug env check # Check required env vars
uvx mcp-debug tools list # List tools with details
mcp-debug/
├── main.go # CLI entry point
├── config/ # Configuration loading
├── client/ # MCP client implementation
├── integration/ # Proxy server and wrapper
├── discovery/ # Tool discovery
├── proxy/ # Request forwarding
├── playback/ # Recording and playback
└── test-servers/ # Example MCP servers
# Development build
go build -o mcp-debug .
# Production build with version info
go build -ldflags "-X main.BuildTime=$(date -u +%Y-%m-%dT%H:%M:%SZ) -X main.GitCommit=$(git rev-parse HEAD)" -o mcp-debug .
# Run tests
go test ./...
See CONTRIBUTING.md for guidelines.
MIT License - see LICENSE for details.