ezstat-mcp-server
This server lets AI agents push metrics to EzStat and read them back, plus manage alerts, all through MCP tools.
track_metric — record counters (default +1) or gauge/value measurements, with optional back-dated timestamps.
ask_ezstat — ask natural-language questions about your metrics and get grounded answers with supporting data.
read_stat — fetch a stat's latest value, recent series, and summary (count/min/max/avg/sum), optionally filtered by time range and rollup resolution.
list_stats — list account metrics (names/types) and optionally filter by counter or value.
create_alert / list_alerts / delete_alert — manage webhook alerts with conditions like threshold, %-change, heartbeat, or sustained.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ezstat-mcp-serverWhat's the error rate for the last 30 minutes?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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:
{
"mcpServers": {
"ezstat": {
"type": "http",
"url": "https://mcp.ezstat.dev",
"headers": {
"Authorization": "Bearer ezkey_your_api_key_here"
}
}
}
}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.
Related MCP server: Datadog MCP Server
Tools
Tool | What it does |
| Record a metric point your app "produced" — counter (+N, default +1) or gauge (e.g. 42.5 ms). |
| Ask a natural-language question about your metrics (the agent-read path). |
| Structured read of a stat: latest value + series + summary (count/min/max/avg/sum) for a window. |
| List the account's metrics (names + types + description). |
| Create a webhook alert on a stat (threshold / %-change / heartbeat / sustained). |
| List the account's alerts (id, stat, condition, channel, enabled, last fire). |
| Delete an alert by id. |
Tool descriptions are tuned for agent reasoning — see src/server.ts.
Install (Claude Desktop / Claude Code / Cursor)
One-line install (npm/pnpm)
# pnpm
pnpm add -g ezstat-mcp-server
# npm
npm install -g ezstat-mcp-serverConfigure the MCP client
Claude Desktop (~/.config/Claude/claude_desktop_config.json on macOS/Linux,
%APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"ezstat": {
"command": "ezstat-mcp-server",
"env": {
"EZSTAT_API_KEY": "ezkey_your_api_key_here"
}
}
}
}Cursor (~/.cursor/mcp.json):
{
"mcpServers": {
"ezstat": {
"command": "ezstat-mcp-server",
"env": {
"EZSTAT_API_KEY": "ezkey_your_api_key_here"
}
}
}
}Get your API key from https://ezstat.dev (it's the "ezkey").
Smithery
npx -y @smithery/cli install ezstat-mcp-server --client claudeOr 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:
# before
curl -X POST https://api.stathat.com/ez -d "stat=messages sent" -d "ezkey=KEY" -d "count=1"
# after — change the host, use your EzStat key; stats auto-create
curl -X POST https://api.ezstat.dev/ez -d "stat=messages sent" -d "ezkey=EZSTAT_KEY" -d "count=1"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
Variable | Required | Default | Notes |
| yes | — | Your EzStat API key (the "ezkey"). Never hardcode. Never log. |
| no |
| Override for staging / self-hosted. |
| no |
| Per-request timeout in milliseconds. |
| no |
| Override if you proxy the EZ endpoint. |
| no |
| Ask-Your-Data path. |
| no |
| Stats list path. |
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):
Tool | Method | Path | Auth |
| POST |
|
|
| POST |
|
|
| GET |
|
|
| GET |
|
|
| POST |
|
|
| GET |
|
|
| DELETE |
|
|
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) to bound the window.resolutionrolls up tominute/hour/day.list_statsreturns the account's stats; passtypeto filter tocounterorvalue.
Build & run locally
pnpm install
pnpm build # tsc → dist/
pnpm start # node dist/index.js (stdio MCP server)
pnpm test # vitest run — fully mocked network, no real HTTP
pnpm dev # tsx watch src/index.tspnpm 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-serverDisplay 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.0Transport:
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.
Available Tools
4 toolsask_ezstatA
Ask a natural-language question about the account's metrics. This is the agent-read path: send a question like "what spiked yesterday?" or "compare signups vs cancellations last 7 days" and EzStat returns a grounded answer plus the underlying data it used.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Natural-language question about your metrics. Examples: "What was my peak request rate yesterday?", "Top 5 fastest growing stats this week", "Compare signups vs cancellations last 7 days". |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full responsibility for behavioral disclosure. It discloses that the tool returns a grounded answer plus underlying data, which is useful. However, it doesn't mention that this is a read-only operation, any potential latency, or possible limitations of the natural-language model. The 'agent-read path' hint implies read-only but it is not explicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the primary purpose, and includes a concrete example. Every sentence earns its place with no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with a clear description, the definition covers the core behavior, gives examples, and states the return value. It lacks some context such as authentication requirements or error conditions, but these are not critical for an agent to select and invoke the tool correctly in most cases.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already contains a well-described query parameter with examples, and schema coverage is 100%. The description reinforces the same meaning by giving examples but does not add meaning beyond what the schema provides. The baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Ask') and resource ('the account's metrics'), and clarifies the behavior: it returns a grounded answer plus the underlying data. It distinguishes itself from siblings like read_stat and list_stats by calling itself the 'agent-read path' for natural-language questions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context for when to use this tool: when the agent needs to ask a natural-language question about metrics. It provides examples of appropriate queries. However, it does not explicitly name alternative tools or state when NOT to use it (e.g., when you need a single numeric read via read_stat).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_statsA
List the account's metrics — names and types. Call this first when you don't know what stats exist in the account.
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Optional filter by stat type ("counter" for monotonically increasing, "value" for gauges). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations are absent, so the description carries the transparency burden. It conveys a read-only listing operation with no side effects, but does not disclose pagination, response format, or authorization requirements. The 'call this first' guidance adds useful context, but behavioral depth is limited.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no wasted words. It states the action, scope, and usage guidance efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with no output schema, the description covers purpose, usage, and basic output (names and types). It lacks an explicit return structure or pagination details, but these are not critical for a discovery tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% for the single parameter 'type', with a detailed description including enum meanings. The tool description adds no additional parameter semantics, so the baseline 3 applies when the schema already does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the verb 'List', the resource ('the account's metrics'), and the output content ('names and types'). The added instruction 'Call this first when you don't know what stats exist' further distinguishes it from sibling tools like read_stat or track_metric, positioning it as the discovery tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit guidance is given: 'Call this first when you don't know what stats exist in the account.' This provides a clear when-to-use. It does not explicitly name alternatives or when-not-to-use, but the scoping to names/types implies other tools are for values or tracking.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_statA
Read a single stat: latest value, recent series, and basic summary (count/min/max/avg/sum). Use this for a structured read of one metric — prefer ask_ezstat for free-form questions over many stats.
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Unix-seconds upper bound (inclusive). Omit for "now". | |
| from | No | Unix-seconds lower bound (inclusive). Omit for "last 24 hours". | |
| name | Yes | Exact stat name to read. | |
| resolution | No | Optional rollup resolution. Omit for raw points. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the nature of the operation (read), the scope (single stat), and the exact contents of the response (latest value, recent series, count/min/max/avg/sum). It does not delve into error conditions or explicit read-only guarantees, but the term 'read' and the output summary provide sufficient transparency for a non-destructive tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, extremely concise, and front-loaded with the purpose and output. The second sentence adds usage guidance without redundant details. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity, complete schema descriptions, and the description's explicit enumeration of return values, the information is sufficient for an agent to select and invoke the tool correctly. No output schema is present, but the description covers what the tool returns, so no gaps remain.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3. The description does not add parameter-specific semantics beyond the schema, but it does reinforce the 'single stat' concept that maps to the 'name' parameter. Since the schema already documents all parameters well, no additional compensation is needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description states a specific verb ('Read'), a specific resource ('a single stat'), and enumerates the delivered output ('latest value, recent series, and basic summary (count/min/max/avg/sum)'). It also distinguishes from the sibling tool by noting that 'ask_ezstat' is for free-form questions over many stats, so the purpose is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use this tool: 'Use this for a structured read of one metric' and contrasts it with an alternative: 'prefer ask_ezstat for free-form questions over many stats.' This provides clear guidance and differentiates from siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
track_metricA
Record a metric point your app "produced". Use this whenever the surrounding code emits a counter or gauge — e.g. on a page view, a successful checkout, or a measured latency. Counters are +N (default +1), values are gauges (e.g. 42.5 ms).
| Name | Required | Description | Default |
|---|---|---|---|
| stat | Yes | Name of the metric to record (e.g. "page_views", "api.latency_ms", "checkout.success"). Allowed chars: letters, numbers, underscores, hyphens, dots. Auto-created on first use. | |
| count | No | For COUNTER stats: how much to increment by. Omit (or set with `value`) for a gauge/measurement stat. If both `count` and `value` are omitted, this defaults to +1. | |
| value | No | For VALUE/gauge stats: the measurement to record (e.g. 42.5 for "load time ms"). Omit for a counter increment. | |
| timestamp | No | Optional Unix-seconds timestamp for back-dated datapoints. Omit for "now". |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the full burden. It discloses key behavior: counters increment by +N (default +1) and values act as gauges. This adds useful context. However, it omits side effects like auto-creation of stats (only in schema) and does not explicitly state that this is a write/mutating operation or any persistence behavior, leaving some behavioral ambiguity.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no wasted words. The first sentence front-loads the purpose and use cases; the second efficiently explains the counter/gauge semantics. It is appropriately sized and well structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (4 params, 1 required), the high schema coverage, and the absence of an output schema, the description adequately covers the core purpose and usage. It lacks only minor context like return behavior or explicit mention of timestamp, but these are not critical given the schema covers parameter details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description reinforces the counter/gauge distinction and how count vs value map to these modes, which adds a little meaning. But the schema already explains each parameter thoroughly, so the description does not significantly elevate clarity beyond it.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb+resource: 'Record a metric point your app produced.' It clearly states the tool's job and distinguishes it from sibling read/query tools (read_stat, list_stats, ask_ezstat) by focusing on recording vs retrieving metrics. Concrete examples (page view, checkout, latency) further clarify the purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit when-to-use guidance: 'Use this whenever the surrounding code emits a counter or gauge.' It provides relevant examples and explains the counter vs gauge distinction. However, it does not explicitly name alternative tools or state when not to use it, so it stops short of a full 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a clear, distinct role: track_metric writes, read_stat does structured reads of a single metric, ask_ezstat handles free-form natural-language queries, and list_stats discovers available metrics. The overlap between read_stat and ask_ezstat is explicitly addressed in their descriptions, making misselection unlikely.
Most tools follow a clear verb_noun pattern: track_metric, read_stat, list_stats. ask_ezstat also follows verb_noun but uses a product-specific noun, which is slightly inconsistent with the generic metric-related nouns used elsewhere. Overall the pattern is still predictable and readable.
Four tools is on the smaller side but appropriate for the focused scope of tracking and querying metrics. Each tool serves a core need without redundancy, though the set could be expanded with e.g. delete_metric or batch operation tools.
The tool surface covers the essential lifecycle: record (track_metric), read single (read_stat), query over many (ask_ezstat), and discover (list_stats). It lacks explicit update/delete operations, but for a metrics tracking server these are often unnecessary, and agents can work around this limitation.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
AI access to Hitsteps analytics, live visitors, uptime, goals, alerts, and chats.
Analytics your AI agent can actually use. Track, experiment, and optimize via MCP.
Provide real-time data querying and visualization by integrating Tako with your agents. Generate o…
Query your Betterlytics web analytics from AI agents: traffic, funnels, journeys, errors, uptime.
Related MCP Servers
- AlicenseAqualityCmaintenanceConnects AI assistants to Warpmetrics telemetry data to monitor AI agent performance, execution runs, and LLM costs. It allows users to query success rates, latency, and spend metrics directly through natural language interfaces.2059MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Datadog's observability platform via natural language, covering metrics, logs, APM, monitors, dashboards, incidents, and infrastructure.1,1061MIT
- AlicenseAqualityBmaintenanceProvides stateful counter tools for AI assistants, enabling accurate counting and tracking of metrics via tag-based or direct tool calls.7MIT
- AlicenseAqualityBmaintenanceLets AI agents query, manage, and operate their LLM observability data directly from the conversation. Provides 87 tools for cost analysis, alerting, anomaly detection, and runtime control gates.87209MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/clira-dev/ezstat-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server