Released · published to npm

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.

  • TypeScript
  • MCP
  • Cloudflare Workers/Pages/R2
  • npm

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. Carapace gives the assistant tools for editing a website, and git keeps the full history of every change.

How it works

  • Get started from npm. Carapace is published to npm with a scaffolder that sets up a new site.
  • Connect your assistant. A hosted MCP server lets an AI assistant work on the site. People sign in with GitHub, and role-based access controls what each person can do.
  • Write real HTML, safely. Pages are full HTML, not just markdown. An allowlist of permitted HTML is checked when content is written and again when it's displayed.
  • Draft without collisions. Drafts live on their own git branch, which also works as a lock so two edits can't trip over each other.
  • Ready for search. SEO and AI-search files are generated automatically when the site is built.

Hard problems

Keeping content safe while allowing full HTML

Problem
Full HTML gives pages real flexibility, but it also lets unsafe markup in if nothing checks it.
What I did
Checked HTML against an allowlist twice: once when content is written, and again when it's displayed.

Preventing conflicts when an AI fires several edits at once

Problem
An AI assistant can send several edits at the same moment, and they can overwrite each other.
What I did
Sent all writes through a single-writer queue, and gave each post its own draft branch.

How it was built

I wrote a spec first, then built Carapace with AI-assisted implementation, reviewing the work at the end of each milestone, with a test suite checking the behaviour along the way.