一键导入
mcpsnoop-mcp-debugging
Debug MCP client-server traffic in real-time using mcpsnoop, a transparent proxy for Model Context Protocol communications
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Debug MCP client-server traffic in real-time using mcpsnoop, a transparent proxy for Model Context Protocol communications
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Policy-centered context budget layer that turns sprawling codebases into compact, high-signal context for AI coding agents using symbol graphs and precision tools
Control and automate Slay the Spire 2 gameplay through REST API or MCP server for AI agents
MCP server for browser automation using natural language through kogiQA, enabling AI agents to interact with web pages without selectors
Professional browser automation for Claude Code, Codex, and MCP clients powered by DrissionPage MCP Server
MCP server for Yuque (语雀) knowledge base - search, create, and manage documents through AI assistants
MCP server connecting AI assistants to Shopify Admin GraphQL API for products, orders, customers, inventory, and metafields management
| name | mcpsnoop-mcp-debugging |
| description | Debug MCP client-server traffic in real-time using mcpsnoop, a transparent proxy for Model Context Protocol communications |
| triggers | ["debug MCP traffic between client and server","inspect MCP tool calls and responses","troubleshoot MCP server communication issues","set up mcpsnoop to monitor MCP messages","replay MCP tool calls for testing","view MCP capabilities negotiation","monitor JSON-RPC frames in MCP","diagnose why MCP tool isn't being called"] |
Skill by ara.so — MCP Skills collection.
mcpsnoop is a transparent proxy for Model Context Protocol (MCP) that sits between your AI client (Claude Desktop, Cursor, Claude Code) and your MCP servers. Unlike the official MCP Inspector which connects as a separate client, mcpsnoop intercepts the actual traffic between your real client and server, showing every JSON-RPC frame live in your terminal.
go install github.com/kerlenton/mcpsnoop/cmd/mcpsnoop@latest
brew tap kerlenton/mcpsnoop
brew install mcpsnoop
Download from the Releases page for your platform.
mcpsnoop operates in two modes:
mcpsnoop -- <server-command>): Acts as a transparent proxy between client and servermcpsnoop): Displays the captured traffic in an interactive TUIThe shim and UI communicate via a well-known socket and on-disk logs, so they can start in any order.
Wrap your server command in your MCP client's configuration file. For Claude Desktop, edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"my-server": {
"command": "mcpsnoop",
"args": ["--", "node", "build/index.js"]
}
}
}
Everything after -- is your normal server launch command.
Examples:
Python server:
{
"mcpServers": {
"weather": {
"command": "mcpsnoop",
"args": ["--", "python", "-m", "weather_server"]
}
}
}
TypeScript server with npx:
{
"mcpServers": {
"filesystem": {
"command": "mcpsnoop",
"args": ["--", "npx", "-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed"]
}
}
}
Compiled binary:
{
"mcpServers": {
"custom": {
"command": "mcpsnoop",
"args": ["--", "/usr/local/bin/my-mcp-server", "--port", "8080"]
}
}
}
For servers using streamable HTTP, run mcpsnoop as a reverse proxy:
mcpsnoop http --target http://localhost:3000/mcp --listen :7000
Then point your client to http://localhost:7000.
| Command | Description |
|---|---|
mcpsnoop | Launch the interactive TUI to view traffic |
mcpsnoop -- <cmd> | Wrap a server command (shim mode) |
mcpsnoop http | Start HTTP reverse proxy |
mcpsnoop demo | Run a scripted demo session |
mcpsnoop --help | Show all options |
| Key | Action |
|---|---|
enter | Drill into frame details |
esc | Go back |
r | Replay selected tool call |
c | View capability negotiation |
y | Copy frame to clipboard |
/ | Enter filter mode |
: | Command mode |
p | Pause/unpause stream |
f | Follow mode (scroll to latest) |
ctrl-d | Delete session |
j/k | Move up/down |
ctrl-f/ctrl-b | Page forward/back |
g/G | Jump to top/bottom |
? | Show help |
Press / in the TUI to filter frames. Combine tokens with spaces (ANDed):
tool:search status:slow # Slow calls to search tool
dir:s2c kind:req # Server-to-client requests
method:tools/call id:123 # Specific method and ID
status:error tool:database # Failed database tool calls
kind:notif # All notifications
dir:c2s status:pending # Pending client requests
tool:search, tool:write_file)method:tools/call, method:initialize)req (request), resp (response), notif (notification)c2s (client-to-server), s2c (server-to-client)ok, error, slow, pendingPlain text searches match method, tool name, ID, and payload content.
mcpsnoopc to view capabilities/tool:your_tool_namePENDING status (indicates hung call) or absence of call# Start your client with mcpsnoop wrapper
# Open TUI
mcpsnoop
# Press 'c' to view capabilities screen
# Navigate between:
# - Client capabilities (what the AI client supports)
# - Server capabilities (what your server advertises)
# - Handshake details
# In TUI, navigate to a tools/call request
# Press 'r' to replay
# mcpsnoop spawns a fresh isolated server instance
# Executes the exact same call
# Shows the new response
This is useful for:
# In TUI
/status:slow
# Shows only slow calls (threshold configurable)
# Each frame shows elapsed time
# PENDING calls show live timer
Server stderr appears in the stream with special highlighting:
[STDERR] Warning: database connection slow
[STDERR] Error: timeout connecting to external API
Filter to see only stderr: /kind:notif
{
"mcpServers": {
"filesystem": {
"command": "mcpsnoop",
"args": [
"--",
"npx",
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/dev/projects"
]
}
}
}
In TUI:
# Filter to file operations
/tool:read_file
# Or see all filesystem tools
/method:tools/call
# Check which directory was authorized
# Press 'c' for capabilities, look for "roots"
{
"mcpServers": {
"database": {
"command": "mcpsnoop",
"args": ["--", "python", "db_server.py"],
"env": {
"DATABASE_URL": "postgresql://localhost/mydb"
}
}
}
}
In TUI:
# See only database queries
/tool:query
# Find slow queries
/status:slow tool:query
# Inspect a specific query
# Navigate with j/k, press enter to see full JSON
# Press 'y' to copy query details
# Terminal 1: Start your HTTP MCP server
python http_server.py --port 3000
# Terminal 2: Start mcpsnoop proxy
mcpsnoop http --target http://localhost:3000/mcp --listen :7000
# Terminal 3: View traffic
mcpsnoop
# Configure client to connect to http://localhost:7000
{
"mcpServers": {
"weather": {
"command": "mcpsnoop",
"args": ["--", "python", "weather_server.py"]
},
"database": {
"command": "mcpsnoop",
"args": ["--", "node", "db-server.js"]
},
"filesystem": {
"command": "mcpsnoop",
"args": ["--", "npx", "-y", "@modelcontextprotocol/server-filesystem", "/home/user"]
}
}
}
The TUI shows all servers in separate sessions. Use :sessions command to switch between them.
Cause: Shim hasn't started or client hasn't launched the server yet.
Solution:
Symptoms: Request shows PENDING with increasing timer, no response.
Debug:
enter on the PENDING frame to see full requestr to replay with debug loggingCheck:
# Test server command directly
node build/index.js # Or your actual command
# Check mcpsnoop can find the command
which node
which mcpsnoop
# Look at client logs
# Claude Desktop: ~/Library/Logs/Claude/
Symptoms: Client doesn't see tool server advertises.
Debug:
c in TUIinitialize responseCheck:
ls -la ~/.config/mcpsnoop/ (Linux/macOS).jsonl filesmcpsnoop demo to verify TUI worksPossible causes:
Solution: Check stderr in replay output and compare request parameters.
mcpsnoop --log-dir /custom/path
# Only log specific tools (reduces disk usage)
mcpsnoop --filter tool:search -- python server.py
# Sessions are stored as JSONL
cat ~/.config/mcpsnoop/sessions/*.jsonl | jq .
# Terminal 1: Your editor/IDE
code .
# Terminal 2: mcpsnoop TUI
mcpsnoop
# Terminal 3: Test client or manual testing
# Make changes to server code
# Restart client or use replay feature to test immediately
# Capture a successful tool call
# Press 'y' to copy JSON
# Paste into your test suite as expected output
# Replay with modified server code
# Press 'r' repeatedly while iterating
mcpsnoop logs are structured JSONL, suitable for automated testing:
# Run test, capture logs
mcpsnoop --log-dir ./test-logs -- python server.py &
# Run your MCP client test
# Parse logs
jq 'select(.kind == "response" and .status == "error")' test-logs/*.jsonl