MCP Hub
Back to servers

@ura-dev/agentrace

Structured observability for AI agents — MCP server + CLI viewer

npm31/wk
Updated
Mar 29, 2026

Quick Install

npx -y @ura-dev/agentrace

agentrace

Structured observability for AI agents. See what your agent does, why it decides, and where it fails.

MCP server + CLI viewer. Zero dependencies. Works with Claude Code, Cursor, or any MCP client.

Install

npm install -g @ura-dev/agentrace

MCP Setup

Add to your AI tool config:

{
  "mcpServers": {
    "agentrace": { "command": "agentrace-mcp" }
  }
}

Your AI agent now has access to structured tracing tools.

MCP Tools

ToolDescription
trace_startStart a new trace session
trace_stepLog a step (action, tool used, input/output)
trace_decisionLog a decision point (options, chosen, reasoning)
trace_errorLog an error or unexpected state
trace_endEnd a trace session
trace_listList recent traces
trace_viewView a complete trace

CLI

agentrace list              # Recent traces
agentrace view <trace-id>   # Full trace with events
agentrace watch <trace-id>  # Real-time tail
agentrace stats             # Trace statistics

How it works

When an AI agent starts a complex task, it calls trace_start. As it works, it logs each step (trace_step), records decision points (trace_decision), and captures errors (trace_error). When done, it calls trace_end.

Traces are stored as JSON files in ~/.agentrace/traces/. You can view them with the CLI, or read them directly.

As a library

const { createTrace, addStep, addDecision, endTrace } = require('@ura-dev/agentrace');

const { id } = createTrace({ name: 'deploy pipeline', agent: 'my-agent' });
addStep(id, { action: 'build', tool: 'npm', output: 'success' });
addDecision(id, { question: 'Deploy target?', chosen: 'staging', reasoning: 'Friday deploy' });
endTrace(id, { status: 'completed', summary: 'Deployed to staging' });

Config

Env varDescription
AGENTRACE_DIROverride storage directory (default: ~/.agentrace)

License

MIT — ura

Reviews

No reviews yet

Sign in to write a review