headcode
Features

What the stack gives you.

Headcode CMS is a focused CMS for human-and-agent teams, and a live production showcase of what mstack and mstack-hub make possible for European companies.

OpenCode · ClaudeYour agentsAdmin
↓ /mcp · OAuth 2.1 · 23 tools + skills
headcode · mstacksingle-tenant Rust

axum · rmcp 3.11 · embedded turso 0.9

boot + migrate
~14 ms
RAM idle
~8 MB
to DB file
0 hops
↓ ↑
Turso .dblocal file + /media
Better AuthOAuth 2.1 · IDs only
Next.jscached site

01 · mstack Rust core

Secure, fast, scalable, in 8 MB of RAM.

Multi-tenant SaaS stacks and shared Postgres clusters add heavy operational overhead, latency, and blast radius before you even connect an agent.

Headcode CMS runs on mstack: a single-tenant Rust binary with embedded Turso (~14 ms boot, ~7–8 MiB RAM). Every site or internal MCP service gets its own container and database file, showing what mstack and mstack-hub make possible for companies.

In practice

One ~€6/month German ARM64 server runs dozens of isolated Headcode sites and internal MCP backends side by side.

Products
Lamp
Chair
01 Desktop
Products
Lamp
Chair
02 Mobile

GET /products?md

# Products

## Lamp

- Oak, handmade

## Chair

- Walnut, handmade

03 Agents

02 · rmcp & Skills over MCP

Built on rmcp, with Skills over MCP.

Agents struggle with ad-hoc REST wrappers and undocumented endpoints. Without clear tool schemas and playbooks, they guess and break workflows.

The backend uses rmcp, the official Rust SDK for MCP (the protocol from Anthropic), exposing 23 typed tools and built-in MCP Skills (skills-fs) with SHA-256 verification. On the web side, every page also serves clean Markdown (?md) and /llms.txt.

In practice

Connect OpenCode, Claude, or ChatGPT once: the server delivers both the Zod-generated content schema and the exact editorial skill automatically.

Privacy-first access control

  • MOwnerid: usr_9f2a… · no email in DBAdmin
  • AAnnaid: usr_4b1c… · redeemed inviteEditor
  • CClaudeOAuth 2.1 · acting as AnnaEditor
  • TTomone-time invite link · 24hInvited

The CMS stores only anonymous user IDs and hashed one-time invites. No email table to leak.

03 · OAuth 2.1 via Better Auth

Short-lived tokens. No personal data in backends.

Static admin API keys and duplicated email tables turn every internal service into a GDPR liability and a security target.

Authentication runs in a shared Better Auth server supporting magic links and OAuth 2.1 with dynamic client registration. Every Rust backend verifies short-lived tokens itself via JWKS, stores only an anonymous user ID (no emails or profiles), and grants roles through hashed one-time invite links.

In practice

An editor connects Claude over OAuth 2.1. The agent inherits that editor's exact permissions; revoke access once and every agent session stops immediately.

EU & GDPR Architecture

MIT · €0 license
  • JurisdictionEU / Germany · Outside US CLOUD Act
  • Personal dataNone in backend · IDs only
  • Isolation1 container + 1 Turso .db per service
  • PortabilityHetzner DE or any Linux / on-prem
Hetzner DE (Falkenstein · Nuremberg)ISO 27001
ARM64 node
~€6/mo
per service
~8 MB
isolated MCPs
100+

04 · EU-compliant & self-hosted

GDPR by architecture. Own hardware.

Picking an EU region on a US cloud still leaves companies under US CLOUD Act jurisdiction and dependent on external SaaS pricing.

Headcode CMS and mstack follow GDPR data minimization and Privacy by Design from the data model up. Run on German Hetzner servers (Falkenstein / Nuremberg, ISO 27001) or entirely on your own Linux hardware, with encrypted VACUUM INTO backups and 5-layer agent patching.

In practice

Run backend, auth, and standalone Next.js 100% on European or on-premises servers when zero US subprocessors are allowed.

Static site · every edit is a deploy

deploy #47anna: fix typo on home

deploy #48claude: add walnut chair

deploy #49tom: update team photo

deploy #50claude: rewrite blog intro

? which version is live

Headcode · mywebsite.com/admin

3 changes
  • AHome · hero textEditor
  • CProducts · new chairAgent
  • TAbout · team photoEditor
PreviewPublish draft Signed webhook refresh

05 · Human + agent publishing

One draft. Human approval.

When simple static sites are edited by multiple people and agents at once, every typo becomes a deploy and nobody knows what is live.

Headcode gives humans (/admin) and agents (/mcp) one shared draft validated against Zod schemas in Git. Review changes on a rotatable preview link, publish atomically with 10-snapshot rollback, and refresh cached Next.js pages via HMAC-signed webhooks.

In practice

An agent drafts three articles via MCP. You check the preview URL, tweak a headline in /admin, and click Publish once.

Yours, not rented

  • GitHubYour code & schema
  • Uncloud (ARM64)Rust backend + Turso .db
  • Better AuthShared OAuth 2.1 login
  • Next.jsSelf-hosted or Vercel
Headcode & mstack€0 · MIT

06 · Free & open source

Every component is yours.

Proprietary CMS and agent platforms tax every editor seat, lock your data behind APIs, and raise prices once you depend on them.

Headcode CMS, mstack, Turso, Better Auth, Next.js, and axum are MIT licensed; rmcp, Uncloud, and Caddy are Apache 2.0. Every component is free and permissively open source, and mstack copies plain, readable Rust files directly into your repo instead of hiding behind a black-box framework.

In practice

€0 license fees, €0 per editor, €0 per connected AI agent. You only pay for your own server.

Honest scope

When a site needs a CMS, 90% need exactly this much.

Simple websites rarely need a CMS anymore. When several people and agents edit together, Headcode gives you pages, articles, previews, and MCP. Nothing more, on purpose.

Need multi-department legal approvals, print channels, and dozens of legacy integrations? Then you need an enterprise platform. I've built those for twenty-five years, and I'll gladly tell you if you're in that 10%: no CMS, simple, or enterprise.

90% with a CMSHeadcode is all they need 10% enterpriseNeed an enterprise platform