Contentrain MCP

Contentrain MCP

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

Category
Visit Server

README

Contentrain AI

npm: @contentrain/mcp npm: contentrain npm: @contentrain/query License: MIT

Your AI agent writes content. Contentrain makes sure it doesn't wreck your repo.

Contentrain gives AI agents a governed place to create models, content, translations, and docs — with typed schemas, git-backed review, and deterministic file output that any platform can consume.

Agent produces → System standardizes → Human approves → Any platform consumes

Try it in 30 seconds

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, and a local UI — no account, no cloud, no config files.

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.

How it works

┌─────────────┐     ┌──────────────────┐     ┌──────────────┐
│  AI Agent    │────▶│  MCP (13 tools)  │────▶│ .contentrain/│
│  (decides)   │     │  (enforces)      │     │ (stores)     │
└─────────────┘     └──────────────────┘     └──────┬───────┘
                                                     │
                    ┌──────────────────┐              │
                    │  Review UI / Git │◀─────────────┘
                    │  (human approves)│
                    └──────────────────┘
  • Agent decides what content should exist
  • MCP enforces schemas, validation, canonical serialization, and git workflow
  • Human reviews through branches, PRs, or the local Serve UI
  • Output is plain JSON + Markdown — consumed by any language or framework

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:

npx contentrain generate
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.

Key features

  • 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
  • Local-first MCP — 13 tools, stdio transport, works with Claude Code, Cursor, Windsurf, or any MCP client
  • 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

Packages

Package npm Role
@contentrain/mcp npm 13 MCP tools — content operations engine
contentrain npm CLI + Serve UI + MCP stdio entrypoint
@contentrain/query npm Generated TypeScript query SDK
@contentrain/types npm Shared type definitions + constants
@contentrain/rules npm Agent quality rules for IDE integration
@contentrain/skills npm Workflow procedures + framework guides

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

Documentation

ai.contentrain.io — full docs with guides, reference, and framework integration.

Development

pnpm install && pnpm build && pnpm test

See RELEASING.md for the versioning and publish workflow.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured