Contentrain MCP
OfficialContentrain MCP is a content operations engine that lets AI agents extract, create, manage, and govern structured content from codebases through 15 tools, enforcing schemas, git workflows, and canonical serialization.
Project Setup
Initialize a
.contentrain/workspace withcontentrain_init(auto-detects stack, domains, locales)Scaffold full project templates (blog, landing, docs, ecommerce, saas, i18n, mobile) with
contentrain_scaffold
Model Management
Create/update content models (collection, singleton, document, dictionary) with
contentrain_model_save, supporting 27 field typesDelete models and associated content with
contentrain_model_delete
Content Operations
Save, list/filter, and delete content entries across all model types with
contentrain_content_save,contentrain_content_list, andcontentrain_content_deleteBatch operations (copy locale, update status, bulk delete) with
contentrain_bulk
Content Normalization
Scan source code for hardcoded strings with
contentrain_scan(modes: graph, candidates, summary)Apply normalize operations with
contentrain_apply— extract strings into content files or patch source files with i18n expressions (supports dry-run preview)
Validation & Inspection
Validate content against schemas with
contentrain_validate, detecting missing fields, type mismatches, broken relations, secret leaks, and i18n parity issues; with optional auto-fixGet full project status with
contentrain_status, model schemas withcontentrain_describe, and file format specs withcontentrain_describe_format
Git Workflow
All write operations auto-commit to git branches; push review branches for human PR approval with
contentrain_submitFramework-agnostic with canonical serialization for clean diffs and conflict-free parallel edits
Allows managing and consuming structured content within Astro web projects.
Provides a framework-agnostic way to manage and deliver content to Expo applications.
Supports content delivery and management for Flutter mobile and web apps.
Enforces a mandatory Git-based workflow for content versioning, branch-backed reviews, and auditability.
Enables Kotlin applications to consume governed content stored within the repository.
Utilizes Markdown for content storage and platform-independent delivery.
Supports consuming governed content within Node.js environments.
Facilitates structured content management and consumption for Nuxt applications.
Allows Python applications to directly consume governed content as plain JSON or Markdown.
Provides tools for managing and querying content within React-based applications.
Enables Rust applications to consume repository-native content.
Supports delivering governed content to Swift applications on any platform.
Generates a type-safe SDK for querying governed content within TypeScript projects.
Contentrain AI
Website · Docs · Discord · Twitter · LinkedIn
Extract, govern, and ship structured content from your codebase.
Contentrain helps teams turn hardcoded UI text, docs, and structured content into a governed, reviewable content layer. Agents can extract, create, translate, and update content, while Contentrain enforces schema, Git review, and portable file output.
Agent extracts or updates content → Contentrain standardizes → Human reviews → Any platform consumesTry it in 30 seconds
npx contentrain init # create .contentrain/ workspace
npx contentrain serve # open the local review UIThat's it. You now have a governed content workspace with models, validation, review branches, and a local UI — no account, no cloud, no proprietary content format.
Start here:
What Contentrain is for
Rescuing hardcoded strings from existing apps and turning them into structured, translatable content
Starting new projects with a real content layer instead of scattering copy across components
Serving the same content across web, docs, mobile, and backend systems from plain JSON and Markdown in Git
What it is not
Not an AI writing app
Not a database-first or dashboard-first CMS replacement for every team
Not a proprietary content runtime that locks your app to one platform
What it looks like
Before: Hardcoded strings scattered across your codebase — no structure, no translations, no review.
export default function Hero() {
return (
<section>
<h1>Welcome to our platform</h1>
<p>Start your free trial today</p>
<button>Get Started</button>
</section>
)
}After: Content lives in .contentrain/, typed and structured. Source files use i18n keys.
export default function Hero() {
const t = useTranslations()
return (
<section>
<h1>{t('hero.title')}</h1>
<p>{t('hero.subtitle')}</p>
<button>{t('hero.cta')}</button>
</section>
)
}// .contentrain/content/marketing/hero/en.json
{
"cta": "Get Started",
"subtitle": "Start your free trial today",
"title": "Welcome to our platform"
}The normalize flow extracts strings, creates models, and patches your source files — all through reviewable git branches.
This is the strongest entry point into the product:
take the content chaos already in your codebase and turn it into a governed, reviewable content layer.
How it works
┌─────────────┐ ┌──────────────────┐ ┌──────────────┐
│ AI Agent │────▶│ MCP (17 tools) │────▶│ .contentrain/│
│ (decides) │ │ (enforces) │ │ (stores) │
└─────────────┘ └──────────────────┘ └──────┬───────┘
│
┌──────────────────┐ │
│ Review UI / Git │◀─────────────┘
│ (human approves)│
└──────────────────┘Agent decides what content should exist and where it should come from
Contentrain enforces schemas, validation, canonical serialization, and git workflow
Human reviews through branches, PRs, or the local Serve UI
Output is plain JSON + Markdown that any language or framework can consume
4 content kinds
Kind | What it stores | Storage | Example |
Collection | Multiple typed entries | JSON object-map | Blog posts, products, team |
Singleton | Single entry per locale | JSON object | Hero section, site config |
Document | Markdown + frontmatter |
| Docs, articles, changelog |
Dictionary | Flat key-value strings | JSON flat map | i18n translations, UI labels |
27 field types (string, email, url, image, relation, array, object, markdown, ...) with built-in validation.
Use your content anywhere
Content is plain JSON and Markdown. Any language reads it directly.
For TypeScript projects, generate a typed SDK:
npx contentrain generateimport { query, singleton, dictionary, document } from '#contentrain'
const hero = singleton('hero').locale('en').get()
const posts = query('blog-post').locale('en').include('author').all()
const labels = dictionary('ui-labels').locale('tr').get('auth.login')
const article = document('docs').locale('en').bySlug('getting-started')Works with Nuxt, Next.js, Astro, SvelteKit, Vue, React, Node, Go, Python, Swift, Flutter, and 20+ stacks.
Why teams use it
Git-native — every write goes through worktree isolation + review branches
Normalize flow — scan codebase for hardcoded strings → extract → create i18n-ready content → patch source files
MCP engine — 17 tools over stdio or HTTP transport, works with Claude Code, Cursor, Windsurf, or any MCP client
Provider-agnostic engine — the same tool surface runs over a local worktree, GitHub, or GitLab (self-hosted included) with zero tool-code changes. HTTP transport available for remote drivers such as Studio.
Canonical serialization — sorted keys, deterministic output, clean git diffs, conflict-free parallel edits
Agent rules & skills — behavioral policies and step-by-step workflows ship as npm packages
Serve UI — local web dashboard for browsing models, content, validation, and normalize status
Framework-agnostic — MCP doesn't know your framework. Agent + skills handle stack-specific logic
Agent Skills
This repo ships 15 Agent Skills — reusable workflow procedures that any AI coding agent can load on demand.
Install all skills to your agent:
npx skills add Contentrain/ai/packages/skillsOr install a specific skill:
npx skills add Contentrain/ai/packages/skills --skill contentrain-normalizeSkills work with Claude Code, Cursor, Windsurf, GitHub Copilot, OpenAI Codex, Gemini CLI, and 40+ other agents.
See AGENTS.md for the full skill catalog and agent guidance.
Packages
Package | npm | Role |
17 MCP tools + stdio / HTTP transport + Local / GitHub / GitLab providers | ||
CLI + Serve UI + MCP stdio entrypoint | ||
Generated TypeScript query SDK | ||
Shared type definitions + constants | ||
Agent quality rules for IDE integration | ||
Workflow procedures + framework guides |
Starter Templates
Production-ready templates with Contentrain content models, generated SDK client, and framework-specific patterns:
Template | Framework | Use Case |
Astro | Blog / editorial | |
Astro | Landing page | |
Next.js | E-commerce storytelling | |
Next.js | Marketing + app + docs unified | |
Next.js | SaaS dashboard UI copy | |
Next.js | White-label / multi-tenant | |
Nuxt | Admin console / operations | |
Nuxt | SaaS marketing site | |
SvelteKit | Editorial / publication | |
VitePress | Documentation site |
Each template is a GitHub template repo — click "Use this template" to start.
Quick reference
npx contentrain init # initialize project
npx contentrain serve # local review UI (port 3333)
npx contentrain serve --stdio # MCP over stdio for IDE agents
npx contentrain validate # check content health
npx contentrain generate # generate typed SDK client
npx contentrain status # project overview
npx contentrain doctor # setup health check
npx contentrain studio login # authenticate with Studio
npx contentrain studio connect # connect repo to Studio projectDocumentation
2-Minute Demo — the fastest way to understand the product
Getting Started — install, connect an agent, and run the first workflow
Normalize Guide — the main hardcoded-string rescue flow
Ecosystem Map — package-to-product bridges across AI and Studio
Contentrain Studio — open-core team operations for Git-native structured content, self-hostable or available as a managed Pro/Enterprise offering
Full Docs — guides, package reference, and framework integration
Development
pnpm install && pnpm build && pnpm testSee RELEASING.md for the versioning and publish workflow.
Community
Discord — chat with the team and community
GitHub Discussions — questions and ideas
Twitter / X — product updates and announcements
LinkedIn — company news
YouTube — tutorials and demos
GitHub Issues — bug reports and feature requests
If Contentrain AI is useful to you, consider giving it a star — it helps others discover the project.
License
MIT
Maintenance
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Contentrain/ai'
If you have feedback or need assistance with the MCP directory API, please join our Discord server