Stack
How this site is built
Static pages, a small town in three.js and one Worker. The footer of every page shows what that page cost your browser to load.
- Build
- A small TypeScript script renders every page to static HTML from
site/data.tsand the Markdown posts. No framework, no client-side router. - One source of facts
- Every product, figure and one-liner lives in
site/data.ts. The build writes them into the pages and into a small module the town reads, so a shop sign and a product card never disagree. - The town
- three.js, vendored, with no build step. The buildings, props, seventeen townspeople and a terrier are glTF models made for this site. Sky, sea, bloom and a tilt-shift depth of field are custom shaders, and everyone in town keeps a schedule.
- First paint
- A poster rendered from the same scene paints first. The town loads after it, fades in over it, and drops its resolution before it drops frames.
- Delivery
- Cloudflare Workers with static assets. A small Worker answers
/mcp,/api/eventsand/api/figures; everything else is served straight from the edge. - Live data
- Products post anonymous events and their latest figures. One Durable Object keeps the last 50 events and the figures and pushes updates over a hibernating WebSocket. While there are no events, the town’s ticker runs on demo data and says so.
- MCP
- The site is a read-only MCP server over Streamable HTTP: products, posts and contact, with the live figures laid over the build-time ones.
- Budgets
- CSS is inlined, and the homepage’s first response stays under 14 KB compressed. The build checks it, and the size of the town’s code, on every run.
- Caching
- Every asset carries a hash of its content in its file name, so it can be cached for a year and a deploy never serves a stale file.
- Type
- Federo for names and headings, Instrument Sans for text and Poiret One for the big figures. Self-hosted Latin subsets.
- Motion
- With reduced motion the page shows the poster and a button to open the town. Without WebGL the poster stands, and everything else reads the same.
- Navigation
- Links prerender on hover with the Speculation Rules API, so most clicks show the next page at once.
For machines
- /mcpMCP server (Streamable HTTP). Tools: list_products, get_product, list_posts, get_post, contact.
- /llms.txtA plain index of the site for language models.
- /index.mdEvery page has a Markdown twin: add .md to the path.
- /api/eventsThe latest anonymised events from the products, as JSON. /api/events/socket streams them over a WebSocket.
- /api/figuresThe latest figure for each product, as JSON. Updates also arrive on the socket.
- /api/content.jsonEverything the MCP server knows, as one file.
- /sitemap.xmlEvery page, for search engines.
Add the MCP server
- Claude Code
claude mcp add --transport http albretsen https://albretsen.no/mcp - Cursor
~/.cursor/mcp.json{ "mcpServers": { "albretsen": { "url": "https://albretsen.no/mcp" } } } - VS Code
code --add-mcp '{"name":"albretsen","type":"http","url":"https://albretsen.no/mcp"}' - Codex
~/.codex/config.toml[mcp_servers.albretsen] url = "https://albretsen.no/mcp" - Any client
https://albretsen.no/mcp