
Mcp Agent Trace Inspector
This is local-first observability for MCP tool chains. Every tool call, token count, and latency measurement lands in a local SQLite database instead of a cloud service. You get 13 tools covering the full lifecycle: trace_start and trace_step to capture workflow execution, export_dashboard to generate a self-contained HTML waterfall view, compare_traces to diff two runs side by side, and configure_alerts for Slack or webhook notifications. Token cost estimates run offline using tiktoken and a configurable pricing table. Adds under 5ms overhead per step. Reach for this when your traces contain sensitive data that can't leave your machine, or when you need MCP-native instrumentation without LangSmith's API keys and account setup.
- tools
- 13
- auth
- Secret needed
- transport
- STDIO
- env vars
- 2
- last updated
- Nov 4, 2026
Tools
13 toolsPublic tool metadata for what this MCP can expose to an agent.
trace_startBegin a trace. Returns a trace_id.
Begin a trace. Returns a trace_id.
No parameter schema in public metadata yet.
trace_stepRecord one step for a running trace.
Record one step for a running trace.
No parameter schema in public metadata yet.
trace_endMark a trace completed, evaluate alert rules, and return fired alerts.
Mark a trace completed, evaluate alert rules, and return fired alerts.
No parameter schema in public metadata yet.
list_tracesList traces, newest first.
List traces, newest first.
No parameter schema in public metadata yet.
get_trace_summaryStep/token/latency totals, duration, cost estimate, reasoning detection.
Step/token/latency totals, duration, cost estimate, reasoning detection.
No parameter schema in public metadata yet.
compare_tracesDiff two traces: aggregates, tool coverage, and per-position steps.
Diff two traces: aggregates, tool coverage, and per-position steps.
No parameter schema in public metadata yet.
extract_reasoning_chainReturn only reasoning/thinking/planning steps.
Return only reasoning/thinking/planning steps.
No parameter schema in public metadata yet.
export_dashboardSelf-contained HTML dashboard with error rows, expandable JSON, and latency waterfall.
Self-contained HTML dashboard with error rows, expandable JSON, and latency waterfall.
No parameter schema in public metadata yet.
export_otelOTLP/JSON document (resourceSpans → scopeSpans → spans) for one trace or all traces.
OTLP/JSON document (resourceSpans → scopeSpans → spans) for one trace or all traces.
No parameter schema in public metadata yet.
export_compliance_logAudit log as JSON or CSV, optionally filtered by from_date / to_date.
Audit log as JSON or CSV, optionally filtered by from_date / to_date.
No parameter schema in public metadata yet.
configure_alertsPersist alert rules (latency, error_rate, cost). Optional Slack/generic webhooks.
Persist alert rules (latency, error_rate, cost). Optional Slack/generic webhooks.
No parameter schema in public metadata yet.
set_retention_policySet the in-process retention policy (days).
Set the in-process retention policy (days).
No parameter schema in public metadata yet.
apply_retentionArchive traces older than N days; delete archived traces older than 2×N days.
Archive traces older than N days; delete archived traces older than 2×N days.
No parameter schema in public metadata yet.
Sponsors
Configuration
MCP_API_KEYsecretOptional API key for the Streamable HTTP transport (stdio does not require it).
MCP_JWT_SECRETsecretOptional HMAC-SHA256 secret for Bearer JWTs on the Streamable HTTP transport.
Readme
MCP Agent Trace Inspector
Local-first, MCP-native observability for agent workflows. Every tool call, prompt transformation, latency, token estimate, and cost estimate is recorded in a local SQLite database — no cloud account, no API key, and no traces leaving your machine.
Built specifically for MCP rather than bolted onto a generic LLM proxy.
Tools · Configuration · HTTP transport · Verification · Known limitations · Contributing
Overview
mcp-agent-trace-inspector is an MCP server. Agents call its tools to start a trace,
record each step they take, and finish the trace. Humans then inspect summaries,
compare runs, export a self-contained HTML dashboard, export OTLP/JSON spans, or
stream the compliance audit log.
Agent / MCP client
│ trace_start → trace_step → trace_end
▼
MCP Agent Trace Inspector
├── SQLite (~/.mcp/traces.db)
├── JSONL audit log (~/.mcp/trace-inspector-audit.jsonl)
└── tools: summaries, diffs, HTML, OTLP/JSON, retention, alerts
Key features
Details
- Repository
- github.com/dbsectrainer/mcp-agent-trace-inspector
- Categories
- AI & LLM Tools, Monitoring & Observability
- Package
mcp-agent-trace-inspector- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active