API & MCP
Everything a person can do on Sun Windows, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://hearthsunwindows.usefulweb.app/api/v1/calculate– run Sun WindowsGET https://hearthsunwindows.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Sun Windows
Explore direct-sun windows, an optional window facing direction and a monthly comparison from your location and measured obstacle angles.
| Field | Type | Default | Description |
|---|---|---|---|
day | date | "2026-06-21" | Date |
latitude | number | 48.89 | Latitude |
longitude | number | 8.7 | Longitude |
utcOffset | number | 2 | UTC offset on selected date |
facing | number | -1 | Window facing (degrees, -1 = open sky) |
stepMinutes | select (5, 1, 15) | "5" | Sampling interval (minutes) |
obstacles | table | [{"azimuth":180,"width":40,"height":5,"distance":10}] | Obstacles from the observation point |
Example request
Try an example
curl -X POST https://hearthsunwindows.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{}'
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://hearthsunwindows.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
hearth_sun_windows - Local stdio connector:
node src/mcp-stdio.ts --tool=hearth-sun-windows
{
"mcpServers": {
"hearth-sun-windows": { "type": "http", "url": "https://hearthsunwindows.usefulweb.app/mcp" }
}
}