graft. docs

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

  1. Node.js 22.16 or newer. The index's full-text search uses the node:sqlite build 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:

Explore

Load-bearing ideas

  1. Git owns authored content. The index is derived. Recompile if they disagree.
  2. One Zod layer types compile, reads, functions, and MCP.
  3. MCP and the CLI are first-class. Errors carry a fix.
  4. Preview branches are copy-on-write.
  5. Owned primitives land as source via graft add.