Skip to content
MCP server

mcp-trace-inspector

Read local agent traces over MCP to see failures, approvals, token use and run diffs

Runs locally

mcp-trace-inspector is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, Linux, macOS
Runs
Locally
Version
0.3.1
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add mcp-trace-inspector -- uvx mcp-trace-inspector

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "mcp-trace-inspector": {
      "command": "uvx",
      "args": [
        "mcp-trace-inspector"
      ]
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "mcp-trace-inspector": {
      "command": "uvx",
      "args": [
        "mcp-trace-inspector"
      ]
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "mcp-trace-inspector": {
      "command": "uvx",
      "args": [
        "mcp-trace-inspector"
      ]
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "mcp-trace-inspector": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-trace-inspector"
      ]
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add mcp-trace-inspector -- uvx mcp-trace-inspector

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.mcp-trace-inspector]
command = "uvx"
args = ["mcp-trace-inspector"]

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "mcp-trace-inspector": {
      "command": "uvx",
      "args": [
        "mcp-trace-inspector"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "mcp-trace-inspector": {
          "command": "uvx",
          "args": [
            "mcp-trace-inspector"
          ]
        }
      }
    }

    Or run: gemini mcp add -s user mcp-trace-inspector uvx -- mcp-trace-inspector

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "mcp-trace-inspector": {
          "command": "uvx",
          "args": [
            "mcp-trace-inspector"
          ]
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "mcp-trace-inspector": {
          "command": "uvx",
          "args": [
            "mcp-trace-inspector"
          ]
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "mcp-trace-inspector": {
          "command": "uvx",
          "args": [
            "mcp-trace-inspector"
          ]
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "mcp-trace-inspector": {
          "command": "uvx",
          "args": [
            "mcp-trace-inspector"
          ]
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "mcp-trace-inspector": {
          "command": "uvx",
          "args": [
            "mcp-trace-inspector"
          ]
        }
      }
    }

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "mcp-trace-inspector": {
          "command": "uvx",
          "args": [
            "mcp-trace-inspector"
          ]
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "mcp-trace-inspector": {
          "command": "uvx",
          "args": [
            "mcp-trace-inspector"
          ]
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

About mcp-trace-inspector

Formerly named mcp-trace-inspector, this project is now called SpanHound. It starts from a concrete bug: a harness blocked a shell command that reached outside the workspace, but the old trace only recorded that run_shell was called, not the error it returned. SpanHound keeps that bounded diagnostic and makes it queryable.

Traces come from three places: JSONL span files, saved OpenTelemetry JSON exports, or a local OTLP/HTTP receiver on loopback. For Python agents, spanhound run wraps the program and captures calls from OpenAI, Anthropic, OpenAI Agents, HTTPX and Requests without editing the agent. The MCP tools are read-only and work on stored files, with polling for runs still being written; they do not push events or guess intent from a final answer.

No trace backend, account or client is needed to try it, since uvx spanhound demo replays a bundled failure. The README notes it does not read Jaeger, Tempo or Traceloop exports and points to other tools for those.

Tools this server provides (10)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 1 of 10 tools reads data; 9 names don't say.

From the server's own tool labels and tool names; not verified by us.

list_runsName suggests: reads
List captured runs.
slowest_spans
Show the longest model or tool spans in a run.
approval_log
Show recorded approval decisions.
span_tree
Show the span tree for a run.
token_usage
Run-level token usage totals.
failure_report
Redacted diagnostics for failing tools.
tool_stats
Error rates, denials and p95 latency by tool.
security_audit
Caller, tenant, server provenance, risk and missing-evidence findings.
recent_activity
Cursor-based polling of newly written spans.
compare_runs
Cost, latency, token, tool call and failure deltas between runs.

What it does

Failure reports
Redacted diagnostics, error rates, denials and p95 latency per tool.
Approval log
Shows the recorded approval decision and what executed afterwards.
Run comparison
Compares cost, latency, tokens, tool calls and failures between runs.
Token usage
Run-level usage totals alongside the span tree.
Local OTLP capture
Receives OTLP/HTTP on loopback and stores each request as a JSON file.
One-command demo
uvx spanhound demo replays a bundled recorded failure with no setup.

Good for

  • Find out why yesterday's agent run stalled
  • Check whether an agent acted after a write was denied
  • Compare a model version against the previous one on cost and failures
  • Audit which caller and tool were allowed to act

Pricing

Open source

Open source; a licence file is linked from the repo

mcp-trace-inspector FAQ

What trace formats does mcp-trace-inspector read?

JSONL spans and OTLP JSON exports, plus OTLP/HTTP received locally.

Do I need a tracing backend?

No. It reads files in a local directory.

How do I install mcp-trace-inspector?

Run it with uvx spanhound --trace-dir ./traces; the PyPI package is mcp-trace-inspector in the registry entry.

Does mcp-trace-inspector trace my agent automatically?

For Python it can instrument supported libraries with spanhound[auto]; it does not trace arbitrary agent functions.

Is mcp-trace-inspector free?

Yes. mcp-trace-inspector is open source, so you can use and self-host it for free.

How do I add mcp-trace-inspector to Claude Code?

Run this command in your terminal: claude mcp add mcp-trace-inspector -- uvx mcp-trace-inspector

What are the best alternatives to mcp-trace-inspector?

The closest alternatives to mcp-trace-inspector are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers