Repo-native content governance for AI agents. Extract, review, and deliver UI text, docs, and structured content from Git.
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
claude mcp add ai -- npx -y contentrain{
"mcpServers": {
"ai": {
"command": "npx",
"args": ["-y", "contentrain"]
}
}
}Resumen de MCP Servers
# Contentrain AI
[](https://www.npmjs.com/package/@contentrain/mcp)
[](https://www.npmjs.com/package/contentrain)
[](https://www.npmjs.com/package/@contentrain/query)
[](https://agentskills.io)
[](https://ai.contentrain.io)
[](LICENSE)
[Website](https://contentrain.io) · [Docs](https://ai.contentrain.io) · [Discord](https://discord.gg/8XbFKfgeZx) · [Twitter](https://x.com/Contentrain_io) · [LinkedIn](https://www.linkedin.com/company/contentrain)
**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 consumes
```
## Try it in 30 seconds
```bash
npx contentrain init # create .contentrain/ workspace
npx contentrain serve # open the local review UI
```
That'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:
- [See the 2-minute demo](https://ai.contentrain.io/demo)
- [Open the normalize guide](https://ai.contentrain.io/guides/normalize)
- [Read the docs](https://ai.contentrain.io)
## 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.
```tsx
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.
```tsx
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>
)
}
```
```json
// .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 (24 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 | `.md` files | 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:
```bash
npx contentrain generate
```
```ts
import { 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** — 24 tools (19 core + 5 media) 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](https://agentskills.io) — reusable workflow procedures that any AI coding agent can load on demand.
Install all skills to your agent:
```bash
npx skills add Contentrain/ai/packages/skills
```
Or install a specific skill:
```bash
npx skills add Contentrain/ai/packages/skills --skill contentrain-normalize
```
Skills work with Claude Code, Cursor, Windsurf, GitHub Copilot, OpenAI Codex, Gemini CLI, and 40+ other agents.
See [`AGENTS.md`](AGENTS.md) for the full skill catalog and agent guidance.
## Packages
| Package | npm | Role |
|---|---|---|
| [`@contentrain/mcp`](packages/mcp) | [](https://www.npmjs.com/package/@contentrain/mcp) | 24 MCP tools + stdio / HTTP transport + Local / GitHub / GitLab providers |
| [`contentrain`](packages/cli) | [](https://www.npmjs.com/package/contentrain) | CLI + Serve UI + MCP stdio entrypoint |
| [`@contentrain/query`](packages/sdk/js) | [](https://www.npmjs.com/package/@contentrain/query) | Generated TypeScript query SDK |
| [`@contentrain/types`](packages/types) | [](https://www.npmjs.com/package/@contentrain/types) | Shared type definitions + constants |
| [`@contentrain/rules`](packages/rules) | [](https://www.npmjs.com/package/@contentrain/rules) | Agent quality rules for IDE integration |
| [`@contentrain/skills`](packages/skills) | [](https://www.npmjs.com/package/@contentrain/skills) | 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](https://github.com/Contentrain/contentrain-starter-astro-blog) | Astro | Blog / editorial |
| [astro-landing](https://github.com/Contentrain/contentrain-starter-astro-landing) | Astro | Landing page |
| [next-commerce](https://github.com/Contentrain/contentrain-starter-next-commerce) | Next.js | E-commerce storytelling |
| [next-multi-surface-saas](https://github.com/Contentrain/contentrain-starter-next-multi-surface-saas) | Next.js | Marketing + app + docs unified |
| [next-saas-dashboard](https://github.com/Contentrain/contentrain-starter-next-saas-dashboard) | Next.js | SaaS dashboard UI copy |
| [next-white-label-portal](https://github.com/Contentrain/contentrain-starter-next-white-label-portal) | Next.js | White-label / multi-tenant |
| [nuxt-admin-console](https://github.com/Contentrain/contentrain-starter-nuxt-admin-console) | Nuxt | Admin console / operations |
| [nuxt-saas](https://github.com/Contentrain/contentrain-starter-nuxt-saas) | Nuxt | SaaS marketing site |
| [sveltekit-editorial](https://github.com/Contentrain/contentrain-starter-sveltekit-editorial) | SvelteKit | Editorial / publication |
| [vitepress-docs](https://github.com/Contentrain/contentrain-starter-vitepress-docs) | VitePress | Documentation site |
Each template is a GitHub template repo — click "Use this template" to start.
## Quick reference
```bash
npx contentrain init # initialize project
npx contentrain serve # local review UI (pLo que la gente pregunta sobre ai
¿Qué es Contentrain/ai?
+
Contentrain/ai es mcp servers para el ecosistema de Claude AI. Repo-native content governance for AI agents. Extract, review, and deliver UI text, docs, and structured content from Git. Tiene 4 estrellas en GitHub y se actualizó por última vez today.
¿Cómo se instala ai?
+
Puedes instalar ai clonando el repositorio (https://github.com/Contentrain/ai) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar Contentrain/ai?
+
Nuestro agente de seguridad ha analizado Contentrain/ai y le ha asignado un Trust Score de 87/100 (tier: Trusted). Revisa el desglose completo de comprobaciones superadas y flags en esta página.
¿Quién mantiene Contentrain/ai?
+
Contentrain/ai es mantenido por Contentrain. La última actividad registrada en GitHub es de today, con 1 issues abiertos.
¿Hay alternativas a ai?
+
Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.
Despliega ai en tu cloud
Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.
¿Mantienes este repo? Añade un badge a tu README
Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.
[](https://claudewave.com/repo/contentrain-ai)<a href="https://claudewave.com/repo/contentrain-ai"><img src="https://claudewave.com/api/badge/contentrain-ai" alt="Featured on ClaudeWave: Contentrain/ai" width="320" height="64" /></a>Más MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
The fastest path to AI-powered full stack observability, even for lean teams.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!