Turn a Next.js site into a real CMS. Agents draft content through MCP, editors review in a clean admin UI, and publishing updates your live site without a deployment.
Built with
Define sections, globals, and collections with Zod field helpers in headcode/sections.ts. Export JSON Schema with pnpm schema so every draft is validated before it lands.
The Rust backend exposes a Streamable HTTP MCP server with editorial, publish, and admin skills so OpenCode, Claude, or ChatGPT can draft and verify changes safely.
Every edit writes to draft first. Inspect unpublished changes on your running Next.js site with a rotatable preview link, review the diff, or roll back any snapshot in one click.
The CMS stores no emails or user profiles. Callers authenticate via multi-issuer JWKS (iss, sub) through Better Auth, and editors join using hashed one-time invite links.
Runs in roughly 8 MB of RAM on your own ARM64 server with embedded Turso and local /media storage. Next.js caches live pages on Vercel and refreshes via signed webhooks.
Most content platforms were built for humans clicking through dashboards, or they pull in a heavy multi-tenant SaaS stack just to edit a website.
Headcode v4 is a single-tenant Rust MCP backend built on mstack paired with a plain Next.js frontend. Your schema lives in Git, agents and editors share the same draft-and-publish workflow, and a copy change never requires a redeploy.
headcode/sections.ts compiled to JSON Schema for backend validation.rmcp) with 23 tools, built-in editorial/publish/admin skills, and OAuth 2.1.'use cache', Vercel Image Optimization, and signed webhook revalidation.(iss, sub) identities and hashed one-time invite tokens.Agents draft structured content through MCP. People review the live preview and click publish.
Ready to try it? Open the admin or follow the v4 documentation.