MCP Server
Connect Risicare to Claude Code, Cursor, and other AI development tools via the Model Context Protocol.
Risicare provides a hosted MCP (Model Context Protocol) server that lets AI coding assistants query your observability data directly. Ask your IDE about traces, sessions, and agent performance without leaving your editor.
Setup
Claude Code
claude mcp add --transport http risicare https://app.risicare.ai/api/mcp \
--header "Authorization: Bearer rsk-your-api-key-here"Cursor
Add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"risicare": {
"url": "https://app.risicare.ai/api/mcp",
"headers": {
"Authorization": "Bearer rsk-your-api-key-here"
}
}
}
}Other MCP Clients
Any MCP client that supports the streamableHttp transport can connect:
| Setting | Value |
|---|---|
| URL | https://app.risicare.ai/api/mcp |
| Transport | streamableHttp |
| Auth header | Authorization: Bearer rsk-... |
| Protocol version | 2025-03-26 |
Authentication
The MCP server uses the same API key as the SDK and REST API. Pass it as a Bearer token in the Authorization header.
- Missing key: returns HTTP 401
- Invalid key: returns MCP error
"Invalid or expired API key"
Available Tools
The server exposes 6 read-only tools:
list_traces
List recent traces for your project.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
limit | number | No | 20 | Number of traces (1-100) |
Returns trace ID, name, status, duration, cost, error count, and span count for each trace.
get_trace
Get full detail for a specific trace, including all spans.
| Parameter | Type | Required | Description |
|---|---|---|---|
trace_id | string | Yes | The trace ID to look up |
Returns trace metadata plus a detailed span list with span ID, name, kind, duration, status, model, tool, agent, and error info.
list_sessions
List recent sessions.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
limit | number | No | 20 | Number of sessions (1-100) |
Returns session ID, user ID, trace count, duration, cost, and error count.
get_session
Get detail for a specific session, including its traces.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | The session ID to look up |
Returns session metadata plus a list of traces in the session.
list_agents
List all agents detected in your project with performance metrics.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
limit | number | No | 20 | Number of agents (1-100) |
Returns agent name, ID, type, success rate, trace count, average duration, cost, and error count.
get_agent
Get detailed performance information about a specific agent.
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_id | string | Yes | The agent ID to look up |
Returns agent name, type, invocation count, success rate, error count, average/P99 duration, total cost, total tokens, tool list, and top errors breakdown.
Example Usage
Once configured, ask your AI coding assistant natural questions:
- "Show me traces from the last hour with errors"
- "Get details for trace abc123def456"
- "List my top agents by performance"
- "What's the error rate for the planner agent?"
- "Show me the spans in my most recent trace"
The assistant will call the appropriate MCP tools and format the results for you.