Skip to content

APIs and MCP servers

Every calculator and every page here answers as JSON and over the Model Context Protocol (MCP). Neither needs a key or a sign-up. The site doesn't store what you send. Its request log keeps the address you asked for, your IP address and your user agent for 30 days, as the privacy policy describes. Cross-origin resource sharing (CORS) is open to any origin.

An assistant that answers questions about heat pumps or solar panels in UK homes can work from the published standards.

Endpoints

GET /api/v1 Discovery

Lists the calculator IDs, the document endpoints, and the two MCP URLs.

curl https://ampworth.com/api/v1
GET /.well-known/ard.json Agent catalogue

Lists the two MCP servers in the Agentic Resource Discovery (ARD) format, so an agent can find them from the domain alone. The older address, /.well-known/ai-catalog.json, serves the same file.

curl https://ampworth.com/.well-known/ard.json
GET /api/v1/openapi.json OpenAPI description

Describes the whole API in OpenAPI 3.1. Each calculator has its own path, with request and result schemas inferred from the code that runs it. You can load it into a client generator, Postman, or Swagger UI.

curl https://ampworth.com/api/v1/openapi.json
GET /api/v1/calculators List the calculators

Returns every calculator, the Microgeneration Certification Scheme (MCS) standard it follows, a worked example request, and the URL that runs it.

curl https://ampworth.com/api/v1/calculators
GET /api/v1/calculators/{id} Describe one calculator

Returns the fields it takes as a JSON Schema, an example request, and the reference data those fields draw on, such as the solar zones and the design locations.

curl https://ampworth.com/api/v1/calculators/solar-pv-output
POST /api/v1/calculators/{id} Run a calculator

Send the request as JSON. The API rejects unknown fields rather than ignoring them, so a typo returns an error instead of a wrong answer.

curl -X POST https://ampworth.com/api/v1/calculators/solar-pv-output \
  -H 'Content-Type: application/json' \
  -d '{"postcode":"BS1 5TR","capacityKwp":4.4,"orientation":30,"inclination":35}'
GET /api/v1/calculators/{id}?{fields} Run a calculator from a link

Put the fields in the query string instead of a JSON body, with each parameter named after its JSON field. For a list field, such as a room's elements, send the JSON array as the value. The answer is the same as for a POST, and an unknown parameter returns an error. Use this from a client that can follow a link but can't send a request body, such as an assistant that browses the web. Each calculator's description includes a working exampleUrl.

curl 'https://ampworth.com/api/v1/calculators/solar-pv-output?postcode=BS1+5TR&capacityKwp=4.4&orientation=30&inclination=35'
GET /api/v1/documents List the documents

Lists every guide, article, and question set. To filter the list, add ?kind= or ?category=. To include the full text, add ?full=true.

curl 'https://ampworth.com/api/v1/documents?kind=guide'
GET /api/v1/documents/search Search

Searches titles, summaries, and text, and ranks the results. When a query matches one question in a question set, the response includes that question and its answer.

curl 'https://ampworth.com/api/v1/documents/search?q=flow+temperature'
GET /api/v1/documents/{kind}/{slug} Read one document

Returns the full text as Markdown, with the MCS documents it draws on and any calculators that do its arithmetic.

curl https://ampworth.com/api/v1/documents/guides/sizing-a-heat-pump
POST /mcp MCP: everything on one server

This stateless server uses streamable HTTP and has every tool from the two servers below, so one connection gives you the calculators and the documents. Use it with a client that connects one server per integration, such as a ChatGPT plugin.

{
  "mcpServers": {
    "ampworth": {
      "type": "http",
      "url": "https://ampworth.com/mcp"
    }
  }
}
POST /mcp/calculators MCP: calculators

This stateless server uses streamable HTTP and exposes every calculator as a tool, plus list_calculators. Its schemas come from the same structs that the JSON API decodes.

{
  "mcpServers": {
    "ampworth-calculators": {
      "type": "http",
      "url": "https://ampworth.com/mcp/calculators"
    }
  }
}
POST /mcp/documents MCP: documents

This stateless server uses streamable HTTP and has three tools: search_documents, get_document, and list_documents.

{
  "mcpServers": {
    "ampworth-documents": {
      "type": "http",
      "url": "https://ampworth.com/mcp/documents"
    }
  }
}

MCP tools

Both servers use streamable HTTP and run stateless, so there's no session to hold. The input and output schemas come from the same Go structs that the JSON API decodes, so the contract an assistant reads is generated from the code that answers it. When a client connects, each server also sends instructions: which tools to start with, which inputs to ask for rather than guess, and the caveats every answer should carry.

All three servers are listed in the official MCP Registry, as com.ampworth/ampworth, com.ampworth/calculators and com.ampworth/documents, and on Smithery as ampworth, ampworth-calculators and ampworth-documents.

Tool Server Standard Tier What it does
solar_pv_system_size calculators MIS 3002 whole system Works out the array a home needs — capacity, panels, battery and what it saves — from a postcode, a roof direction and a year of electricity use.
heat_pump_size calculators MIS 3005-D whole system Estimates a house's heat loss and the heat pump that covers it, from a year of gas or oil bills, and says whether a quoted size looks plausible.
solar_pv_output calculators MIS 3002 one method Estimates a year of generation from a solar array using the MCS standard estimation method.
solar_pv_shading calculators MGD 005 one method Turns a sunpath assessment into the shade factor an output estimate is multiplied by.
solar_pv_self_consumption calculators MGD 003 one method Estimates how much of a solar system's output a household uses and how much it exports, with and without a battery.
heat_pump_noise calculators MCS 020 one method Works out the sound pressure level at a neighbour's window and whether it clears the permitted development limit.
room_heat_loss calculators MIS 3005-D one method Works out one room's design heat loss, the figure a heat pump and its radiators are sized from.
radiator_flow_temperature calculators MGD 007 one method Works out what flow temperature a radiator needs for its room, and the Heat Emitter Guide star rating that follows.
hot_water_cylinder calculators MIS 3005-D one method Works out a household's daily hot water demand and the cylinder a heat pump needs to meet it.
heat_pump_running_cost calculators MCS 007 one method Compares a year of heating on the current fuel with the same heat from a heat pump.
connection_route calculators EREC G98 / G99 one method Works out whether solar and batteries can be connected first and notified under G98, or need the network operator's approval under G99.
list_calculators calculators — — Lists the calculators and every fixed set of values you might need to choose from.
search_documents documents — — Searches the documents and ranks the results. A query that matches one question in a question set returns that question and its answer.
get_document documents — — Returns one document in full, as Markdown, with the MCS documents it draws on.
list_documents documents — — Lists every document. You can filter by kind, category, level, or perspective.

Command line

The ampworth command line runs every calculator and reads the documents from a terminal. It also runs as a local MCP server, for clients that start servers on your machine rather than connect to a URL. It calls this API, so its answers are the same as the site's, and it needs an internet connection.

brew install ampworth/tap/ampworth

ampworth run heat-pump-size --location birmingham --annual-fuel-use 12000 --bedrooms 3
ampworth search "flow temperature"
ampworth mcp      # a local MCP server over standard input and output

You can also install it with go install github.com/ampworth/cli/cmd/ampworth@latest, or download a signed binary for macOS, Linux, or Windows from the releases page. It's open source, under the MIT licence.

WebMCP in the browser

When your browser supports WebMCP, each page registers its tools with document.modelContext. An assistant that works in your browser can then call them without connecting to an MCP server. In other browsers, the script does nothing.

  • Every page offers search_documents and get_document, which read the JSON API. This version of get_document takes a kind as well as a slug, and a search returns both.
  • Each calculator page also offers its own calculator, with the same name, description, and input schema as the MCP tool. The assistant receives the answer as structured data with a prose summary. The same answer appears on the page with its working, so you see what the assistant sees.
  • Each page lists its tools as JSON in <script id="webmcp-tools">, so you can read them without running any script.

Things worth knowing

Unknown fields are rejected
A misspelt field name returns a 400 error. If the API ignored it instead, the calculation would run without that input and return an answer that looked fine.
Validation errors arrive together
A 422 error lists every invalid field, each with a message that says what's wrong, so you can fix them all in one round trip.
Every answer carries its assumptions
Results include the intermediate figures, the method, the MCS document it came from, and any notes about how far you can trust the answer. Everything you need to interpret an answer comes with it.
Rate limits
Each surface accepts 120 requests a minute from each address. The site doesn't store any data, so the limit protects only CPU time. A 429 response includes a Retry-After header.
The MCP servers are stateless
Each request carries its own short-lived session, so there's no session ID to hold and nothing to expire. GET and DELETE requests return 405. POST requests must send Accept: application/json, text/event-stream.
The United Kingdom only
Design temperatures, irradiance zones, permitted development limits, and network rules are all British. If you apply any of it elsewhere, you get an answer that looks reasonable but is wrong.