API & MCP
Everything a person can do on Price Per Everything, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://pricepereverything.usefulweb.site/api/v1/calculate– run Price Per EverythingGET https://pricepereverything.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Price Per Everything
Enter two or more products with their price and quantity (grams, uses, servings, hours or years). Price Per Everything normalises them to the same basis, accounts for waste, and ranks them from cheapest to most expensive per unit.
| Field | Type | Default | Description |
|---|---|---|---|
basis | select (unit, use, serving, hour, year) | "unit" | Compare by |
currency | text | "EUR" | Currency. Shown in results only; no conversion is performed. |
products (required) | table | — | Products. Quantity is in the chosen basis (e.g. 500 for 500 g, 30 for 30 uses). Waste % reduces the usable quantity. |
Example request
Coffee: small vs. large bag
curl -X POST https://pricepereverything.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"basis":"unit","currency":"EUR","products":[{"name":"Coffee 250 g","price":4.99,"quantity":250,"unit":"g"},{"name":"Coffee 1 kg","price":15.49,"quantity":1000,"unit":"g","wastePercent":10}]}'
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://pricepereverything.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
price_per_everything - Local stdio connector:
node src/mcp-stdio.ts --tool=price-per-everything
{
"mcpServers": {
"price-per-everything": { "type": "http", "url": "https://pricepereverything.usefulweb.site/mcp" }
}
}