Invert

Invert

A database-less, adapter-driven content presentation layer built on Astro.

Invert is not a CMS. It's the thing that sits in front of your CMS — or in front of no CMS at all — and renders content from any source. There is no admin panel. There is no database. Content comes in as JSON or Markdown. Where that content comes from is not Invert's problem. That's what adapters are for.

An adapter can read static JSON files from disk, parse Markdown from a local directory, fetch from a WordPress REST API, pull from a GitHub repo, or receive structured input from an AI tool over MCP. Multiple adapters run simultaneously — content merges from all sources.

No database

All content is JSON at rest or in transit. No ORM, no migrations, no connections.

No admin panel

Content is managed externally. Invert only reads and renders. The admin can be anything.

Adapters are the integration point

Each content source implements InvertAdapter. Swap them in and out in config.

MCP is first-class

An MCP server ships out of the box. AI tools can query and write content without a UI.

Documentation

Getting started

1 Use the template

Click Use this template on the GitHub repo to create your own repository, then clone it locally.

2 Install dependencies

Requires Node.js >= 22. If you use nvm:

nvm use
npm install

3 Configure your site

Edit src/lib/config.ts to set your site name, URL, and which adapters to use:

export const invertConfig = {
  siteName: 'My Site',
  siteUrl: 'https://example.com',
  adapters: [
    new JsonAdapter({ contentDir: join(root, 'content') }),
    new MarkdownAdapter({ source: 'local', contentDir: join(root, 'markdown') }),
  ],
};

4 Add content

Drop JSON files into content/[type]/[slug].json or Markdown files into markdown/ with YAML frontmatter. The directory name becomes the content type; the filename becomes the slug.

content/
  posts/
    my-post.json        → /posts/my-post
markdown/
  about.md              → /pages/about (if contentType: pages)

5 Run the dev server

npm run dev

Your site is live at http://localhost:4321. Content updates reload automatically.

6 Optionally: start the MCP server

In a second terminal:

npm run mcp

Connect it to Claude Desktop or any MCP client. AI tools can then list, search, create, and update content items via the invert_* tools. Write operations produce JSON files in content/ and hot-reload into the dev server.

7 Deploy

Run npm run build and deploy the dist/ directory to any static host. GitHub Pages and Cloudflare Pages are both supported out of the box — see the Getting Started doc for details.