API & MCP
Everything a person can do on Sizewise Rate Counter, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://sizewiseratecounter.usefulweb.app/api/v1/calculate– run Sizewise Rate CounterGET https://sizewiseratecounter.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Sizewise Rate Counter
Converts a rate between seconds, minutes, hours, days, weeks, months and years, projects it over time, finds when it reaches a target and writes a small self-contained HTML counter (“since you opened this page …”) for your own site.
| Field | Type | Default | Description |
|---|---|---|---|
label | text | "Light travels" | What is counted |
amount | number | 299792.458 | Amount |
per | select (second, minute, hour, day, week, month, year) | "second" | Per |
unit | text | "km" | Unit of the amount |
elapsedSeconds | number | 60 | Elapsed time |
target | number | 0 | Target (optional) |
decimals | integer | 0 | Decimals in the counter |
Example request
Light to the Moon
curl -X POST https://sizewiseratecounter.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"label":"Light travels","amount":299792.458,"per":"second","unit":"km","elapsedSeconds":60,"target":384400}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://sizewiseratecounter.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
sizewise_rate_counter - Local stdio connector:
node src/mcp-stdio.ts --tool=sizewise-rate-counter
{
"mcpServers": {
"sizewise-rate-counter": { "type": "http", "url": "https://sizewiseratecounter.usefulweb.app/mcp" }
}
}