MCP Sniffer
@shivdeepak
MCP Sniffer captures network traffic between MCP clients and servers and displays it in a web UI.
概览
What is MCP Sniffer?
MCP Sniffer captures network traffic between MCP clients and servers. It runs as a reverse proxy between the client and server, capturing request and response payloads that can be visualized in a web UI, similar to the Network tab in Chrome DevTools.
How to use MCP Sniffer?
Install via pipx install mcp-sniffer, then run the server using mcp-sniffer --listen-port <port> --upstream-port <port>. Configure host and port settings via command-line options or environment variables. Access the web UI at the default address http://127.0.0.1:8888.
Key features of MCP Sniffer
- Acts as a reverse proxy between MCP client and server.
- Captures request and response payloads in real time.
- Web UI for visualizing captured traffic.
- Configurable listen, upstream, and web UI hosts/ports.
- Supports environment variables for all configuration options.
- Log level can be adjusted via
--log-level.
Use cases of MCP Sniffer
- Debugging MCP client-server communication.
- Inspecting MCP protocol payloads during development.
- Monitoring MCP traffic for integration testing.
FAQ from MCP Sniffer
What does MCP Sniffer do?
It sits as a reverse proxy between an MCP client and server, recording all request and response payloads, and displays them in a web interface for inspection.
How do I install MCP Sniffer?
Install it with pipx install mcp-sniffer. pipx is recommended for isolated Python application installation.
How do I configure MCP Sniffer?
Use command-line flags like --listen-port, --upstream-port, --web-ui-host, and --web-ui-port, or set the corresponding environment variables (LISTEN_PORT, UPSTREAM_PORT, etc.).
Where do I view captured traffic?
Open a browser to http://127.0.0.1:8888 (or the configured web UI host/port) to see the web interface.
Can I change the log level?
Yes, use --log-level (e.g., INFO, DEBUG) or set the LOG_LEVEL environment variable.