
Metrxbots
io.github.metrxbots由 GitHub 账号 metrxbots 发布v0.2.2更新于 Oct 24, 2026
Track AI agent costs, detect waste, optimize models, and prove ROI. 23 MCP tools across 10 domains.
概览
Metrx 是一个本地 MCP 服务器,让助手读取 AI 智能体成本数据、发现浪费、比较模型、管理预算并生成 ROI 报告。
- 可以做什么
- 读取成本汇总、智能体列表及单个智能体的成本与性能详情,以及活动告警和故障预测,并可确认告警。获取优化建议并应用,按任务推荐模型路由,比较各模型定价。查看、创建和修改预算,包括执行模式以及暂停或恢复。运行模型 A/B 实验、查看结果并停止实验。执行成本泄漏扫描,将任务归因到业务成果,并获取 ROI 与归因报告。设置告警阈值,生成 ROI 审计和升级论证报告。
- 适用场景
- 适用于已通过 Metrx 运行 AI 智能体的场景:希望助手在不打开仪表盘的情况下查看支出、排查过度付费或成本失控、测试更便宜的模型,或整理 ROI 与审计报告。
- 运行要求
- 通过 npx 或 npm 在本地运行,需要 Node.js。需要 Metrx 账号和 API 密钥,通过 METRX_API_KEY 环境变量提供,或用交互式登录参数保存到本地配置文件;演示模式使用示例数据,无需密钥。需要访问 Metrx API 的网络连接。
安装
在 SourceWeft 中
- 打开 控制台中的 Metrxbots,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
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.
来源:README.md,提交 fcf7192
工具
0版本历史
1- v0.2.2最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分