
Metrxbots
io.github.metrxbotsPublished by GitHub account metrxbotsv0.2.2Updated Oct 24, 2026
Track AI agent costs, detect waste, optimize models, and prove ROI. 23 MCP tools across 10 domains.
Overview
Metrx is a local MCP server that lets an assistant read AI agent cost data, find waste, compare models, manage budgets and produce ROI reports.
- What you can do
- Read cost summaries, agent lists and per-agent cost and performance detail, plus active alerts and failure predictions, and acknowledge alerts. Get optimization recommendations, apply them, route tasks to models and compare model pricing. View, create and change budgets, including enforcement modes and pause or resume. Run model A/B experiments, read results and stop experiments. Run a cost leak scan, attribute tasks to business outcomes and pull ROI and attribution reports. Set alert thresholds and generate ROI audit and upgrade justification reports.
- When to use it
- Useful when you already run AI agents through Metrx and want an assistant to check spend, investigate overpaying or runaway costs, test cheaper models, or assemble ROI and audit reports without opening the dashboard.
- Requirements
- Runs locally via npx or npm, so Node.js is needed. A Metrx account and API key are required, supplied through the METRX_API_KEY environment variable or saved to a local config file by the interactive login flag; a demo mode runs on sample data without a key. Network access to the Metrx API is required.
Installation
In SourceWeft
- Open Metrxbots in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Metrx MCP Server
[npm version] [CI] [License: MIT] [Smithery] [Glama]
Your AI agents are wasting money. Metrx finds out how much, and fixes it.
The official MCP server for Metrx — the AI Agent Cost Intelligence Platform. Give any MCP-compatible agent (Claude, GPT, Gemini, Cursor, Windsurf) the ability to track its own costs, detect waste, optimize model selection, and prove ROI.
[Metrx Server MCP server]Why Metrx?
Quick Start
Try it now — no signup required
This starts the server with sample data so you can explore all 23 tools instantly.
Connect your real data
Option A — Interactive login (recommended):
Opens your browser to get an API key, validates it, and saves it to ~/.metrxrc so you never need to set env vars.
Option B — Environment variable:
Get your free API key at app.metrxbot.com/sign-up.
Add to your MCP client (Claude Desktop, Cursor, Windsurf)
If you used --auth, no env block is needed — the key is read from ~/.metrxrc automatically:
Or pass the key explicitly via environment:
Remote HTTP endpoint
For remote agents (no local install needed):
From npm
23 Tools Across 10 Domains
Dashboard (3 tools)
Optimization (4 tools)
Budgets (3 tools)
Alerts (3 tools)
Experiments (3 tools)
Cost Leak Detector (1 tool)
Attribution (3 tools)
Alert Configuration (1 tool)
ROI Audit (1 tool)
Upgrade Justification (1 tool)
Prompts
Pre-built prompt templates for common workflows:
Examples
"How much am I spending?"
"Find me savings"
"Test a cheaper model"
Companion Tool: Cost Leak Detector
This repo also includes @metrxbot/cost-leak-detector — a free, offline CLI that scans your LLM API logs for wasted spend. No signup, no cloud, no data leaves your machine.
It runs 7 checks (idle agents, premium model overuse, missing caching, high error rates, context overflow, no budgets, arbitrage opportunities) and gives you a scored report in seconds. See the full docs.
Configuration
API Key (required)
The server looks for your API key in this order:
METRX_API_KEYenvironment variable~/.metrxrcfile (created by--auth)
Run npx @metrxbot/mcp-server --auth to save your key, or set the env var directly.
*Not required if you've run --auth — the key is read from ~/.metrxrc automatically.
CLI Flags
Rate Limiting
60 requests per minute per tool. For higher limits, contact [email protected].
Development
Contributing
See CONTRIBUTING.md for guidelines.
Links
- Website: metrxbot.com
- Docs: docs.metrxbot.com
- npm: @metrxbot/mcp-server
- Smithery: metrxbot/mcp-server
- Support: [email protected]
A Note on Naming
The product is Metrx (metrxbot.com). The npm scope is @metrxbot and the Smithery listing is metrxbot/mcp-server. The GitHub organization is metrxbots (with an s) because metrxbot was already taken on GitHub. If you see metrxbot vs metrxbots across platforms, they're the same project — just a GitHub namespace constraint.
License
MIT — see LICENSE.
💬 Feedback
Did Metrx work for you? We'd love to hear it — good or bad.
- GitHub Discussions: Start a thread — questions, ideas, what you're building
- Bug reports: Open an issue
- Quick feedback: Drop a comment on our Product Hunt listing
If you installed but hit a snag, tell us what happened — we read every report.
Source: README.md at commit fcf7192
Tools
0Version history
1- v0.2.2LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts