MCP Trace

Terminal UI for debugging Model Context Protocol servers

$ mcp-monitor
┌─ Proxies ─────────────────┐ ┌─ Filters ──────────────────────────────────────┐
🟢 filesystem-server (42) │ │ 📊 All (156) 💬 Messages (42) ❗ Errors (3) │
🟡 github-server (114) │ └────────────────────────────────────────────────┘
🟢 weather-api (0) │ ┌─ Logs [FOLLOW] ─────────────────[42/156]──────┐
└───────────────────────────┘ │ 📤 [14:23:15.123] Request: list_tools │
┌─ Statistics ──────────────┐ │ 📥 [14:23:15.234] Response: 5 tools available │
│ Proxies: 3 │ │ 📤 [14:23:16.345] Request: read_file │
│ Total Requests: 156 │ └────────────────────────────────────────────────┘
└───────────────────────────┘

Features

🔍

Real-time Monitoring

Watch MCP server traffic in real-time with automatic log scrolling and instant updates.

📊

Multi-proxy Support

Monitor multiple MCP servers simultaneously with individual statistics and filtering.

🎯

Smart Filtering

Filter logs by proxy, message type, or search for specific content across all logs.

📋

Detailed Inspection

View complete JSON-RPC request and response messages in a dedicated detail view with scrolling support.

High Performance

Built with Rust for minimal overhead and maximum responsiveness.

🎨

Beautiful TUI

Modern terminal interface with emojis, colors, and intuitive keyboard controls.

Quick Start

Option 1: Install via Script (Recommended)

For macOS and Linux, run this command to automatically download and install:

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/zabirauf/mcp-trace/releases/download/v0.2.0/mcp-trace-installer.sh | sh

For manual installation, download from GitHub Releases

Option 2: Build from Source

Requires Rust toolchain installed via rustup.rs

git clone https://github.com/zabirauf/mcp-trace.git
cd mcp-trace && cargo build --release
./target/release/mcp-monitor

Start a Proxy

Once the monitor is running, start a proxy in another terminal:

./mcp-proxy --name "My Server" --command python server.py

Or on Windows:

mcp-proxy.exe --name "My Server" --command python server.py

Configure Your MCP Client

Update your MCP configuration file (usually mcp.json or cline_mcp_settings.json) to use the proxy:

{
  "mcpServers": {
    "filesystem": {
      "command": "./mcp-proxy",
      "args": [
        "--name", "filesystem", 
        "--command", "npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/files"
      ]
    },
    "github": {
      "command": "./mcp-proxy",
      "args": [
        "--name", "github", 
        "--command", "npx -y @modelcontextprotocol/server-github"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "your-token-here"
      }
    }
  }
}

The proxy will forward all environment variables to the actual MCP server while intercepting and logging all communication.