MCP Agent Trace Inspector
About
Step-by-step observability for MCP agent workflows — trace, inspect, and debug multi-step agent executions
Details
- Author
- dbsectrainer
- Categories
- Developer Tools, Infrastructure, AI
Jump to
Setup
Install MCP Agent Trace Inspector in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/dbsectrainer/mcp-agent-trace-inspector
Follow the installation instructions in the repository README, then restart your MCP client.
Step-by-step observability for MCP agent workflows — trace, inspect, and debug multi-step agent executions
Local-first, MCP-native observability for agent workflows. Every tool call, prompt transformation, latency, and token count is recorded in a local SQLite database — no cloud account, no API key, no traces leaving your machine. Built specifically for MCP rather than bolted onto a generic LLM proxy.
Tool reference|Configuration|Contributing|Troubleshooting|Design principles
- Tool call tracing: Captures inputs, outputs, latency, and token usage for every step in a workflow.
- Persistent storage: Traces survive session restarts; stored locally in SQLite with no external dependencies.
- HTML dashboard: Generates a self-contained single-file dashboard with an interactive step timeline.
- Token cost estimation: Calculates USD cost per trace using a configurable model pricing table — no API calls required.
- Trace comparison: Diff two traces side by side to measure the impact of prompt or tool changes.
- Low overhead: Adds less than 5ms per step; never becomes the bottleneck.
If your traces contain sensitive tool outputs, proprietary prompts, or data that must stay on-device, this is the right tool. If you need cross-team trace sharing or a managed SaaS, use LangSmith.
mcp-agent-trace-inspectorstores tool call inputs and outputs locally in a SQLite database. Traces may contain sensitive information passed to or returned from your tools. Review trace contents before sharing dashboard exports. Traces are not automatically transmitted; optional alert webhooks are available.
Add the following config to your MCP client:
{ "mcpServers": { "trace-inspector": { "command": "npx", "args": ["-y", "mcp-agent-trace-inspector@latest"] } } }
{ "mcpServers": { "trace-inspector": { "command": "npx", "args": [ "-y", "mcp-agent-trace-inspector@latest", "--db=~/traces/my-project.db" ] } } }
Amp · Claude Code · Cline · Cursor · VS Code · Windsurf · Zed
Enter the following in your MCP client to verify everything is working:
Start a trace called "test-run", then list the files in the current directory, then end the trace and show me the summary.
Your client should return a summary showing step count, total tokens, and latency.
- trace_start— begin a new trace; returns atrace_idfor subsequent calls
- trace_step— record one tool call step (inputs, outputs, optional token count and latency)
- trace_end— mark a trace as completed
- list_traces— list stored traces with names, statuses, and timestamps
- get_trace_summary— token totals, step count, latency, and cost estimate for a trace
- compare_traces— diff two traces side by side (step counts, tokens, latency)
- extract_reasoning_chain— extract only reasoning/thinking steps from a trace
- export_dashboard— generate a self-contained single-file HTML dashboard with latency waterfall
- export_otel— export one or all traces in OpenTelemetry OTLP JSON span format
- export_compliance_log— export the compliance audit log as JSON or CSV, with optional date range filtering
- configure_alerts— configure alert rules on latency, error rate, or cost; fire to Slack or generic webhooks
- set_retention_policy— set how many days to keep traces (in-memory; must be called beforeapply_retention)
- apply_retention— archive traces older than the configured threshold; delete traces past 2x the threshold
Path to the SQLite database file used to store traces.
Automatically delete traces older than N days. Set to0to disable.
Path to a JSON file containing custom model pricing ($/1K tokens). Overrides the built-in table.
Disable tiktoken-based token counting. Traces will omit token usage metrics.
Pass flags via theargsproperty in your JSON config:
{ "mcpServers": { "trace-inspector": { "command": "npx", "args": ["-y", "mcp-agent-trace-inspector@latest", "--retention-days=30"] } } }
- Append-only traces: Steps are immutable once recorded. Trust requires integrity.
- Local-first: All core functionality works without a network connection.
- Portable dashboards: HTML exports are always single-file; no server required to view them.
Before publishing a new version, verify the server with MCP Inspector to confirm all tools are exposed correctly and the protocol handshake succeeds.
npm run build && npm run inspect
# List all tools npx @modelcontextprotocol/inspector --cli node dist/index.js --method tools/list # List resources and prompts npx @modelcontextprotocol/inspector --cli node dist/index.js --method resources/list npx @modelcontextprotocol/inspector --cli node dist/index.js --method prompts/list # Call a tool (example — replace with a relevant read-only tool for this plugin) npx @modelcontextprotocol/inspector --cli node dist/index.js \ --method tools/call --tool-name list_traces # Call a tool with arguments npx @modelcontextprotocol/inspector --cli node dist/index.js \ --method tools/call --tool-name list_traces --tool-arg key=value
Run before publishing to catch regressions in tool registration and runtime startup.
SeeCONTRIBUTING.mdfor full contribution guidelines.
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Bring agent evaluations, observability, and synthetic test set generation directly into your IDE for free with Galileo's new MCP server
AI-powered live runtime debugging with Lightrun production context.
Paid remote MCP for AI agent run monitoring, failure detection, tool-call incident replay, SLA receipts, and client status exports.
Search verified engineering fixes by error message or technology. Step-by-step solutions with trust scores, built for developers and AI agents.
AI-powered live runtime debugging with Lightrun production context.
Reticle intercepts, visualizes, and profiles JSON-RPC traffic between your LLM and MCP servers in real-time, with zero latency overhead. Stop debugging blind. Start seeing everything.
Guck is a tiny, MCP-first telemetry store for agentic debugging
A MCP server that connects with LangChain Checkpointers, Memory Stores to aid in monitoring and observability during development of AI Applications
An MCP server to help AI assistants to answer questions and generate AccelByte Extend SDK code more effectively .
MCP server for AI Diagram Maker — generate beautiful software engineering diagrams directly inside Cursor, Claude Desktop, Claude Code, or any MCP-compatible AI agent
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




