Metrx MCP Server
The Metrx MCP Server is an AI Agent Cost Intelligence Platform that enables MCP-compatible AI agents to track, optimize, and govern LLM costs and ROI across their agent fleet.
Cost Visibility & Dashboards
Get comprehensive cost summaries (total spend, call counts, error rates) for up to 90 days
List all agents with status, category, and cost metrics
Drill into per-agent details including model, framework, and performance history
Cost Optimization
Receive AI-powered recommendations (model switching, token guardrails, provider arbitrage, batch processing)
Apply one-click optimization fixes to individual agents
Get model routing recommendations based on task complexity
Compare LLM pricing and capabilities across providers (OpenAI, Anthropic, Google, etc.)
Budget Management
Monitor budget status and spending vs. limits across your fleet
Create or update budgets with daily/monthly periods and enforcement modes (alert-only, soft block, hard block)
Pause, resume, or change enforcement modes on existing budgets
Alerts & Predictions
Retrieve active alerts for cost spikes, error rates, and budget warnings (filterable by severity)
Acknowledge or dismiss alerts
Get predictive failure analysis identifying agents at risk before issues occur
Configure automated alert thresholds triggering email, webhook, or auto-pause actions
A/B Model Experiments
Run A/B tests comparing two LLM models with configurable traffic splitting
Monitor results including statistical significance, cost delta, and current winner
Stop experiments and optionally promote the winning model
Cost Leak Detection
Run a 7-check audit identifying inefficiencies: idle agents, model overprovisioning, missing caching, high error rates, context bloat, missing budgets, and cross-provider arbitrage opportunities
Output as human-readable markdown or machine-readable JSON for CI/CD pipelines
ROI & Revenue Attribution
Link agent actions to business outcomes (revenue, cost savings, efficiency, quality) from sources like Stripe, HubSpot, Zendesk, etc.
Calculate per-agent ROI and generate multi-source attribution reports with confidence scores
Produce board-ready ROI audit reports for the full fleet
Upgrade Justification
Generate ROI reports demonstrating potential savings from upgrading to higher service tiers
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
Metrx MCP Server
The Model Context Protocol (MCP) server for Metrx: how a company manages the AI agents it employs. Each agent gets a job contract, a scorecard against it, and a P&L: what it cost and what it produced. This server exposes those records as tools that any MCP-compatible client (Claude, GPT, Gemini, custom agents) can call. Version 0.5.0.
This package is the single source for both transports: the npm package you run locally over stdio, and the hosted server at https://metrxbot.com/api/mcp. The public repository at https://github.com/metrxbots/mcp-server is a mirror, synced from the monorepo by packages/mcp-server/scripts/publish-mirror.ts. Contributors open pull requests against the monorepo; issues go to https://github.com/metrxbots/mcp-server/issues.
Quick Start
Three ways in.
1. The demo, no key. The public desk tools answer on the Northwind sample organization, which is synthetic demo data.
npx @metrxbot/mcp-server --demo2. Interactive login. Opens the browser, saves the key locally, then verifies it.
npx @metrxbot/mcp-server --auth
npx @metrxbot/mcp-server --test3. A key in the environment.
METRX_API_KEY=sk_live_xxx npx @metrxbot/mcp-servernpx @metrxbot/mcp-server --setup-claude writes the server entry into the Claude Desktop, Cursor or VS Code config for you.
Related MCP server: Odoo MCP Server
Claude Code plugin
The desk plugin wraps the workforce tool set in five skills.
claude plugin marketplace add metrxbots/mcp-server && claude plugin install metrx-desk@metrxbotsVersions: this server is 0.5.0 (@metrxbot/mcp-server). The desk plugin (metrx-desk) and the TypeScript SDK (@metrxbot/sdk) are separate artefacts with their own version numbers and release schedules; each states its version in its own package.
Command | What it does | Needs a key |
| The Northwind sample review (synthetic demo data), relayed with every figure's label | No |
| Draft a job contract for one agent from a template (support_triage, sdr_qualification, internal_assistant, coding_patch); owner is required; publishing is a separate admin-scope step | No |
| Reconcile a per-resolution vendor bill against your own records: matched, disputed, unmatched, outside coverage, with the disputed amount | No |
| Create a key at Settings → Security, set METRX_API_KEY, restart, read your first review | Creates one |
| Your decision queue; record expand, re_specify, combine or retire with a rationale | Yes (read; write to record) |
The full walkthrough, including the labels every figure carries and the plain HTTP routes, is at https://docs.metrxbot.com/desk.
Tools
The tool registry is published at https://metrxbot.com/.well-known/agent-card.json: names, descriptions, domains, the public subset that answers without a key, and the named tool sets. That file is the authoritative list; this README does not repeat it. Every tool's description ends with the scope it needs (read, write or admin).
Tool names carry the metrx_ prefix. The desk's public tools are metrx_get_workforce_review, metrx_draft_job_contract and metrx_check_vendor_bill. Signed-in desk tools include metrx_get_decision_queue, metrx_record_decision, metrx_get_scorecard, metrx_get_job_contract and metrx_set_job_contract; cost reads such as metrx_get_cost_summary sit alongside them. A job contract is recorded, not enforced at runtime: publishing one blocks no spend or traffic.
Guided Prompts
MCP prompts are templates that walk a client through a multi-step workflow.
analyze-costs
Fetches the cost summary, lists agents, gets optimization recommendations and returns a prioritized breakdown.
Arguments:
period_days(string, optional): number of days to analyze (default: "30")
find-savings
Checks recommendations, runs the cost leak scan and explains each finding in dollars.
Arguments: none
cost-leak-scan
Runs the waste audit: retry storms, oversized contexts, model mismatch, missing caching, idle agents, missing budgets, arbitrage gaps.
Arguments:
agent_id(string, optional): scan one agent by UUID, or omit to scan all
Installation
From npm
npm install @metrxbot/mcp-serverQuick Test
Verify your API key and connection:
METRX_API_KEY=sk_live_xxx npx @metrxbot/mcp-server --testConfiguration
Environment Variables
METRX_API_KEY(optional for--demo, required otherwise): your Metrx API key. Create one at https://app.metrxbot.com/settings/securityMETRX_API_URL(optional): override the API base URL (default:https://app.metrxbot.com/api)
Hosted transport
The same registry is served over streamable HTTP at https://metrxbot.com/api/mcp. Add ?set=workforce to select the desk tool set. The Authorization: Bearer sk_live_... header is optional: without it the public tools answer on the demo (synthetic demo data).
{
"mcpServers": {
"metrx": {
"type": "http",
"url": "https://metrxbot.com/api/mcp?set=workforce",
"headers": { "Authorization": "Bearer sk_live_your_key_here" }
}
}
}MCP Client Setup (stdio)
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"metrx": {
"command": "npx",
"args": ["@metrxbot/mcp-server"],
"env": {
"METRX_API_KEY": "sk_live_your_key_here"
}
}
}
}Cursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"metrx": {
"command": "npx",
"args": ["@metrxbot/mcp-server"],
"env": {
"METRX_API_KEY": "sk_live_your_key_here"
}
}
}
}Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"metrx": {
"command": "npx",
"args": ["@metrxbot/mcp-server"],
"env": {
"METRX_API_KEY": "sk_live_your_key_here"
}
}
}
}Or run directly:
METRX_API_KEY=sk_live_xxx npx @metrxbot/mcp-serverRate Limiting
The stdio server enforces per-tool-category rate limits:
Category | Limit |
Dashboard & Agents | 60 requests/minute |
Metrics | 30 requests/minute |
Experiments | 10 requests/minute |
Budgets | 10 requests/minute |
Alerts | 10 requests/minute |
Attribution | 10 requests/minute |
Optimization | 5 requests/minute |
Cost Leak Scan | 2 requests/5 minutes |
Default (other) | 30 requests/minute |
The public desk routes are limited per address at 30 requests per minute; the limit rides in the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers. Hitting a limit returns an error with the retry-after time in seconds.
For high-volume use, contact support@metrxbot.com.
Error Handling
Every refusal carries a class. Over MCP it is a JSON-RPC error with data.class, data.doc and data.user_message; over HTTP it is an RFC 9457 problem body with Retry-After on the retryable classes.
Class | JSON-RPC code | HTTP status | Doc |
| -32001 | 401 | |
| -32002 | 403 | |
| -32003 | 429 | |
| -32004 | 503 | |
| -32005 | 503 | |
| -32006 | 404 | |
| -32602 | 400 | |
| -32007 | 502 |
Server errors from the upstream API (500 and above) are retried with exponential backoff, up to 3 times.
Authentication
Requests to your own organization carry METRX_API_KEY in the Authorization header:
Authorization: Bearer sk_live_xxxAPI keys are environment-scoped: sk_live_* for production, sk_test_* for testing, mk_* for machine keys.
Each key also carries scopes. Read tools need read; tools that change data need write; budget changes, publishing a job contract and creating an experiment need admin. An org owner or admin mints keys, including admin-scoped ones, in Settings → Security → API Keys.
Testing
Verify your API key:
METRX_API_KEY=sk_live_xxx npx @metrxbot/mcp-server --testRun the test suite:
npm run testTests cover:
Protocol compliance (MCP spec validation)
Tool schema and input validation
API client retry logic and error handling
Rate limiting behavior
Output formatting
Troubleshooting
"METRX_API_KEY environment variable is required"
Set the key before starting the server, or run --demo for the public tools:
export METRX_API_KEY=sk_live_your_key
npx @metrxbot/mcp-serverCreate a key at https://app.metrxbot.com/settings/security, or run npx @metrxbot/mcp-server --auth.
"Rate limit exceeded"
The error message includes a retry-after time in seconds. Your MCP client should retry after it. For production volume, contact support.
"401 Unauthorized" or auth_required
Your API key is invalid, expired or missing. Create a new one at https://app.metrxbot.com/settings/security.
unknown_agent_key
No agent in your organization has that agent_key. Check the Agents page in the dashboard; the error's suggestions lists close matches when there are any.
Support
Docs: https://docs.metrxbot.com (the desk: https://docs.metrxbot.com/desk)
API Status: https://status.metrxbot.com
Email: support@metrxbot.com
GitHub Issues: https://github.com/metrxbots/mcp-server/issues
License
MIT, see LICENSE.
Available Tools
41 toolsmetrx_acknowledge_alertAcknowledge AlertAIdempotentInspect
Mark one or more alerts as read/acknowledged. This removes them from the unread alerts list but preserves them in history. Do NOT use for resolving the underlying issue — take action on the alert first. Requires an API key with the 'write' scope.
Inputs: alert_ids (required).
metrx_attribute_taskAttribute Task to OutcomeAInspect
Link an agent task/event to a business outcome for ROI tracking. This creates a mapping between agent actions and measurable business results. Do NOT use for reading attribution data — use get_attribution_report or get_task_roi. Requires an API key with the 'write' scope.
Inputs: agent_id (required), outcome_type (required), outcome_source (required), event_id, +2 more.
metrx_buy_verificationBuy a VerificationAInspect
Purchase one verification (a causal verdict on whether a model switch holds quality on YOUR production traffic). This action consumes one verification — $149, or $99 founding rate. No verdict, no charge. Returns a Stripe checkout URL for a human (or payment-capable agent) to complete, plus claim instructions when the purchase is anonymous. This tool does NOT charge anything itself — payment happens on the returned URL. Requires an API key with the 'write' scope.
Inputs: callback_url.
metrx_check_vendor_billCheck Vendor BillARead-onlyIdempotentInspect
Reconcile an AI vendor's per-resolution bill against your own records: which billed units your ledger shows as resolved, rejected, reopened, outside coverage, or unknown, and the disputed amount. A pure function over the lines you pass: reads nothing, stores nothing, needs no key. Paste the bill lines and your ledger events.
Inputs: billed (required), period (required), ledger, rejected_ids, +3 more.
metrx_create_model_experimentCreate Model ExperimentAInspect
Record a DRAFT A/B experiment comparing an agent's current model (control) with a candidate (treatment) model. Creating it does NOT start routing traffic: the experiment is stored with status 'draft'. If control_model is omitted, the API uses the model the agent ran most often in the last 90 days (and refuses if it cannot determine one, or if it equals the treatment). Needs an API key with the 'admin' scope (an org owner or admin mints one in Settings → Security → API Keys). Do NOT use to read results — use get_experiment_results. Requires an API key with the 'admin' scope.
Inputs: name (required), agent_id (required), treatment_model (required), description, +2 more.
metrx_draft_job_contractDraft Job ContractARead-onlyIdempotentInspect
Draft a job contract for an AI agent from a template (support_triage, sdr_qualification, internal_assistant, coding_patch): objective, unit of work, acceptance criteria, budget, and the human baseline for ROI. Returns the draft to publish plus validation errors and warnings. A pure function over your input: reads nothing, stores nothing, needs no key. Publishing the draft is a separate step (set_job_contract, 'admin' scope).
Inputs: owner (required), template (required), notes, workload, +6 more.
metrx_generate_roi_auditGenerate ROI Audit ReportARead-onlyIdempotentInspect
Generate a comprehensive ROI audit report for your AI agent fleet. Includes per-agent cost/revenue breakdown, attribution confidence scores, optimization opportunities, and risk flags. Suitable for board reporting and compliance. Do NOT use for quick per-agent ROI checks — use get_task_roi for individual agents. Requires an API key with the 'read' scope.
Inputs: agent_ids, period_days, include_methodology.
metrx_get_actuationsGet Policy ActuationsARead-onlyIdempotentInspect
Org-scoped actuation records: action class, authority, who/when, rollback state with reason, acknowledgement state. Config contents (from/to) are excluded. Requires the optimization_model_v3 flag (404 while off). Read-only. Response is envelope-shaped: every numeric leaf is a MeasuredValue {value, ci_low, ci_high, method, data_through}. ci fields are null unless the source payload carries a real confidence interval — never fabricated. Requires an API key with the 'read' scope.
Inputs: no named parameters.
metrx_get_agent_detailGet Agent DetailARead-onlyIdempotentInspect
Get detailed information about a specific agent including its model, framework, category, outcome configuration, and failure risk score. Do NOT use for fleet-wide overviews — use get_cost_summary instead. Requires an API key with the 'read' scope.
Inputs: agent_id (required).
metrx_get_alertsGet AlertsARead-onlyIdempotentInspect
Get active alerts and notifications for your agent fleet. Includes cost spikes, error rate increases, budget warnings, and system health notifications. Optionally filter by severity. Do NOT use for forward-looking risk — use get_failure_predictions for that. Requires an API key with the 'read' scope.
Inputs: limit, severity, unread_only.
metrx_get_attribution_reportGet Attribution ReportARead-onlyIdempotentInspect
Get attribution report showing which agent actions led to business outcomes. Shows outcome counts, total values, confidence scores, and top contributing agents. Do NOT use for board-level reporting — use generate_roi_audit for formal audit reports. Requires an API key with the 'read' scope.
Inputs: days, model, agent_id.
metrx_get_balanceGet Verification BalanceARead-onlyIdempotentInspect
Check how many verifications your organization has remaining. Free to call. Use before verify_switch to know whether a purchase is needed first. Requires an API key with the 'read' scope.
Inputs: no named parameters.
metrx_get_budget_statusGet Budget StatusARead-onlyIdempotentInspect
Get the current status of all budget configurations. Shows spending vs limits, warning/exceeded counts, and enforcement modes. Use this to monitor spending governance across your agent fleet. Read-only. Budget changes (set_budget, update_budget_mode) need an API key with the 'admin' scope. Requires an API key with the 'read' scope.
Inputs: no named parameters.
metrx_get_cost_summaryGet Cost SummaryARead-onlyIdempotentInspect
Get a comprehensive cost summary for your AI agent fleet. Returns total spend, call counts, error rates, agent breakdown, revenue attribution (if available), and optimization opportunities. Use this as the starting point for understanding your agent economics. Do NOT use for real-time per-request cost checking — use OpenTelemetry spans for that. Requires an API key with the 'read' scope.
Inputs: period_days.
metrx_get_dashboard_headlineGet Dashboard HeadlineARead-onlyIdempotentInspect
The three-number headline regime: measured spend, estimated savings (the engine stored total, label Estimate; key attributed_savings) and verified savings-with-CI — each with basis, provenance, and tone. Values are micro-dollars (dollars = value / 1e6). Requires the optimization_model_v3 flag; while it is off this returns a clear next-step error. Response is envelope-shaped: every numeric leaf is a MeasuredValue {value, ci_low, ci_high, method, data_through}. ci fields are null unless the source payload carries a real confidence interval — never fabricated. Requires an API key with the 'read' scope.
Inputs: days.
metrx_get_decision_queueGet Decision QueueARead-onlyIdempotentInspect
The operator decision queue, derived from real loop objects (approvable verdicts, blocked proposals, breaker events, expiring evidence). READ-ONLY: queue ACTIONS (approve/snooze/acknowledge) remain dashboard-session-only and are not exposed to API-key callers. Requires the optimization_model_v3 flag (404 while off). Response is envelope-shaped: every numeric leaf is a MeasuredValue {value, ci_low, ci_high, method, data_through}. ci fields are null unless the source payload carries a real confidence interval — never fabricated. Requires an API key with the 'read' scope.
Inputs: no named parameters.
metrx_get_experiment_resultsGet Experiment ResultsARead-onlyIdempotentInspect
List an agent's model routing experiments, newest first: status, control vs treatment model with sample counts, traffic split, primary metric, significance, p-value and winner (control | treatment | inconclusive) where recorded. Optionally filter by status. Do NOT use for starting experiments — use create_model_experiment. Requires an API key with the 'read' scope.
Inputs: agent_id (required), status.
metrx_get_failure_predictionsGet Failure PredictionsARead-onlyIdempotentInspect
Predictive failure analysis for ONE agent, computed on request from its last 7 days of calls against a 30-day baseline: error-rate breaches, latency degradation, cost overruns and traffic anomalies, each with severity, confidence, trend and recommended actions. Needs at least 20 calls in the last 7 days — below that it returns no predictions, which means too little data, not a healthy agent. Do NOT use for current/past failures — use get_alerts for active issues. Requires an API key with the 'read' scope.
Inputs: agent_id (required), severity.
metrx_get_health_scoresGet Agent Health ScoresARead-onlyIdempotentInspect
Returns health score, grade, and data completeness for all agents in the organization. Health scores are composite 0-100 scores blending cost efficiency, ROI, error rate, quality drift, failure risk, and latency. Grades: A (80-100), B (60-79), C (40-59), D (20-39), F (0-19). Use this to get a fleet-wide health overview. Requires an API key with the 'read' scope.
Inputs: no named parameters.
metrx_get_job_contractGet Job ContractARead-onlyIdempotentInspect
Read an agent's job contract: its current version per workload (objective, unit of work, acceptance criteria, KPI target, budget, owner) and the full append-only version history. An agent with no contract returns an explicit empty state with the next action. Read-only. Requires an API key with the 'read' scope.
Inputs: agent_key (required).
metrx_get_optimization_recommendationsGet Optimization RecommendationsARead-onlyIdempotentInspect
Get AI-powered cost optimization recommendations for a specific agent or your entire fleet. Returns actionable suggestions including model switching, token guardrails, provider arbitrage, batch processing opportunities, and revenue intelligence insights. Each suggestion includes estimated monthly savings and confidence level. Read-only: it recommends, it does not change anything. To test a model switch, record an experiment with create_model_experiment. Requires an API key with the 'read' scope.
Inputs: agent_id, include_revenue.
metrx_get_proposalsGet Candidate ProposalsARead-onlyIdempotentInspect
Org-scoped CURRENT candidate proposals: action type/class, D-class, status with blocked_reason (blocked_on_signal proposals name the failing dimension), estimated impact, taxonomy axes. Config payloads (config_diff, guardrails, rollback mechanics) are deliberately excluded. Read-only. Response is envelope-shaped: every numeric leaf is a MeasuredValue {value, ci_low, ci_high, method, data_through}. ci fields are null unless the source payload carries a real confidence interval — never fabricated. Requires an API key with the 'read' scope.
Inputs: no named parameters.
metrx_get_rankingsGet Agent RankingsARead-onlyIdempotentInspect
Returns agents ranked by health score, best first. Each row has the agent key and name, grade (A-F), composite score on a 0-1 scale (a stored score when one exists, otherwise computed live from the last 30 days of metrics), data completeness (share of score inputs that had data; 0 = no data at all) and a stale flag (no call in the last 48 hours). Fleet averages are computed here from the returned rows. Use this to identify top and bottom performers. Requires an API key with the 'read' scope.
Inputs: limit.
metrx_get_report_snapshotGet Report SnapshotARead-onlyIdempotentInspect
Fetch one frozen executive-report snapshot by its public share token (the token IS the capability). Returns the STORED snapshot only — never recomputed — plus its snapshot_hash and methodology_version integrity stamps. Response is envelope-shaped: every numeric leaf is a MeasuredValue {value, ci_low, ci_high, method, data_through}. ci fields are null unless the source payload carries a real confidence interval — never fabricated. Requires an API key with the 'read' scope.
Inputs: share_token (required).
metrx_get_scorecardGet Agent ScorecardARead-onlyIdempotentInspect
One agent's scorecard against its job contract: each acceptance criterion, the measured value, pass/fail, and the window it covers. Addressed by agent_key. Windows longer than your plan keeps are reported as insufficient, never shortened. Requires an API key with the 'read' scope.
Inputs: agent_key (required).
metrx_get_signal_readinessGet Signal ReadinessARead-onlyIdempotentInspect
Org-scoped signal-readiness diagnostics: per-agent event coverage, label lag, join rate, volume-vs-power (days to trial-ready), estimator eligibility, and blocked_on_signal proposals cross-linked to the failing readiness dimension. This is the "what unlocks your first verified verdict" surface. Read-only. Response is envelope-shaped: every numeric leaf is a MeasuredValue {value, ci_low, ci_high, method, data_through}. ci fields are null unless the source payload carries a real confidence interval — never fabricated. Requires an API key with the 'read' scope.
Inputs: no named parameters.
metrx_get_task_roiGet Agent ROIARead-onlyIdempotentInspect
Calculate return on investment for an agent. Shows total costs (LLM API calls), total outcomes (attributed business value), ROI multiplier, and breakdown by model and outcome type. Useful for identifying which agents generate the most value per dollar spent. Do NOT use for fleet-wide ROI — use generate_roi_audit for that. Requires an API key with the 'read' scope.
Inputs: agent_id (required), days.
metrx_get_trialsGet Trial PlansARead-onlyIdempotentInspect
Org-scoped pre-registered trial plans: regime, primary metric, margin, the frozen sample plan (pre-registration), models, status (registered/concluded/voided) and the concluding verdict id. Read-only. Response is envelope-shaped: every numeric leaf is a MeasuredValue {value, ci_low, ci_high, method, data_through}. ci fields are null unless the source payload carries a real confidence interval — never fabricated. Requires an API key with the 'read' scope.
Inputs: no named parameters.
metrx_get_upgrade_business_caseGet Upgrade Business CaseARead-onlyIdempotentInspect
Generate a personalized ROI business case for paying for Metrx. Uses real usage data to quantify optimization potential, then recommends Verify (a buyable per-verdict proof — no verdict, no charge) and Platform (priced to your managed LLM spend; talk to us). Ideal for agents that received a 402 and want a compelling proposal for their operator. Legacy Lite/Pro tiers are retired and never recommended. Returns structured data plus a report. Requires an API key with the 'read' scope.
Inputs: current_tier (required), agent_count, monthly_spend, primary_use_case.
metrx_get_upgrade_justificationGet Upgrade JustificationARead-onlyIdempotentInspect
Generate an ROI report explaining why paying for Metrx makes sense based on current usage. Analyzes usage and optimization potential, then recommends Verify (a buyable per-verdict proof — no verdict, no charge) and Platform (priced to your managed LLM spend; talk to us). Legacy Lite/Pro tiers are retired and never recommended. Requires an API key with the 'read' scope.
Inputs: period_days.
metrx_get_verdictsGet Causal VerdictsARead-onlyIdempotentInspect
Org-scoped CURRENT causal-verdict summaries: per (agent, prod_model, candidate_model, task_category) — verdict, evidence mode/regime, pair counts, non-inferiority, savings CI, judge model, expiry. Observational (:value) rows are flagged. Summaries only: no gate flags, no evidence-pack contents (those stay dashboard-session-only). Read-only. Response is envelope-shaped: every numeric leaf is a MeasuredValue {value, ci_low, ci_high, method, data_through}. ci fields are null unless the source payload carries a real confidence interval — never fabricated. Requires an API key with the 'read' scope.
Inputs: no named parameters.
metrx_get_workforce_reviewGet Workforce ReviewARead-onlyIdempotentInspect
The weekly workforce review: every AI agent in the org as a line manager would read it (job, cost this window, outcomes, scorecard state, the candidate decision and why). org=demo reads the public Northwind sample and needs no key; org=me reads your own org and needs an API key with the 'read' scope. Paged by cursor. Numbers are the same the review page shows.
Inputs: org, limit, cursor.
metrx_kb_prior_lookupKB Prior Lookup (org-local)ARead-onlyIdempotentInspect
Per-cell (task_verb × domain) summary of THIS ORG’S OWN current causal verdicts — the knowledge-base read-side, v0. TENANCY: strictly org-local; this tool never reads other orgs’ data, so zeros mean YOUR org has no stamped verdicts in that cell yet (unstamped_verdicts counts evidence predating the taxonomy). Per cell: verdict counts by evidence mode (holdout_confirmed = causal tier), observational (:value) counts, and the latest verdict summary with its savings CI. Allocation labels are deliberately absent in v0 (no cost-weight substrate exists — nothing is fabricated). Read-only. Response is envelope-shaped: every numeric leaf is a MeasuredValue {value, ci_low, ci_high, method, data_through}. ci fields are null unless the source payload carries a real confidence interval — never fabricated. Requires an API key with the 'read' scope.
Inputs: no named parameters.
metrx_list_agentsList AgentsARead-onlyIdempotentInspect
List all AI agents in your organization with their status, category, and cost. Optionally filter by status or category. Returns agent IDs needed for other tools. Do NOT use for detailed per-agent analysis — use get_agent_detail for that. Requires an API key with the 'read' scope.
Inputs: status, category.
metrx_record_decisionRecord Agent DecisionAInspect
Record a management decision about an agent (expand, re_specify, combine, retire) with a rationale. The record carries the governing contract version and the scorecard at decision time as evidence, and appears on the agent page. The same decision within 60 seconds is refused as a double submit; pass idempotency_key to make a retry return the first record. Use a new key for each new decision: a key reused with a different decision is refused. Requires an API key with the 'write' scope.
Inputs: decision (required), agent_key (required), rationale (required), idempotency_key, +1 more.
metrx_run_cost_leak_scanRun Cost Leak ScanARead-onlyIdempotentInspect
Run a comprehensive cost leak audit across your entire agent fleet. Identifies 7 types of cost inefficiencies: idle agents, model overprovisioning, missing caching, high error rates, context bloat, missing budgets, and cross-provider arbitrage opportunities (covers amazon, anthropic, cohere, deepseek, google, meta, mistral, openai, xai). Returns a scored report with fix recommendations and estimated monthly savings. Supports output_format="json" for machine-readable output in CI/CD pipelines. Do NOT use as a continuous monitoring loop — use get_alerts and get_failure_predictions for ongoing monitoring. Read-only: it changes nothing. To act on a finding, use get_optimization_recommendations or create_model_experiment. Requires an API key with the 'read' scope.
Inputs: agent_id, output_format, include_low_severity.
metrx_set_budgetSet BudgetAIdempotentInspect
Create or update a budget configuration for an agent or the entire organization. Enforcement modes: "alert_only" (notify, never block), "soft_block" (block with override) and "hard_block" (block). "soft_block" and "hard_block" act only on LLM calls routed through the Metrx gateway (proxy); calls reported by the SDK or OpenTelemetry are never blocked. They are unavailable while the gateway's Cloudflare settings for budget sync are unset: the server then refuses them with 409 ENFORCEMENT_UNAVAILABLE and only "alert_only" works. Specify limits in dollars. Needs an API key with the 'admin' scope (an org owner or admin mints one in Settings → Security → API Keys); any other key is refused with 403 — then make the change at https://app.metrxbot.com/settings/budgets. Do NOT use just to change enforcement mode — use update_budget_mode for that. Requires an API key with the 'admin' scope.
Inputs: period (required), limit_dollars (required), agent_id, warning_pct, +1 more.
metrx_set_job_contractSet Job ContractAInspect
Publish a NEW VERSION of an agent's job contract (append-only: the previous active version for the same workload is superseded in the same transaction). Required: workload, objective, unit_of_work, acceptance_criteria (1-20), kpi_target, budget (dollars per daily|weekly|monthly period, stored as micro-dollars), owner. Workload-policy terms are inherited from the current version unless supplied in policy_terms. For an agent with no version yet, set policy_defaults: 'inherit_workload_policy' copies the org's workload-level policy (a snapshot), 'observe_only' gets terms that grant no authority (needs task_verb and domain in policy_terms); otherwise every term must be in policy_terms. The contract is RECORDED, not enforced at runtime: nothing blocks spend or traffic on it. Needs an API key with the 'admin' scope — an org owner or admin mints one in Settings → Security → API Keys; any other key is refused with 403. Do NOT use to read a contract — use get_job_contract. Requires an API key with the 'admin' scope.
Inputs: owner (required), workload (required), agent_key (required), objective (required), +8 more.
metrx_stop_experimentStop ExperimentAIdempotentInspect
Stop a model routing experiment by setting its status to 'completed'. Recorded results are preserved. This does not promote either model — nothing changes about which model the agent runs. Do NOT use for pausing — completion is final. Requires an API key with the 'admin' scope.
Inputs: agent_id (required), experiment_id (required).
metrx_update_budget_modeUpdate Budget ModeAIdempotentInspect
Change the enforcement mode of an existing budget, pause it, or ask to resume it. Use "alert_only" for monitoring, "soft_block" for overridable limits, or "hard_block" to block. "soft_block" and "hard_block" act only on LLM calls routed through the Metrx gateway (proxy); calls reported by the SDK or OpenTelemetry are never blocked. They are unavailable while the gateway's Cloudflare settings for budget sync are unset: the server then refuses them with 409 ENFORCEMENT_UNAVAILABLE and only "alert_only" works. Needs an API key with the 'admin' scope (an org owner or admin mints one in Settings → Security → API Keys); any other key is refused with 403 — then make the change at https://app.metrxbot.com/settings/budgets. Do NOT use to create new budgets — use set_budget for that. Requires an API key with the 'admin' scope.
Inputs: budget_id (required), paused, enforcement_mode.
metrx_verify_switchVerify a Model SwitchAInspect
Start a purchased verification: would candidate_model hold quality vs prod_model on your production traffic? This action consumes one verification — $149, or $99 founding rate. No verdict, no charge. ASYNC: returns a request handle immediately and NEVER blocks — verdicts complete after days of your own traffic (armed → collecting → complete). Poll the returned handle with GET /api/verify/requests/{id}. If the balance is 0 this returns purchase guidance instead of spending. Requires an API key with the 'write' scope.
Inputs: prod_model (required), candidate_model (required), agent_id, policy_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 41 tools
Many tools have distinct purposes, and descriptions often explicitly cross-reference alternatives. However, several adjacent read surfaces overlap in practice: ROI/audit/attribution/upgrade/dashboard tools, health/rankings/scorecard tools, and recommendations/leak-scan tools. With 41 tools, an agent can still struggle to choose correctly without parsing long descriptions.
The set uses a consistent metrx_ prefix and mostly follows a verb_noun pattern such as get_task_roi, set_budget, create_model_experiment, and acknowledge_alert. There are minor deviations like metrx_kb_prior_lookup and some noun-oriented names like get_health_scores/get_rankings, but they remain readable and predictable overall.
The server exposes 41 tools, which is well above the typical well-scoped range and creates a heavy selection burden. The domain is broad, but many tools are narrow read surfaces, so the set feels over-expanded rather than tightly scoped.
Coverage is broad across agent economics, ROI, budgets, contracts, experiments, verification, monitoring, and reporting. Minor lifecycle gaps exist, such as no clear agent create/update/delete, no budget deletion, no experiment traffic-start operation, and alerts only acknowledge rather than resolve, but core workflows are substantially covered.
Maintenance
Related MCP Connectors
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Hosted MCP server for AI-driven data ops. Create apps, manage schemas, and CRUD structured data.
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
Hosted MCP server exposing US hospital procedure cost data to AI assistants
Related MCP Servers
FlicenseNot gradedqualityCmaintenanceMCP server for Intempt GrowthOS — AI content generation, brand management, knowledge base, and user/account lookup through natural language.-- AlicenseNot gradedqualityDmaintenanceAn enterprise-grade MCP server for interacting with Odoo ERP through AI assistants, enabling guided workflows, native BI, and deep introspection.10MIT
- AlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to query databases, execute SQL, and manage Metabase resources like dashboards, cards, and collections through natural language.22MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Stessa rental-property accounting platform, enabling AI agents to query properties, portfolios, banking, documents, and tenancies via natural language.MIT