mcp-server-agent-analytics
v1.1.1
Published
MCP server for AI agent fleet analytics — track performance, costs, anomalies, and trends across agents.
Downloads
183
Maintainers
Readme
mcp-server-agent-analytics
MCP server for MetalTorque Agent Analytics — gives AI agents the ability to monitor fleet performance, track costs, detect anomalies, and compare agents.
Works with Claude Desktop, Claude Code, Cursor, and any MCP-compatible client.
Setup
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"agent-analytics": {
"command": "npx",
"args": ["-y", "mcp-server-agent-analytics"],
"env": {
"MT_ANALYTICS_API_KEY": "your-api-key-here"
}
}
}
}Claude Code
claude mcp add agent-analytics -- npx -y mcp-server-agent-analyticsSet the API key in your environment:
export MT_ANALYTICS_API_KEY=your-api-key-hereTools
| Tool | Description | Required Params |
|------|-------------|-----------------|
| analytics_dashboard | Fleet-wide dashboard — total events, unique agents, success rate, token usage, cost estimates, per-agent breakdowns, trending topics, daily volume | days (optional, default: 30) |
| agent_insights | Deep insights for a specific agent — top queries, unhandled intents, latency stats (avg + P95), token usage, cost, daily volume, feedback | agent_id |
| list_agents | List all registered agents with total events, success rate, and last seen timestamp | — |
| detect_anomalies | Check for anomalies — error rate spikes, latency degradation, unusual patterns vs baseline | — |
| query_events | Query stored events with optional filters for analysis | agent_id, event_type, days, limit, success (all optional) |
| track_event | Ingest a new agent interaction event (queries, completions, errors, feedback) | agent_id, plus optional event_type, query, latency_ms, prompt_tokens, response_tokens, success, error |
| compare_agents | Compare two agents side by side on volume, success rate, latency, tokens, and cost | agent1, agent2 |
Usage Examples
Once configured, just ask your AI assistant:
- "Show me the agent fleet dashboard"
- "How is my-agent performing this week?"
- "Are there any anomalies in my agents?"
- "Compare agent-a and agent-b"
- "Track a query event for my-agent with 2300ms latency"
- "List all my agents"
- "Show me events for my-agent from the last 7 days"
Environment Variables
| Variable | Description |
|----------|-------------|
| MT_ANALYTICS_API_KEY | API key (required for authenticated endpoints) |
| MT_ANALYTICS_URL | Server URL (default: https://analytics.metaltorque.dev) |
