# Contentrain AI Documentation > Contentrain AI is the MIT-licensed open-source toolkit for Contentrain, the content governance ecosystem for teams and AI agents: a 27-tool MCP server (@contentrain/mcp), a CLI (contentrain), shared TypeScript types (@contentrain/types), agent rules and skills (@contentrain/rules, @contentrain/skills), a generated typed query SDK (@contentrain/query), and the open ends of the WordPress migration pipeline (@contentrain/wp-import, @contentrain/emitter-astro, @contentrain/verify). Content lives as canonical JSON/Markdown in your Git repo under .contentrain/ — agents write through deterministic MCP tools, humans review through git branches. - [Full documentation as a single file (for LLMs)](https://ai.contentrain.io/llms-full.txt) - [Contentrain Studio (team web surface) documentation](https://docs.contentrain.io/llms.txt) ## Contentrain Products - [Website](https://contentrain.io) - [Studio](https://studio.contentrain.io) - [Migrate, WordPress to Astro migration](https://migrate.contentrain.io) - [Bridge, free WordPress plugin on WordPress.org](https://wordpress.org/plugins/contentrain-bridge/) - [Studio docs](https://docs.contentrain.io/llms.txt) - [GitHub organization](https://github.com/Contentrain) ## Packages (npm) - [@contentrain/mcp](https://ai.contentrain.io/packages/mcp): MCP server: 27 deterministic tools (22 core + 5 media), stdio + HTTP transports, Local / GitHub / GitLab providers - [contentrain](https://ai.contentrain.io/packages/cli): CLI: init, import, serve (review UI + MCP transports), validate, generate, diff, merge, reconcile, prune, studio commands - [@contentrain/query](https://ai.contentrain.io/packages/sdk): universal query SDK; `contentrain generate` emits a typed client into .contentrain/client/ (#contentrain imports); optional CDN transport plus public forms/comments clients - [@contentrain/types](https://ai.contentrain.io/packages/types): shared contract: model/field/config/provider types, the migration contracts (RawIR, ProjectIR, CapabilityManifest, MigrationHandoff), plus pure, browser-safe validate/serialize functions - [@contentrain/rules](https://ai.contentrain.io/packages/rules): always-loaded agent guardrails plus shared quality rules - [@contentrain/skills](https://ai.contentrain.io/packages/skills): 16 on-demand Agent Skills (Agent Skills standard) and 9 framework guides - [@contentrain/wp-import](https://ai.contentrain.io/packages/wp-import): WordPress WXR/REST importers → RawIR → .contentrain content store - [@contentrain/emitter-astro](https://ai.contentrain.io/packages/emitter-astro): ProjectIR → a complete Astro project, returned as a pure file map - [@contentrain/verify](https://ai.contentrain.io/packages/verify): offline SEO/indexing/link/asset gates for a built site; takes documents, never makes a network request - [@contentrain/astro-kit](https://ai.contentrain.io/packages/astro-kit): copy-in Astro components for Contentrain sites, with a machine-readable catalog - [@contentrain/decide](https://ai.contentrain.io/packages/decide): small typed decisions (a choice or a score): rule first, then a model, cached, budgeted and audited ## Claude Code plugin - contentrain (marketplace Contentrain/ai, not npm) — the MCP server, 7 core skills and 9 framework guides in one install: /plugin marketplace add Contentrain/ai ## Key Facts - 4 model kinds: collection (object-map by entry id), singleton, dictionary (flat string map), document (markdown + frontmatter) - Every model declares title_field: the field shown as an entry's title. Must be a string/text/slug/email/url/code/markdown/richtext field on that model; dictionaries use the reserved "key". Required — `contentrain validate --fix` backfills it in older projects - 27 field types; content is validated before every write — an error on any entry in a contentrain_content_save call means nothing is committed - The MCP tool registry holds 27 tools, but `tools/list` is filtered per session: a tool whose requirements (local project root, provider capabilities, a media stack) cannot be met is never registered. A local stdio server lists the 22 core tools; media tools appear only on media-capable providers such as Studio MCP Cloud - Every write lands on an isolated cr/* git branch; workflow is auto-merge or review (config.json) - dry_run previews: contentrain_apply and contentrain_reconcile default to dry_run: true, contentrain_bulk takes an optional dry_run; destructive tools (content/model/media/vocabulary delete, merge, branch delete, bulk delete_entries) require confirm: true - Locale strategies: file / suffix / directory / none; entry status and scheduling live in .contentrain/meta/, not in content - When a change lands on the base branch directly, the branches diverge: writes still succeed but report base_advance "blocked_diverged". contentrain_reconcile / `contentrain reconcile` is a content-aware three-way merge (field, dictionary key, term+locale granularity) with a closed 9-value conflict code set - WordPress migration chain: wp-import → RawIR → [migration engine, CLOSED SOURCE] → ProjectIR → emitter-astro → verify. The MIT packages are the two ends and the contracts; the analysis that produces a ProjectIR is not in this repository and these packages do not convert a site on their own - MIT licensed, local-first (no cloud dependency); GitHub/GitLab remote providers are optional peer dependencies ## Key Pages - [Getting Started](https://ai.contentrain.io/getting-started) - [2-Minute Demo](https://ai.contentrain.io/demo) - [Ecosystem Map](https://ai.contentrain.io/ecosystem) - [Core Concepts](https://ai.contentrain.io/concepts) - [Contentrain Studio](https://ai.contentrain.io/studio) - [FAQ](https://ai.contentrain.io/faq) - [MCP Tools](https://ai.contentrain.io/packages/mcp) - [CLI](https://ai.contentrain.io/packages/cli) - [Query SDK](https://ai.contentrain.io/packages/sdk) - [Rules](https://ai.contentrain.io/packages/rules) - [Skills](https://ai.contentrain.io/packages/skills) - [Types](https://ai.contentrain.io/packages/types) - [WordPress Import](https://ai.contentrain.io/packages/wp-import) - [Astro Emitter](https://ai.contentrain.io/packages/emitter-astro) - [Verify](https://ai.contentrain.io/packages/verify) - [Astro Kit](https://ai.contentrain.io/packages/astro-kit) - [Decide](https://ai.contentrain.io/packages/decide) - [Claude Code Plugin](https://ai.contentrain.io/packages/plugin) - [Your First Model (guided walkthrough)](https://ai.contentrain.io/guides/first-model) - [Providers & Transports](https://ai.contentrain.io/guides/providers) - [HTTP Transport](https://ai.contentrain.io/guides/http-transport) - [Embedding MCP](https://ai.contentrain.io/guides/embedding-mcp) - [Normalize Flow](https://ai.contentrain.io/guides/normalize) - [Framework Integration](https://ai.contentrain.io/guides/frameworks) - [i18n Workflow](https://ai.contentrain.io/guides/i18n) - [Serve UI](https://ai.contentrain.io/guides/serve-ui) - [WordPress Migration](https://ai.contentrain.io/guides/migration) - [Forms & Comments](https://ai.contentrain.io/guides/forms-comments) - [Model Kinds](https://ai.contentrain.io/reference/model-kinds) - [Field Types](https://ai.contentrain.io/reference/field-types) - [Configuration](https://ai.contentrain.io/reference/config) - [RepoProvider Reference](https://ai.contentrain.io/reference/providers) - [Reconcile & Divergence](https://ai.contentrain.io/reference/reconcile)