Track and query EzStat metrics from Claude, Cursor, or any MCP agent. StatHat-compatible.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
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.
Agents can connect to the hosted streamable-HTTP endpoint with nothing but an EzStat API key β no npm install, no local process:
Authorization: Bearer <ezkey>;
the server holds no key of its own and each connection only ever sees its own account.initialize and tools/list work without a key, so clients and
registry inspectors can introspect the tool surface before you configure anything.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.
| Tool | What it does |
|---|---|
track_metric | Record a metric point your app "produced" β counter (+N, default +1) or gauge (e.g. 42.5 ms). |
ask_ezstat | Ask a natural-language question about your metrics (the agent-read path). |
read_stat | Structured read of a stat: latest value + series + summary (count/min/max/avg/sum) for a window. |
list_stats | List the account's metrics (names + types + description). |
create_alert | Create a webhook alert on a stat (threshold / %-change / heartbeat / sustained). |
list_alerts | List the account's alerts (id, stat, condition, channel, enabled, last fire). |
delete_alert | Delete an alert by id. |
Tool descriptions are tuned for agent reasoning β see src/server.ts.
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").
Or visit https://smithery.ai/server/ezstat-mcp-server and click Install.
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.
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:
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.
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.
| Variable | Required | Default | Notes |
|---|---|---|---|
EZSTAT_API_KEY | yes | β | Your EzStat API key (the "ezkey"). Never hardcode. Never log. |
EZSTAT_BASE_URL | no | https://api.ezstat.dev | Override for staging / self-hosted. |
EZSTAT_TIMEOUT_MS | no | 10000 | Per-request timeout in milliseconds. |
EZSTAT_INGEST_PATH | no | /api/ez | Override if you proxy the EZ endpoint. |
EZSTAT_QUERY_PATH | no | /api/v1/query | Ask-Your-Data path. |
EZSTAT_STATS_LIST_PATH | no | /api/v1/stats | Stats list path. |
A starter .env.example is shipped.
The tools map to real EzStat API routes (all auth by EzStat API key):
| Tool | Method | Path | Auth |
|---|---|---|---|
track_metric | POST | /api/ez | ezkey in JSON body |
ask_ezstat | POST | /api/v1/query | Authorization: Bearer <ezkey> |
read_stat | GET | /api/v1/stats/:name | Authorization: Bearer <ezkey> |
list_stats | GET | /api/v1/stats | Authorization: Bearer <ezkey> |
create_alert | POST | /api/v1/alerts | Authorization: Bearer <ezkey> |
list_alerts | GET | /api/v1/alerts | Authorization: Bearer <ezkey> |
delete_alert | DELETE | /api/v1/alerts/:id | Authorization: Bearer <ezkey> |
track_metric calls the StatHat-compatible EZ ingest ({"ezkey","stat","count"?,"value"?,"t"?}).
Counter semantics: omit both count and value to record count=1 (counter +1).ask_ezstat calls Ask-Your-Data ({"query":"..."} β {answer, data, intent, ...}).
This is the agent read path β count it as an agent read for usage tracking.read_stat returns the stat's recent series + summary; pass from/to (Unix seconds) to
bound the window. resolution rolls up to minute/hour/day.list_stats returns the account's stats; pass type to filter to counter or value.pnpm start requires EZSTAT_API_KEY to be set; the server exits with a clear error
otherwise (and never logs the key).
EZSTAT_API_KEY β never hardcoded, never printed.code (unauthorized, rate_limited,
timeout, not_found, server_error, ...) and a human-readable message safe to relay.For Smithery / mcp.so / Glama listings:
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/ezstat-mcp-server)<a href="https://allmcps.com/mcp/ezstat-mcp-server"><img src="https://allmcps.com/api/badge/ezstat-mcp-server?style=directory" alt="Ezstat MCP Server on AllMCPs" /></a>