
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 分