Skip to main content

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

Release files for mcp-sniffer 0.1.5

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-sniffer 0.1.5
File Size Uploaded
mcp_sniffer-0.1.5.tar.gz 130.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-sniffer 0.1.5
File Interpreter ABI Platform
mcp_sniffer-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 264.6 kB

Release files / mcp_sniffer-0.1.5.tar.gz

Download URL mcp_sniffer-0.1.5.tar.gz
Size 130.7 kB
Tags Source
SHA-256 checksum
How to use checksums
833ca34cf8618e27b14fa4a032a6ad38563c2afe8009c7a53cbde9966dd01679
BLAKE2b-256 checksum
How to use checksums
26583110e089dfbaf17ad9a54e1a4292b74eeb5020672b589b5be6c9d78be795
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 28, 2025.

Transparency log

Release files / mcp_sniffer-0.1.5-py3-none-any.whl

Download URL mcp_sniffer-0.1.5-py3-none-any.whl
Size 134.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
abad55cd91de8984e6d8c63352fcbcc37e56c6552f71ed42620f8f6fa7356f98
BLAKE2b-256 checksum
How to use checksums
ea2c8179c98dc5697b5a53a87195e7d6ff659a41899342541e54301b5ee111f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 28, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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