Labsco
MCP SERVER · OFFICIAL PROJECT

Contentrain MCP

by Contentrain

Content changes an agent proposes land as git commits on a dedicated branch, with schema, locales and serialization kept consistent.

CMS & Blog PublishingVerified
Summary
Every write is a git transaction on a throwaway worktree — your working tree is never touched.

A dedicated contentrain branch holds content state, each write forks a cr/ branch in a temporary worktree, and the result merges back with canonical JSON formatting. Nothing stashes or checks out under you while you work. The tool list is also capability-aware: a session driven by a remote provider with no local checkout only advertises the tools it can actually satisfy, rather than failing halfway through one.

What it is

The engine behind Contentrain's MCP integration. It manages a .contentrain/ directory in your project — models, content, locales — and every write goes through a git transaction rather than straight onto disk.

What you get
  • Project status, a model's full schema with sample data, and the file-format contract itself — contentrain_status, contentrain_describe, contentrain_describe_format
  • A project initialized from scratch or from a starter template — blog, landing, docs, ecommerce, saas, i18n, mobile — contentrain_init, contentrain_scaffold
  • Models created, updated and deleted, with content and meta files following — contentrain_model_save, contentrain_model_delete
  • Content entries saved, listed with filters and locales resolved, and deleted down to individual dictionary keys — contentrain_content_save, contentrain_content_list, contentrain_content_delete
  • Validation against the model schemas — required fields, type mismatches, broken relations, secret leaks, i18n parity — with structural problems auto-fixed on request — contentrain_validate
  • Source code scanned for hard-coded strings, then those strings extracted into content files or the source patched to reference them, with a dry run by default — contentrain_scan, contentrain_apply
  • Batch operations across entries, including locale-to-locale work — contentrain_bulk
  • Review flow in git: branches pushed for review, merged back into the contentrain branch locally, listed with their merge status, and deleted when abandoned — contentrain_submit, contentrain_merge, contentrain_branch_list, contentrain_branch_delete
  • A health report covering git, node, structure, model parsing, orphaned content, branch pressure and SDK freshness — contentrain_doctor
Requirements

Node.js 22 or newer and git on the machine; install @contentrain/mcp and run contentrain-mcp over stdio, with CONTENTRAIN_PROJECT_ROOT pointing at the project if it is not the working directory. It is local-first, with optional GitHub and GitLab backends and an HTTP transport for remote drivers such as Contentrain Studio. Optional parsers — @vue/compiler-sfc, @astrojs/compiler and svelte — sharpen source scanning for those frameworks; the scanner works without them.

Setup effort

One command — pnpm add @contentrain/mcp