MCPInstall
mcp-sniffer logo

mcp-sniffer

by shivdeepak 2 stars shivdeepak/mcp-sniffer

MCP Sniffer captures network traffic between MCP clients and servers and displays it in a web UI.

READMEmain

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.

The following diagram shows how MCP Sniffer fits into the MCP Client-Server Model.

Flow Diagram

For the Web UI - Imagine Google Chrome DevTools' Network Tab for Model Context Protocol.

Following is a very early version of it.

Browse Connections

PyPI - License PyPI - Python Version

Install

pipx install mcp-sniffer

Usage

$ mcp-sniffer --help
usage: mcp-sniffer [-h] [--listen-host LISTEN_HOST] [--listen-port LISTEN_PORT] [--upstream-host UPSTREAM_HOST]
                   [--upstream-port UPSTREAM_PORT] [--web-ui-host WEB_UI_HOST] [--web-ui-port WEB_UI_PORT]
                   [--log-level LOG_LEVEL]

MCP Sniffer

options:
  -h, --help            show this help message and exit
  --listen-host LISTEN_HOST
                        Host to listen on (default: env LISTEN_HOST or 127.0.0.1)
  --listen-port LISTEN_PORT
                        Port to listen on (default: env LISTEN_PORT or 3002)
  --upstream-host UPSTREAM_HOST
                        Upstream host (default: env UPSTREAM_HOST or 127.0.0.1)
  --upstream-port UPSTREAM_PORT
                        Upstream port (default: env UPSTREAM_PORT or 3001)
  --web-ui-host WEB_UI_HOST
                        Web UI host (default: env WEB_UI_HOST or 127.0.0.1)
  --web-ui-port WEB_UI_PORT
                        Web UI port (default: env WEB_UI_PORT or 8888)
  --log-level LOG_LEVEL
                        Log level (default: env LOG_LEVEL or INFO)

Run

mcp-sniffer --listen-port 3002 --upstream-port 3001
INFO:     Started server process [6174]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
2025-04-27 19:52:53 devmachine.local mcp_sniffer.proxy[6174] INFO Listening on ('127.0.0.1', 3002)...
INFO:     Uvicorn running on http://127.0.0.1:8888 (Press CTRL+C to quit)

Web UI

Visit http://127.0.0.1:8888.

Setup Setup

More Monitoring MCP servers

Similar servers from the same category.

VictoriaLogs

victoriametrics-community

Provides a bridge between VictoriaLogs and language models for querying and analyzing log data, enabling DevOps teams to troubleshoot issues and extract insights without writing complex query syntax.

LogText+2

VictoriaMetrics

victoriametrics-community

Provides direct access to VictoriaMetrics monitoring instances for querying metrics, exploring time series data, analyzing alerting rules, and debugging configurations without requiring online access.

TextModel+1

Provides structured access to CloudWatch Logs data for searching, analyzing, and correlating logs across AWS services to help with troubleshooting and pattern identification.

search

Understand how your Worker projects are performing via logs, traces, and other data sources.

Monitoring