MCP Integration
MiniAPM will include a built-in Model Context Protocol (MCP) server that allows AI assistants like Claude to query your application’s performance data and errors.
What is MCP?
Section titled “What is MCP?”The Model Context Protocol is a standard for connecting AI models to external data sources and tools. With MCP, you’ll be able to ask Claude questions like:
- “What errors happened in production today?”
- “Which routes are slowest?”
- “Show me details about this error”
- “What’s the system status?”
Planned Tools
Section titled “Planned Tools”Read-only
Section titled “Read-only”| Tool | Description |
|---|---|
list_errors | Find recent errors with filtering |
get_error | Get full error information with stack traces |
error_trends | Hourly error counts |
list_traces | Find traces with filtering |
get_trace | Full span waterfall with N+1 detection |
slow_traces | Find traces above a duration threshold |
route_summary | P50/P95/P99, throughput, error rate per route |
list_deploys | Recent deployments |
deploy_impact | Before/after comparison for a deploy |
system_status | Overall health overview |
detect_n_plus_one | N+1 patterns in a specific trace |
| Tool | Description |
|---|---|
resolve_error | Mark error as resolved |
ignore_error | Mark error as ignored |
reopen_error | Reopen a resolved/ignored error |
Deployment Modes
Section titled “Deployment Modes”Two modes are planned:
Stdio Mode (Local)
Section titled “Stdio Mode (Local)”For local development with Claude Desktop:
miniapm mcpHTTP Mode (Remote)
Section titled “HTTP Mode (Remote)”For remote or shared access, the MCP endpoint will be available at POST /mcp with API key authentication.