mcp-sniffer
MCP Sniffer captures network traffic between MCP clients and servers and displays it in a web UI.
claude mcp add --transport stdio shivdeepak-mcp-sniffer pipx run mcp-sniffer \ --env LOG_LEVEL="Log level (default: INFO)" \ --env LISTEN_HOST="Host to listen on (default: 127.0.0.1)" \ --env LISTEN_PORT="Port to listen on (default: 3002)" \ --env WEB_UI_HOST="Web UI host (default: 127.0.0.1)" \ --env WEB_UI_PORT="Web UI port (default: 8888)" \ --env UPSTREAM_HOST="Upstream MCP server host (default: 127.0.0.1)" \ --env UPSTREAM_PORT="Upstream MCP server port (default: 3001)"
How to use
MCP Sniffer acts as a reverse proxy between MCP clients and servers, capturing request and response payloads so you can visualize traffic in a web UI, similar to a browser's Network tab but for Model Context Protocol. After installation, run the tool to start a local proxy that observes MCP conversations and serves a Web UI for inspection. Use the CLI options to customize where it listens and where it forwards traffic, as well as the Web UI location. The UI lets you inspect individual MCP requests and responses, filter by connections, and review payloads captured by the proxy.
How to install
Prerequisites:
- Python 3.8+ installed on your system
- pipx (recommended) or pip
Installation steps:
-
Install MCP Sniffer via pipx (recommended): pipx install mcp-sniffer
-
Alternatively, install with pip (if you don't use pipx): pip install mcp-sniffer
-
Run the MCP Sniffer: mcp-sniffer --listen-host 127.0.0.1 --listen-port 3002 --upstream-host 127.0.0.1 --upstream-port 3001 --web-ui-host 127.0.0.1 --web-ui-port 8888
-
Open the Web UI in your browser at http://127.0.0.1:8888
Notes:
- You can configure environment variables to set defaults (see mcp_config for details).
- If you are running inside containers, ensure port mappings expose the UI and proxy ports appropriately.
Additional notes
Tips and common issues:
- Ensure the upstream MCP server is reachable from the machine running the sniffer; firewall rules may block the port.
- The Web UI runs on a separate port; make sure you can access it from your browser.
- Use the environment variable options (LISTEN_HOST, LISTEN_PORT, UPSTREAM_HOST, UPSTREAM_PORT, WEB_UI_HOST, WEB_UI_PORT, LOG_LEVEL) to tailor the deployment.
- If you encounter TLS/SSL requirements on the upstream, you may need additional configuration or a local MITM setup depending on your network.
- The sniffer stores traffic in the live session only; consider capturing long sessions by widening the listen window and ensuring sufficient resources for payloads.
Related MCP Servers
python-utcp
Official python implementation of UTCP. UTCP is an open standard that lets AI agents call any API directly, without extra middleware.
augments
Comprehensive MCP server providing real-time framework documentation access for Claude Code with intelligent caching, multi-source integration, and context-aware assistance.
local -gateway
Aggregate multiple MCP servers into a single endpoint with web UI, OAuth 2.1, and profile-based tool management
mcp-sys-bridge
An implementation of the Model Context Protocol (MCP), acting as a simple bridge to native OS functionalities like clipboard management and URL handling.
mini_claude
Give Claude Code persistent memory across sessions. Track habits, log mistakes, prevent death spirals. Runs locally with Ollama.
fastmcp-builder
A comprehensive Claude Code skill for building production-ready MCP servers using FastMCP. Includes reference guides, runnable examples, and a complete implementation with OAuth, testing, and best practices.