# Contentrain/ai [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/Contentrain/ai  
**GitHub Stars:** 7  
**npm Downloads (last month):** 4480  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/contentrain-ai

## Description
Local-first MCP server for AI content governance — 13 tools for model/content CRUD, validation, normalization, and i18n across any framework.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "ai": {
    "command": "npx",
    "args": ["-y","contentrain"]
  }
}
```

## Documentation

## What Contentrain/ai does

Contentrain/ai provides an MCP-based content governance layer for teams and coding agents. It turns content in a codebase into structured records that live under `.contentrain/`, using JSON for collections, singletons, and dictionaries and Markdown with frontmatter for documents. The resulting files can be consumed by any language or framework without a proprietary runtime.

The repository includes the MCP engine, CLI, query SDK, shared types, agent rules, workflow skills, and a local Serve UI. The system is designed for content that needs schemas, validation, localization, deterministic serialization, and a review trail in Git rather than an account-based cloud service.

## How it works

An agent uses the MCP tools to inspect, create, update, normalize, or validate content. Contentrain applies model definitions, field rules, canonical serialization, and the selected provider's Git workflow. Humans review the resulting changes through worktree isolation, branches, pull requests, or the local Serve UI.

Four content kinds are supported:

- Collections store multiple typed entries in JSON object maps.
- Singletons store one localized entry, such as a hero section or site configuration.
- Documents store Markdown and frontmatter files.
- Dictionaries store flat key-value maps for translations and interface labels.

The schema system includes field types such as strings, email addresses, URLs, images, relations, arrays, objects, and Markdown. The normalize flow can scan a codebase for hardcoded strings, extract them into content, create i18n-ready structures, and patch source files. GitHub, GitLab, and local worktree providers share the same MCP tool surface.

## Setup and configuration

Initialize a workspace with the CLI:

```bash
npx contentrain init
npx contentrain serve
```

`init` creates the `.contentrain/` workspace, while `serve` opens the local review UI. The repository describes the open-source tools as requiring no account. For TypeScript projects, generate a typed query SDK with:

```bash
npx contentrain generate
```

The MCP package supports stdio and HTTP transport. Agent workflow procedures can be installed with the skills package, either as a complete set or individually:

```bash
npx skills add Contentrain/ai/packages/skills
npx skills add Contentrain/ai/packages/skills --skill contentrain-normalize
```

## Tools and capabilities

- Exposes 22 MCP tools through stdio or HTTP transport.
- Creates and updates models and content records.
- Validates content against schemas and built-in field rules.
- Normalizes hardcoded strings into structured, translatable content.
- Supports localization through dictionaries and locale-specific content.
- Produces deterministic serialized files for cleaner Git diffs.
- Generates a typed TypeScript query SDK for content access.
- Provides a local UI for browsing models, content, validation, and normalization status.
- Includes 16 reusable agent skills and framework-oriented workflow guidance.
- Supports optional media tools with a media-capable provider such as Studio.

## Limitations and notes

Contentrain/ai is a content governance and storage workflow, not an AI writing application or a general-purpose CMS replacement. Its framework-agnostic MCP layer does not implement framework-specific application changes by itself; agent skills handle stack-specific workflows. Content is stored as portable JSON and Markdown, while review remains part of the Git-based process. The documented framework examples include Nuxt, Next.js, Astro, SvelteKit, Vue, React, Node, Go, Python, and Flutter.

_Full upstream README: https://allmcps.com/mcp/contentrain-ai/readme_

