1111 [ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-yellow.svg )] ( https://opensource.org/licenses/MIT )
1212</div >
1313
14- MCPHawk is a passive network analyzer for ** Model Context Protocol (MCP)** traffic, providing deep visibility into MCP client-server interactions. Think Wireshark meets mcpinspector, purpose-built for the MCP ecosystem.
14+ MCPHawk is a new Logging & Monitoring solution for ** Model Context Protocol (MCP)** traffic, providing deep visibility into MCP client-server interactions. It started off as a mix between Wireshark and mcpinspector, purpose-built for the MCP ecosystem, and is now slowly turning into something more .
1515
1616** Key Capabilities:**
17- - ** Protocol-Aware Capture** : Understands MCP's JSON-RPC 2.0 transport layer, capturing and reassembling messages from raw TCP streams
18- - ** Transport Agnostic** : Monitors MCP traffic across all standard transports
19- - ** Zero-Configuration Monitoring** : Passively observes MCP communication without proxies, certificates, or modifications to clients/servers
20- - ** Full Message Reconstruction** : Advanced TCP stream reassembly handles fragmented packets, chunked HTTP transfers, and SSE streams
17+ - ** Protocol-Aware Capture** : Understands MCP's JSON-RPC 2.0 transport layer, capturing and reassembling messages from stdio pipes and HTTP streams
18+ - ** Transport Agnostic** : Monitors MCP traffic across all standard transports (stdio, HTTP Streaming, HTTP+SSE)
19+ - ** Full Message Reconstruction** : Advanced stream reassembly handles fragmented packets, chunked HTTP transfers, SSE streams, and stdio pipes
2120
2221<img src =" examples/branding/mcphawk_screenshot.png " alt =" MCPHawk Screenshot " width =" 100% " >
2322
@@ -29,9 +28,7 @@ MCPHawk is a passive network analyzer for **Model Context Protocol (MCP)** traff
2928 - ** Responses** : Success results and error responses with matching IDs
3029 - ** Notifications** : Fire-and-forget method calls without IDs
3130 - ** Batch Operations** : Support for JSON-RPC batch requests/responses
32- - ** Transport-Specific Handling** :
33- - ** HTTP/SSE** : Full support for MCP's streaming HTTP transport with Server-Sent Events
34- - ** TCP Direct** : Raw TCP stream reconstruction for custom implementations
31+ - ** Transport-Specific Handling** : See MCP Transport Support table below for full details
3532 - ** Chunked Transfer** : Handles HTTP chunked transfer encoding transparently
3633- ** Protocol Compliance** : Validates JSON-RPC 2.0 structure and MCP-specific extensions
3734
@@ -67,11 +64,11 @@ MCPHawk is a passive network analyzer for **Model Context Protocol (MCP)** traff
6764
6865| Official MCP Transport | Protocol Version | Capture Support | Details |
6966| ------------------------| ------------------| :---------------:| ---------|
70- | ** stdio** | All versions | coming soon :) | secret |
71- | ** HTTP** (Streamable HTTP) | 2025-03-26+ | ✅ Full | HTTP POST with optional SSE streaming responses |
67+ | ** stdio** | All versions | ✅ Full | Process wrapper transparently captures stdin/stdout between client and server |
68+ | ** HTTP Streaming ** | 2025-03-26+ | ✅ Full | HTTP POST with optional SSE streaming responses |
7269| ** HTTP+SSE** (deprecated) | 2024-11-05 | ✅ Full | Legacy transport with separate SSE endpoint |
7370
74- Disclaimer: TCP direct traffic with JSON-RPC is also captured and marked as unknown (should you have custom stuff you shouldn't)
71+ Note: Raw TCP traffic with JSON-RPC is also captured and marked as " unknown" transport type
7572
7673## Comparison with Similar Tools
7774
@@ -87,7 +84,7 @@ Disclaimer: TCP direct traffic with JSON-RPC is also captured and marked as unkn
8784| MCP server for data access | ✅ | ❌ | ❌ |
8885| No client/server config needed | ✅ | ❌ | ✅ |
8986| Interactive testing/debugging | ❌ | ✅ | ❌ |
90- | Proxy/MITM capabilities | ❌ | ✅ | ❌ |
87+ | Proxy/MITM capabilities | ✅ (stdio) | ✅ | ❌ |
9188
9289** When to use each tool:**
9390- ** MCPHawk** : Passive monitoring, protocol analysis, debugging MCP implementations, understanding traffic patterns
@@ -163,6 +160,22 @@ sudo mcphawk web --port 3000 --host 0.0.0.0 --web-port 9000
163160sudo mcphawk sniff --port 3000 --debug
164161sudo mcphawk web --port 3000 --debug
165162
163+ # Wrap an MCP server to capture stdio traffic
164+ mcphawk wrap /path/to/mcp-server --arg1 --arg2
165+
166+ # Example: Wrap Context7 MCP server to monitor Claude Desktop's documentation lookups
167+ mcphawk wrap npx -y @upstash/context7-mcp@latest
168+
169+ # Claude Desktop config to use the wrapped version:
170+ # {
171+ # "mcpServers": {
172+ # "context7": {
173+ # "command": "mcphawk",
174+ # "args": ["wrap", "npx", "-y", "@upstash/context7-mcp@latest"]
175+ # }
176+ # }
177+ # }
178+
166179# Start MCP server with Streamable HTTP transport (default)
167180mcphawk mcp --transport http --mcp-port 8765
168181
@@ -282,7 +295,7 @@ Vote for features by opening a GitHub issue!
282295
283296- [x] ** Auto-detect MCP traffic** - Automatically discover MCP traffic on any port without prior configuration
284297- [x] ** MCP Server Interface** - Expose captured traffic via MCP server for AI agents to query and analyze traffic patterns
285- - [ ] ** Stdio capture** - eBPF Integration (Linux/macOS) Trace read/write system calls for pipe communication
298+ - [x ] ** Stdio capture** - Transparent process wrapper to capture stdin/stdout communication
286299- [ ] ** Protocol Version Detection** - Identify and display MCP protocol version from captured traffic
287300- [ ] ** Smart Search & Filtering** - Search by method name, params, or any JSON field with regex support
288301- [ ] ** Performance Analytics** - Request/response timing, method frequency charts, and latency distribution
0 commit comments