Skip to content
MCP server

Contentrain

Git-backed content governance for AI agents, with 23 deterministic MCP tools

Install
Pricing
Open source
Platforms
CLI, self-hosted, API
Runs
Locally or Remotely
Version
3.12.3
Listing updated
3 days ago

About Contentrain

Contentrain is an open-source MCP server for developer tools. It can run locally on your machine or as a hosted remote server.

Contentrain's engine sits between an agent and a project's files. The agent decides what to write and where, and the server carries out the writes deterministically: validating against schemas, serialising canonically and committing through git, so humans review and merge the result. The stated reason is that agents are non-deterministic, and the same prompt can produce different file formats or broken git state.

It manages a .contentrain/ directory and covers project setup, model creation and deletion, content save, delete and list, validation with auto-fix, normalize scan and apply flows, bulk operations, branch submission and review-mode merge, and a doctor health check. Each write happens in a temporary worktree on a feature branch forked from a dedicated contentrain branch, then merges back, and a local mode can avoid any pushes. Tool annotations mark reads, writes and destructive operations, and tool listings are filtered by what a session can serve.

There are two ways to run it: as a local stdio server (contentrain-mcp, or contentrain serve --stdio) against a checkout, or through Contentrain Studio's hosted MCP Cloud, which uses a project-scoped API key and adds five media tools. It needs Node.js 22 or newer and git, and optional Vue, Astro and Svelte parsers improve source scanning.

Install

Run in a terminal

claude mcp add --transport http contentrain https://studio.contentrain.io/api/mcp/remote

Add to Settings → Connectors → Add custom connector

https://studio.contentrain.io/api/mcp/remote
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "contentrain": {
      "url": "https://studio.contentrain.io/api/mcp/remote"
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "contentrain": {
      "type": "http",
      "url": "https://studio.contentrain.io/api/mcp/remote"
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "contentrain": {
      "serverUrl": "https://studio.contentrain.io/api/mcp/remote"
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "contentrain": {
      "type": "http",
      "url": "https://studio.contentrain.io/api/mcp/remote"
    }
  }
}

Tools this server provides (2)

Taken from the project documentation; the running server may differ.

contentrain_status
Project status.
contentrain_media_ingest
Fetches a caller-supplied URL server-side into media storage.

What it does

Deterministic writes
Applies content changes with validation and canonical serialisation instead of free-form file edits.
Git transaction flow
Writes on feature branches from a dedicated contentrain branch, with auto-merge or review mode.
Schema and locale consistency
Keeps models, locales and serialisation consistent across content.
Normalize scan
Scans source code, with optional Vue, Astro and Svelte parsers, to extract content.
Local or hosted
Runs on stdio against a checkout or through Studio's project-scoped remote endpoint.
Annotated tools
Marks read-only, destructive and idempotent tools so clients can tell them apart.

Good for

  • Let an agent edit site copy without direct file access
  • Review AI-written content changes as git branches
  • Keep translations consistent across locales
  • Extract hard-coded strings from components into content models
  • Run a content health check on a project

Pricing

Open source

npm package is free; hosted Studio MCP Cloud pricing not published here

Prices change. Check ai.contentrain.io before you buy.

Contentrain FAQ

What does it require?

Node.js 22 or newer and git on the machine.

How is it different from letting the agent write files?

Writes go through validation, canonical serialisation and a git transaction, so output stays consistent.

Can it avoid pushing to a remote?

Yes. Local mode, set with git.push false or CONTENTRAIN_NO_PUSH=1, never pushes or deletes on the remote.

Is there a hosted option?

Yes. Contentrain Studio's MCP Cloud provides a project-scoped endpoint using an API key.

How many tools does it expose?

23 core tools, plus 5 media tools on media-capable providers such as Studio.

Is Contentrain free?

Yes. Contentrain is open source, so you can use and self-host it for free.

How do I add Contentrain to Claude Code?

Run this command in your terminal: claude mcp add --transport http contentrain https://studio.contentrain.io/api/mcp/remote

What are the best alternatives to Contentrain?

The closest alternatives to Contentrain are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to Contentrain

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools