MCP Agent Trace Inspector logo

MCP Agent Trace Inspector

Trace MCP agent workflows locally, inspect runs, compare steps, export telemetry, and apply alerts or retention policies.

Install MCP Agent Trace Inspector

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mcp-agent-trace-inspector": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-agent-trace-inspector@latest"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

The install command started, but didn't respond the way we expected when we tried to talk to it.

npx -y mcp-agent-trace-inspector@latest

initialize succeeded but no response to tools/list.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

mcp-agent-trace-inspector records agent workflow steps in a local SQLite database through explicit MCP calls to start, update, and finish traces. It calculates latency, token, cost, and reasoning summaries, then supports comparisons, dashboards, OTLP/JSON exports, and compliance logs. Reach for it when you need local-first observability without a cloud account or when you want controlled trace retention and threshold alerts. It runs over stdio by default or as a stateless Streamable HTTP endpoint with optional authentication.

Use cases

  • Trace each tool call in an agent workflow
  • Compare two agent runs step by step
  • Export a local run as an HTML dashboard
  • Generate OTLP or compliance audit data
  • Apply latency, error-rate, and cost alerts

Key features

  • Local SQLite trace storage
  • Explicit MCP trace lifecycle tools
  • Latency, token, cost, and reasoning summaries
  • HTML, OTLP/JSON, and compliance exports
  • Persisted alerts with optional webhooks
  • Configurable retention and HTTP authentication

Tools13

What MCP Agent Trace Inspector lets your agent do. Expand a tool for its parameters.

Self-reported~317 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

15/15 checks healthy over the last 83d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 3d ago via OSV.dev · mcp-agent-trace-inspector@latest (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads569Package downloads in the last 30 days.
Last commit6d agoMost recent push to the default branch.
Install checkInconclusiveStarted but did not complete the MCP handshake in our test.
Tools exposed13Callable tools this server registers over MCP.
Directory activity7 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Agent Trace Inspector works

What mcp-agent-trace-inspector does

mcp-agent-trace-inspector gives MCP clients a structured way to record and inspect agent workflows. An agent begins a trace with trace_start, submits each workflow action through trace_step, and closes the run with trace_end. Recorded data is stored locally in SQLite, with an append-only JSONL audit log for compliance-oriented review.

Trace records can include tool inputs and outputs, latency, caller-provided or automatically estimated token counts, and cost estimates. The server can identify reasoning, thinking, and planning steps, calculate aggregate totals, and compare two runs at both the summary and step positions.

How it works

The default transport is stdio. The server can also expose a stateless Streamable HTTP endpoint at POST /mcp; each request creates a fresh MCP server and transport, and the endpoint does not provide a server-initiated SSE stream. HTTP mode supports optional API-key authentication, HS256 JWT authentication, request rate limiting, and a loopback-oriented host protection check.

SQLite is the primary store and defaults to ~/.mcp/traces.db. A project can use another database path, including an in-memory database for tests. Trace completion evaluates configured latency, error-rate, and cost rules. Matching alerts can be sent to Slack or a generic webhook when configured.

Setup and configuration

Node.js 22.13.0 or newer and npm are required. An MCP client can launch the package with:

config.json
{
  "mcpServers": {
    "trace-inspector": {
      "command": "npx",
      "args": ["-y", "mcp-agent-trace-inspector@latest"]
    }
  }
}

Use --db or --db-path to select a database file. Other supported startup options control retention at launch, pricing data, automatic token counting, and HTTP mode. A JSON pricing table can override entries in the built-in table. Set --no-token-count when automatic counting is not wanted.

HTTP deployments can set MCP_API_KEY, MCP_JWT_SECRET, or both. API-key requests use X-API-Key; JWT requests use an HS256 bearer token, with exp and nbf claims checked. The stdio transport ignores these variables. Non-loopback HTTP deployments should use TLS and an authenticating reverse proxy rather than exposing the raw endpoint.

Tools and capabilities

  • trace_start, trace_step, and trace_end manage a trace lifecycle. Steps submitted after completion are rejected, while repeated trace_end calls are idempotent.
  • list_traces returns traces newest first and accepts a positive integer limit.
  • get_trace_summary reports step and token totals, latency, duration, estimated cost, and reasoning detection.
  • compare_traces compares aggregates, tool coverage, and steps by position.
  • extract_reasoning_chain filters a trace to reasoning, thinking, and planning steps.
  • export_dashboard creates standalone HTML with error rows, expandable JSON, and a latency waterfall.
  • export_otel produces OTLP/JSON resourceSpans, scopeSpans, and spans for one or all traces.
  • export_compliance_log emits JSON or CSV audit data with optional date bounds.
  • configure_alerts, set_retention_policy, and apply_retention manage alerts and local trace lifecycle.

Limitations and notes

Tracing is explicit: the inspector records a step only when the agent calls trace_step, so it does not automatically intercept activity from other MCP servers. HTTP mode is stateless and accepts only POST requests at /mcp. The default HTTP bind address is loopback, and the request body limit is 10 MB. Retention policy configuration must occur before applying that policy in the same process. Cost figures are estimates based on offline tokenization and pricing data, not billing-account information.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Agent Trace Inspector

mcp-agent-trace-inspector is an MCP server that connects to MCP agent workflows through explicit trace calls. Its main tools start, record, and end traces, then summarize, compare, export, alert on, and retain those traces in local SQLite storage without requiring a cloud account or API key.

Install it by adding an MCP configuration that runs `npx -y mcp-agent-trace-inspector@latest`. Node.js 22.13.0 or newer and npm are required. You can also build from source with `npm ci`, `npm run build`, and `node dist/index.js`.

Yes, it can be configured as a stdio MCP server in Cursor. Use the package command with `npx -y mcp-agent-trace-inspector@latest`, then have the agent call `trace_start`, `trace_step`, and `trace_end` explicitly.

It stores traces in a local SQLite database, using `~/.mcp/traces.db` by default. You can select another path with `--db` or `--db-path`, and the server also writes an append-only JSONL audit log.

Yes, start it with `--http-port` to use the stateless Streamable HTTP transport at `POST /mcp`. Optional API-key and HS256 JWT authentication are available through environment variables, and deployments outside loopback should use TLS and an authenticating reverse proxy.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Agent Trace Inspector AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mcp-agent-trace-inspector?style=directory)](https://allmcps.com/mcp/mcp-agent-trace-inspector)
HTML Embed
<a href="https://allmcps.com/mcp/mcp-agent-trace-inspector"><img src="https://allmcps.com/api/badge/mcp-agent-trace-inspector?style=directory" alt="MCP Agent Trace Inspector on AllMCPs" /></a>