Agent MCP Server

Trace AI agent execution: every tool call, every error, every dollar. Open source, local-first.

Local serverstdio

What is the Agent MCP server?

Trace AI agent execution: every tool call, every error, every dollar. Open source, local-first. The agent mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 7 defined tools rather than through you.

What it actually does

This auto-detects your AI agent (opencode, Claude Code, Cursor) and configures everything: - Adds agent-obs to your MCP config - Adds the self-reporting instruction - Tells you what to do next

  • You can't estimate costs. — A session that feels quick might have burned $5 in API calls. A session that felt slow might have cost $0.50. You're operating blind
  • You can't debug failures. — The agent produced broken code — was it because it read the wrong file? Used a deprecated API? Misunderstood the task? Without traces, you're guessing
  • You can't improve your prompts. — Is the agent reading too many files? Calling too many tools? Wasting tokens on irrelevant context? You need data to tune your system instructions
  • You can't audit access. — If an agent reads a file containing secrets or API keys, you should know about it. If it makes an unexpected network call, you need to see it

Its toolset

Everything the assistant can do here goes through one of these:

  • obs_record_tool_call — sessionId, toolName, serverName, duration (ms), status (success/error), input, output
  • obs_record_token_usage — sessionId, inputTokens, outputTokens, model
  • obs_record_decision — sessionId, context, options, chosen, reasoning
  • obs_record_grade — sessionId, grade (A/B/C/D/F), reasoning
  • obs_get_session_report — sessionId
  • obs_list_sessions — limit, offset
  • Cursor — 1. MCP Config — Add to Cursor's MCP settings (~/.cursor/mcp.json, or Settings → MCP → Add new global MCP server):

Adding it to your client

Installation goes through your MCP client rather than a global install: point it at agent-obs on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

When to reach for it

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Agent's toolset — obs_record_tool_call, obs_record_token_usage, obs_record_decision and 4 more — is a fair guide to whether it matches your workflow. It is maintained by KryptosAI; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the agent mcp server does with a few real requests.

Available tools

ToolWhat it does
obs_record_tool_callsessionId, toolName, serverName, duration (ms), status (success/error), input, output
obs_record_token_usagesessionId, inputTokens, outputTokens, model
obs_record_decisionsessionId, context, options, chosen, reasoning
obs_record_gradesessionId, grade (A/B/C/D/F), reasoning
obs_get_session_reportsessionId
obs_list_sessionslimit, offset
Cursor1. **MCP Config** — Add to Cursor's MCP settings (~/.cursor/mcp.json, or Settings → MCP → Add new global MCP server):

How to install the Agent MCP server

**Claude Code:** Create `.mcp.json`:

```json
{
  "mcpServers": {
    "agent-obs": {
      "command": "npx",
      "args": ["-y", "agent-obs@latest", "server"]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Example prompts to try

  • Use Agent to obs record tool call.
  • Use Agent to obs record token usage.
  • Use Agent to obs record decision.

Frequently asked questions

It connects Agent to MCP-compatible AI assistants such as Claude and Cursor, exposing 7 tools (obs_record_tool_call, obs_record_token_usage, obs_record_decision, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Agent directly.