Metrx MCP Server
JSON →Track AI agent costs, detect waste, optimize models, and prove ROI. 23 MCP tools for LLM cost tracking, provider arbitrage, budget enforcement, and revenue attribution.
Install
npx @metrxbot/mcp-server Tools · 21
- metrx_get_cost_summary Comprehensive cost summary — total spend, call counts, error rates, and optimization opportunities
- metrx_list_agents List all agents with status, category, cost metrics, and health indicators
- metrx_get_agent_detail Detailed agent info including model, framework, cost breakdown, and performance history
- metrx_get_optimization_recommendations AI-powered cost optimization recommendations per agent or fleet-wide
- metrx_apply_optimization One-click apply an optimization recommendation to an agent
- metrx_route_model Model routing recommendation for a specific task based on complexity
- metrx_compare_models Compare LLM model pricing and capabilities across providers
- metrx_get_budget_status Current status of all budget configurations with spend vs. limits
- metrx_set_budget Create or update a budget with hard, soft, or monitor enforcement
- metrx_update_budget_mode Change enforcement mode of an existing budget or pause/resume it
- metrx_get_alerts Active alerts and notifications for your agent fleet
- metrx_acknowledge_alert Mark one or more alerts as read/acknowledged
- metrx_get_failure_predictions Predictive failure analysis — identify agents likely to fail before it happens
- metrx_create_model_experiment Start an A/B test comparing two LLM models with traffic splitting
- metrx_get_experiment_results Statistical significance, cost delta, and recommended action
- metrx_stop_experiment Stop a running model routing experiment and lock in the winner
- metrx_run_cost_leak_scan Comprehensive 7-check cost leak audit across your entire agent fleet
- metrx_attribute_task Link agent actions to business outcomes for ROI tracking
- metrx_get_task_roi Calculate return on investment for an agent — costs vs. attributed outcomes
- metrx_get_attribution_report Multi-source attribution report with confidence scores and top contributors
- metrx_configure_alert_threshold Set cost or operational alert thresholds with email, webhook, or auto-pause
Environment variables
METRX_API_KEYMETRX_API_URL
Links
★ 1 GitHub stars