# mcp-trace-inspector

> mcp-trace-inspector is an open-source MCP server for developer tools. Read local agent traces over MCP to see failures, approvals, token use and run diffs. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Linux, macOS, Windows
- **Repository:** https://github.com/abhishekash/mcp-trace-inspector
- **MCP Registry name:** io.github.abhishekash/mcp-trace-inspector
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [analytics and data](https://ai-powered.com/categories/analytics-and-data)
- **Listing updated:** 2026-11-23

## About

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.

## Features

- **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

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
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.

### Claude Code: Or share it with your project (.mcp.json)

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

### Claude Desktop (claude_desktop_config.json)

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

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

### Cursor (~/.cursor/mcp.json)

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

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

### VS Code (~/.copilot/mcp-config.json)

```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.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add mcp-trace-inspector -- uvx mcp-trace-inspector
```

### Codex: Or add to config.toml (~/.codex/config.toml)

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

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```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

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

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

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

### Devin Desktop (~/.config/devin/mcp_config.json)

```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.

### Cline (cline_mcp_settings.json)

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

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

### Zed (Zed settings.json)

```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.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

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

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

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

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

### Kiro (~/.kiro/settings/mcp.json)

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

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

### Other clients (your client's MCP settings (most use this shape))

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

## Tools

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_runs` (name 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.

## 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.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/mcp-trace-inspector
