Analyze MCP Servers
MCP Analytics groups each instrumented MCP server's sessions into episodes, meaning one task an agent tried to complete. It then clusters episodes into a tree of topics. All reads go through run_amp with the mcp-analytics commands. Every command needs project, and nothing here writes.
Before you start
- Project: use the project the MCP Analytics SDK sends events to. Call
get_amplitude_contextwhen it isn't known, and ask the user rather than guessing. - Parameters: check them before the first call of each command, for example
{"command": ["help", "mcp-analytics", "episodes", "list"]}.
Drill down
- Servers:
["mcp-analytics", "servers", "list"]returns each server'sidandname. An emptydataarray means the project has no instrumented servers; say so and stop. - Topic tree:
["mcp-analytics", "taxonomy", "get"]withserver.- Leave out
parentto get every node. Useparent: "root"for the top level, or a topicidfor its direct children. - Each topic has
episode_count,share,hard_error_rate,thrashing_rateandmean_calls. Rates are null when there isn't enough data. - Null
run_idand emptynodesmean no taxonomy is pinned for the server yet. Topic and episode commands won't return anything useful, so tell the user and fall back to the raw events below.
- Leave out
- One topic:
["mcp-analytics", "topics", "get"]withserverandtopicreturns the topic's stats and up to eight example episodes. This is a sample, not a page. - Episodes:
["mcp-analytics", "episodes", "list"]withserverandtopic.- Filters:
has-error: "true",is-thrash: "true",client-name,auth-type,lane, andstarted-after/started-beforeas RFC 3339 timestamps. Client, auth type and lane must match a stored value exactly, so copy them from earlier results. - Pages hold 25 episodes by default, up to 100 with
limit. Passpagination.next_cursorascursorand keep the same filters.
- Filters:
- One episode:
["mcp-analytics", "episodes", "get"]withepisodeadds theauth_typeand the topicbreadcrumbfrom the root. - Tool calls:
["mcp-analytics", "calls", "list"]withepisodereturns every call in order. Each call hastool_name,is_error,error_type,error_message,error_code,error_http_status,duration_ms, the agent'srationale, and the recordedproperties.
What to look for
- Priorities: topics with a high
shareand a highhard_error_rateorthrashing_ratecome first. A low-share topic with a high error rate is a gap worth noting, not the headline. - Thrash:
is_thrashmarks episodes classified as thrashing. Read the call sequence and each call'srationaleto see what the agent was trying to do and where it stopped making progress. - Root cause: look for the first failing call in an episode, not the last. Group failures by
tool_namepluserror_typeorerror_code. - Segments: compare
client-nameandauth-typeon the same topic to tell a server bug from a client-specific problem. - Privacy: call
propertiesandrationalemay contain user input. Quote only what supports a finding, and never repeat tokens, emails or other personal data.
Trends and counts
The commands above are for drilling down. For volumes and trends over time, chart the raw SDK events with the chart query tools in the same project.
- Events:
[MCP] Tool Call Response(one per tool call),[MCP] Tool Call Rejected,[MCP] Tools Listed,[MCP] Session Initialized,[MCP] Session Ended,[MCP] Feedback Submitted. - Common properties:
[MCP] Server Name,[MCP] Tool Name,[MCP] Is Error,[MCP] Error Type,[MCP] Response Duration,[MCP] Client Name,[MCP] Auth Type. Servers that capture parameters also send[MCP] Param: <name>. - Confirm the names with
get_eventsandget_propertiesbefore you filter on them, because a server may not send every event.
Report
Lead with the two or three topics that most need work, each with its share, error or thrash rate, and the main failing tool and error. Then add one or two example episodes with the call sequence that shows the problem. End with the next fix to try.


