Track AI agent costs, budgets, optimization opportunities, alerts, experiments, and ROI through 23 MCP tools.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag โ we're steadily working through the catalog.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by MCP Server.
The metrxbots/mcp-server MCP server connects an MCP-compatible agent to Metrx, an AI agent cost intelligence platform. Its tool set covers operational cost analysis rather than general-purpose model execution. Agents can inspect spend, call volume, error rates, model usage, agent health, budgets, alerts, and optimization opportunities.
The server also supports actions and analysis beyond reporting. It can apply an optimization recommendation, create or stop a model-routing experiment, change budget enforcement, acknowledge alerts, attribute agent work to business outcomes, and generate ROI-oriented reports. A separate cost leak detector package is included in the repository, but it is an offline CLI rather than part of this server's MCP tool set.
The metrxbots/mcp-server MCP server communicates with the Metrx API when connected to real account data. The API key can come from the METRX_API_KEY environment variable or from ~/.metrxrc, which is created by the interactive authentication flow. METRX_API_URL can override the default API base URL of https://metrxbot.com/api/v1.
For evaluation, npx @metrxbot/mcp-server --demo starts the server with sample data and does not require signup or an API key. The normal client configuration starts the package over stdio. A remote option is also documented at https://metrxbot.com/api/mcp, where requests use a bearer token and JSON content type.
Install and run the package with:
To authenticate interactively, run npx @metrxbot/mcp-server --auth. The process opens a browser, obtains and validates an API key, then stores it in ~/.metrxrc. Alternatively, set METRX_API_KEY in the environment. The README identifies the key as free to obtain through the Metrx sign-up page.
An MCP client can use this stdio configuration:
If the key is not stored in ~/.metrxrc, add METRX_API_KEY under the client's env object. Claude Desktop, Cursor, and Windsurf are named as supported client examples.
The 23 tools are organized into ten functional areas:
Prompt templates named analyze-costs, find-savings, and cost-leak-scan provide predefined workflows for common investigations.
Real-data operation depends on access to the Metrx API and normally requires an API key, although the server can use a locally saved key instead of an environment variable. Demo mode uses sample data and therefore is not a substitute for checking an actual account. The README documents an HTTP endpoint for remote agents, but does not describe deployment or hosting steps for running a private copy of that endpoint.
The repository is licensed under MIT. The companion cost leak detector is separate from the MCP server: it scans local LLM API logs offline and should not be represented as one of the server's 23 MCP tools.
Factual signals from GitHub, npm, and our automated checks โ not a rating.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/metrxbots-mcp-server)<a href="https://allmcps.com/mcp/metrxbots-mcp-server"><img src="https://allmcps.com/api/badge/metrxbots-mcp-server?style=directory" alt="MCP Server on AllMCPs" /></a>