What is Graft
The open-source, self-hostable CMS for agents and the people who run them.
Graft is the open-source, self-hostable CMS for agents and the people who run them.
Content is MDX in git. A Zod schema validates it. A derived index makes it queryable. You and your agent work through the CLI and MCP, with no dashboard required.
You'll need
- Node.js 22.16 or newer. The index's full-text search uses the
node:sqlitebuild that ships from 22.16.0.
That is the whole list. graft compile writes the index to a SQLite artifact
your app reads embedded, so a content project runs with no database and no
object store.
Two things need more. Postgres backs operational data, typed functions, and
copy-on-write branches. An S3-compatible store holds assets. Reach for either
and Graft says so: a Postgres-tier feature in static mode fails with
NEEDS_DATABASE, whose fix is the upgrade. See
Getting started and
Configuration.
Quickstart
Pick a path:
Init a project, compile MDX, read it typed.
Reading contentSix framework adapters, plus the browser.
Self-hostOne container, split compose, or embed handlers.
AgentsMCP tools, self-teaching errors, cold-agent gate.
Explore
Git owns content. The index is derived.
BranchingCopy-on-write overlays or Neon forks.
Owned primitivesgraft add copies source into your repo.
Error referenceEvery code, what it means, how to recover.
Load-bearing ideas
- Git owns authored content. The index is derived. Recompile if they disagree.
- One Zod layer types compile, reads, functions, and MCP.
- MCP and the CLI are first-class. Errors carry a
fix. - Preview branches are copy-on-write.
- Owned primitives land as source via
graft add.