MCP server
Give AI agents read-only investigation tools for obs-unified traces, logs, replays, profiles, evals, agent runs, actions, and tool calls.
@obsunified/mcp-server is a stdio Model Context Protocol server for agents
that need to inspect an obs-unified collector.
It exposes the same investigation graph that humans use in the dashboard: status, recent traces, trace detail, service operations, service map, logs, AI sessions, users, replays, profiles, evals, compact evidence bundles, connected signals, agent runs, actions, and tool calls.
Why it exists
Modern debugging is increasingly agent-assisted. Instead of asking an agent to guess from screenshots or copy-pasted log snippets, obs-unified gives it structured tools over the telemetry graph:
The MCP server is a read boundary. It lets agents traverse evidence without granting write access to telemetry ingest.
Install
The MCP server is published to the public npm registry:
pnpm add -g @obsunified/mcp-server[!NOTE] The MCP server uses the
@obsunifiedscope on public npm (@obsunified/mcp-server). The first-party SDKs use the@obsunifiedscope on public npm (@obsunified/*).
For local development from a checkout:
git clone https://github.com/obs-unified/obs-unified.git
cd obs-unified
pnpm install
pnpm --filter @obsunified/mcp-server buildConfigure
Set the collector URL and one auth method:
export OBS_COLLECTOR_URL="https://obs.example.com"
export OBS_DASHBOARD_TOKEN="..."Supported auth variables, in priority order:
OBS_DASHBOARD_TOKEN— programmatic dashboard token, sent as a bearer token.OBS_INGEST_KEY— project ingest key, sent as a bearer token for collectors that allow it on read endpoints.OBS_SESSION_COOKIE— dashboardobs_sessioncookie value for ad-hoc local use.
Optional variables:
OBS_PROJECT_ID— sent asX-Project-Idfor multi-project collectors.OBS_DASHBOARD_URL— used to include dashboard deep links in tool responses.OBS_MCP_TIMEOUT_MS— request timeout in milliseconds. Defaults to30000.
Claude Desktop or compatible local MCP host
{
"mcpServers": {
"obs-unified": {
"command": "obs-unified-mcp",
"env": {
"OBS_COLLECTOR_URL": "https://obs.example.com",
"OBS_DASHBOARD_TOKEN": "..."
}
}
}
}For local development from the monorepo:
{
"mcpServers": {
"obs-unified": {
"command": "pnpm",
"args": [
"--dir",
"/absolute/path/to/obs-unified",
"--filter",
"@obsunified/mcp-server",
"start"
],
"env": {
"OBS_COLLECTOR_URL": "http://localhost:8790",
"OBS_INGEST_KEY": "dev-ingest-key"
}
}
}
}Build the package first with:
pnpm --filter @obsunified/mcp-server buildTools
obs_statusget_evidence_bundle— compact evidence for atrace,action,agent_run, ortool_callanchor, scoped to an investigation intent and token budget.retrieve_evidence_ref— expand a bundle retrieval ref into raw, less-compacted, or redacted records (chunkOffsetpaginates replay event windows).search_evidence_ref— search within a log retrieval ref without expanding the full evidence slice.get_evidence_stats— issued/expanded evidence-ref telemetry for the active project.recent_tracesget_traceservice_operationsservice_mapsearch_logsai_overviewget_ai_sessionget_userget_replayget_profileget_evalconnected_signalsget_agent_runget_actionget_tool_call
For package-level details, see the MCP server README.