Install
Integrate
Calltrack after registering your list_tools and call_tool handlers, before running. track wraps the existing call_tool handler, so calling it earlier records nothing:
Identify users
Pass anidentify function to resolve a user from the incoming request context. It receives the HTTP request (a Starlette Request, or None over stdio) and the process environment, and should return a dict with at least a userId key:
async. Return None to skip user attribution for a request.
Options
UserIdentity is a Dict[str, Any] that must contain a userId key. Other fields are optional and forwarded as user traits.
Checkpoints
Per-step latency checkpoints are currently available only in the TypeScript SDK. Tool-level latency is captured automatically across all SDKs.
What appears in Agnost AI
- Tool calls for MCP tool invocations.
- Events for every tracked call.
- Failed tool calls remain visible in Events with their error details.
Verify
Call one MCP tool from your Anthropic client, then open app.agnost.ai. Check Events first, then Tool calls.Troubleshooting
- Call
track(...)after registering handlers and before serving. If the log showsNo CallToolRequest handler found,trackran before@server.call_tool(). - Confirm the org ID is correct.
- If the log shows
Failed to patch server for analytics, checkpip show mcp: the installed version must be below 2.
Next steps
- Tool calls: analyze calls from your low-level MCP server.
- Events: verify call fields and execution details.
- Alerts: monitor important MCP tool conditions.