Skip to main content

mcp-debugger

Transparent proxy to debug, record, validate, and replay MCP (Model Context Protocol) sessions.

mcp-debugger demo

PyPI version CI Python versions License: MIT Coverage


✨ Features

Feature What it does
🔍 Record Capture every JSON-RPC message between an MCP client and server
📋 Inspect Browse messages with syntax-highlighted, formatted terminal output
✅ Validate Check MCP protocol compliance — handshake order, method names, schemas
🔄 Replay Regression-test server changes by replaying recorded sessions
📊 Stats Visualise tool usage, latency trends, and error rates
🔀 Compare Delta reports between two sessions (latency, errors, tool calls)
📤 Export JSON, Markdown, or OpenTelemetry (OTLP) traces
⚙️ Config Persistent user preferences — aliases, timeouts, defaults
🩺 Doctor Environment diagnostics — Python version, SQLite, Node.js, paths
🚀 Local-first No cloud, no signup — all data stays on your machine

📦 Installation

pip install mcp-debugger

With optional OpenTelemetry (OTLP) export support:

pip install "mcp-debugger[otlp]"

Requirements: Python 3.11+, Node.js (for npx-based MCP servers)


🚀 Quickstart

1. Record a session

mcp-debugger proxy \
  --server "npx -y @modelcontextprotocol/server-filesystem /tmp" \
  --name "my-first-session"

Interact with your MCP client (e.g. Claude Desktop). Press Ctrl+C to stop.

2. List recorded sessions

mcp-debugger list

3. Inspect a session

mcp-debugger inspect 1

4. Validate protocol compliance

mcp-debugger validate --server "npx -y @modelcontextprotocol/server-filesystem /tmp"

5. Replay against a new server version

mcp-debugger replay 1 --server "npx -y @modelcontextprotocol/server-filesystem /tmp"

6. Export to Markdown

mcp-debugger export 1 --format markdown --output session-report.md

🔧 Use with Claude Desktop

Edit your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "my-filesystem": {
      "command": "mcp-debugger",
      "args": [
        "proxy",
        "--server",
        "npx -y @modelcontextprotocol/server-filesystem /path/to/dir",
        "--name",
        "claude-session"
      ]
    }
  }
}

Every message between Claude and your server is now recorded transparently.


📖 Documentation

Document Description
Command Reference Every CLI command with all options and examples
Architecture How it works — components, data flow, sequence diagrams
Tutorials Step-by-step workflows for common use cases
Configuration All config keys, defaults, and examples
FAQ Common questions and troubleshooting
Contributing Development setup, test structure, PR process
Changelog Version history

🧪 Development Setup

git clone https://github.com/sushant-mutnale/mcp-debugger.git
cd mcp-debugger
python -m venv .venv
source .venv/bin/activate      # Linux/macOS
# or: .venv\Scripts\activate   # Windows
pip install -e ".[dev]"

# Run all tests
pytest

# With coverage
pytest --cov=mcp_debugger --cov-report=term-missing

# Lint and type-check
ruff check .
mypy src/mcp_debugger --ignore-missing-imports

🤝 Contributing

See CONTRIBUTING.md for setup instructions, coding style, and pull request process.


📄 License

MIT © Sushant Mutnale

Metadata

Release files for mcp-debugger 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-debugger 0.1.1
File Size Uploaded Provenance
mcp_debugger-0.1.1.tar.gz 449.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-debugger 0.1.1
File Interpreter ABI Platform
mcp_debugger-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 517.7 kB

Release files / mcp_debugger-0.1.1.tar.gz

Download URL mcp_debugger-0.1.1.tar.gz
Size 449.4 kB
Tags Source
SHA-256 checksum
How to use checksums
48aa648b54b31e31a12fc764052466c892aa2b1dc17ba69ed358ed076dfbef04
BLAKE2b-256 checksum
How to use checksums
32c494e8d10578f9f851c03eba6d1471240e0ea4605515761a44c832ce3ef3e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / mcp_debugger-0.1.1-py3-none-any.whl

Download URL mcp_debugger-0.1.1-py3-none-any.whl
Size 68.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2e83c1b6a304ed9f748a12c1f79541e9a8e2a5c71a3ec3d5bef5e68bfe5448e
BLAKE2b-256 checksum
How to use checksums
5b1482fe4c627ae65557ab903bc70bc3839b8c083bf43fd9605ab06bf46259d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for mcp-debugger 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page