# Carapace CMS

Talk to an LLM, get a webpage. A git-native CMS driven by MCP: full HTML, every change versioned, no database or dashboard.

- Status: released (published to npm)
- Stack: TypeScript, MCP, Cloudflare Workers/Pages/R2, npm
- Live site: https://carapace-cms.com
- Repo: https://github.com/Mike-pw/carapace-cms
- Author: Mike Noel

## The problem

Traditional content management systems need a database, an admin dashboard and an API layer, which is a lot to run just to publish pages. And most setups that let an AI assistant write content limit that content to markdown.

## The idea

Let an AI assistant edit pages directly, in full HTML, through MCP tools, with every change saved to git. MCP (Model Context Protocol) is a standard way to give an AI assistant a set of tools it can use.

## How it works

- Published to npm with a scaffolder that sets up a new site.
- A hosted MCP server lets an AI assistant work on the site, with GitHub sign-in and role-based access.
- Pages are full HTML. An allowlist of permitted HTML is checked when content is written and again when it's displayed.
- Drafts live on their own git branch, which also works as a lock.
- SEO and AI-search files are generated when the site is built.

## Hard problems

- **Keeping content safe while allowing full HTML:** HTML is checked against an allowlist when written and again when displayed.
- **Preventing conflicts when an AI fires several edits at once:** a single-writer queue and per-post draft branches.

## How it was built

Spec first, then AI-assisted implementation with review at the end of each milestone, backed by a test suite.
