
Ezstat Mcp Server
dev.ezstat由 ezstat.dev 發布v0.7.0更新於 Oct 24, 2026
Track and query EzStat metrics from Claude, Cursor, or any MCP agent. StatHat-compatible.
概覽
讓助理把計數器與數值指標寫入 EzStat 並讀回,還能用自然語言詢問指標資料。
- 可以做什麼
- EzStat MCP Server 為託管指標服務提供七個工具。track_metric 記錄計數器或數值資料點,read_stat 回傳某個指標在指定時間區間內的最新值、序列與摘要,list_stats 列出帳號下的指標。ask_ezstat 以自然語言回答關於指標的問題,create_alert、list_alerts 與 delete_alert 則用來管理指標的 webhook 告警。
- 適用情境
- 適合讓助理記錄自身應用或部署的指標,並在對話中直接查詢,例如部署或測試之後。也適合從 StatHat 遷移的團隊,因為寫入端點相容於 StatHat 的封包格式。
- 執行需求
- 本機執行需要 Node.js 執行環境來跑 npm 套件 ezstat-mcp-server(stdio),或改用託管的 streamable-HTTP 端點。需要 EzStat 帳號與 API 金鑰,透過環境變數 EZSTAT_API_KEY 或 Authorization Bearer 標頭提供。選用變數可覆寫基礎網址、逾時與 API 路徑。需要連線到 EzStat 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Ezstat Mcp Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
EzStat MCP Server
A standalone Model Context Protocol server for EzStat. Let Claude / Cursor / any MCP-compatible agent push and read your metrics natively — no copy-paste, no dashboard hop. This is the product behind the "metrics your agents write and read themselves" positioning: every agent that touches your code can also touch your observability.
The server speaks stdio (the standard transport for local agent runners) and — as a
hosted endpoint at https://mcp.ezstat.dev — streamable HTTP, exposing the same
seven focused tools. Each tool description is written for an agent audience so the model
knows when to call it.
Hosted endpoint — zero install
Agents can connect to the hosted streamable-HTTP endpoint with nothing but an EzStat API key — no npm install, no local process:
- Multi-tenant: every request carries your key as
Authorization: Bearer <ezkey>; the server holds no key of its own and each connection only ever sees its own account. - Discovery is free:
initializeandtools/listwork without a key, so clients and registry inspectors can introspect the tool surface before you configure anything. - Tool calls require the key: a call without one (or with an invalid one) returns a clean in-band MCP tool error telling the agent what to send — never a hang or a crash.
- Stateless: no sessions are issued or required; each POST is self-contained.
This hosted endpoint also satisfies the requirements for hosted/remote listings on MCP
registries (e.g. Smithery's hosted-server path) — see server.json's remotes entry.
The stdio transport below remains fully supported and is still the right choice when you want the server running locally under your own runner.
Tools
Tool descriptions are tuned for agent reasoning — see src/server.ts.
Install (Claude Desktop / Claude Code / Cursor)
One-line install (npm/pnpm)
Configure the MCP client
Claude Desktop (~/.config/Claude/claude_desktop_config.json on macOS/Linux,
%APPDATA%\Claude\claude_desktop_config.json on Windows):
Cursor (~/.cursor/mcp.json):
Get your API key from https://ezstat.dev (it's the "ezkey").
Smithery
Or visit https://smithery.ai/server/ezstat-mcp-server and click Install.
About EzStat
EzStat is a dead-simple hosted metrics service: one HTTP POST in, a live chart out. No SDK, no collector daemon, no YAML, no dashboard builder. Counters and value/gauge stats auto-create on first POST; charts, share/embed, and CSV/JSON export are built in, and Ask-Your-Data (live) answers plain-English questions from your own metrics, with every number verified against the retrieved data before it reaches you.
Flat monthly pricing by tracked stats — $19 / $49 / $149 — plus a card-gated free tier (no charge; see your data live before paying). Your data is yours: export any time, cancel any time. Anomaly detection and metric correlations are live. Features that are not shipped yet (alerts, weekly digest) are marked coming soon on the site rather than sold — what you see live is what works.
Coming from StatHat?
If your api.stathat.com calls stopped and your dashboards went dark: EzStat speaks
StatHat's wire format — the same /ez, /c, /v endpoints, same params, same
response. The migration is usually one line:
One gotcha, and it is the important one: check the response BODY, not the status code.
Because the wire format is StatHat's, a rejected write (stale key, wrong key, quota hit)
still returns HTTP 200, with the verdict in the body — {"status":200,"msg":"ok"} means
recorded, {"status":"error","msg":"..."} means it was not. An unmodified StatHat client
reports those as successes while your charts keep rendering old data, so nothing looks
broken. New code should send X-EzStat-Strict: 1 on /ez and get real HTTP status codes
instead. (This server already does the right thing: it treats an error body as a failure
regardless of the HTTP code.) After switching, confirm points are arriving with
ezstat.dev/tools/ezstat-verify.py — documented
at ezstat.dev/docs#verify.
Most StatHat client libraries take a base-URL override in one line. Saved a StatHat CSV/JSON export? The importer recreates your stats and backfills history (8 MB / 500k points per file). Full guide: docs/stathat-migration.md · ezstat.dev/migrate/stathat — including the migrator deal: free tier to see it live first, a 12-month price-lock, and white-glove import for the first 25 migrations.
Why agent-native metrics
Your coding agent deploys, tests, and ships — it should also be the one tracking and reading the numbers. That's this server: metrics your agents write and read themselves. The reasoning: docs/agent-native-metrics.md · comparison with StatHat/StatFlow/Datadog: ezstat.dev/vs.
Environment variables
A starter .env.example is shipped.
How it talks to EzStat
The tools map to real EzStat API routes (all auth by EzStat API key):
track_metriccalls the StatHat-compatible EZ ingest ({"ezkey","stat","count"?,"value"?,"t"?}). Counter semantics: omit bothcountandvalueto recordcount=1(counter +1).ask_ezstatcalls Ask-Your-Data ({"query":"..."}→{answer, data, intent, ...}). This is the agent read path — count it as an agent read for usage tracking.read_statreturns the stat's recent series + summary; passfrom/to(Unix seconds, converted to ISO 8601 at the HTTP boundary) to bound the window. The bucket width is auto-derived from the requested span (≤6h → minute, ≤7d → hour, >7d → day).list_statsreturns the account's stats; passtypeto filter tocounterorvalue.
Build & run locally
pnpm start requires EZSTAT_API_KEY to be set; the server exits with a clear error
otherwise (and never logs the key).
Security
- The API key is read only from
EZSTAT_API_KEY— never hardcoded, never printed. - All error messages are scrubbed: the API key is never included in tool results.
- HTTP errors carry a stable machine-readable
code(unauthorized,rate_limited,timeout,not_found,server_error, ...) and a human-readablemessagesafe to relay. - Tests mock the network — no real HTTP leaves the test process.
Registry metadata
For Smithery / mcp.so / Glama listings:
- Name:
ezstat-mcp-server - Display name: EzStat
- Description: Push and read metrics with EzStat from any AI agent. Track counters and values, then ask natural-language questions over your production telemetry.
- Homepage: https://ezstat.dev
- Version:
0.8.0 - Transport:
stdio(local) +streamable-http(hosted athttps://mcp.ezstat.dev) - License: MIT
- Repository: this package's source
The mcp block in package.json carries the same metadata so registry crawlers pick it up.
Listing steps (what to submit, where)
- Smithery: push the repo to GitHub, then run
npx -y @smithery/cli publish(or submit via the web UI). The shippedsmithery.yamlprovides the install schema. - mcp.so: submit at https://mcp.so/submit with the metadata above + the GitHub URL.
- Glama: submit at https://glama.ai/mcp/submit.
The package is not published to npm automatically — publish manually after a release review.
License
MIT.
來源:README.md,提交 f6b0796
工具
0版本歷史
1- v0.7.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分