Skip to content

MCP

Kide includes a local stdio MCP server for AI-assisted, schema-aware content editing. Agents can inspect collections, manage drafts and translations, and update asset metadata without using the admin UI.

Terminal window
pnpm cms:mcp

Most clients start it for you. Configure them to run this command from the Kide project root.

Schema changes are picked up automatically

Section titled “Schema changes are picked up automatically”

The server watches cms.config.ts, the collections/ directory, and the generated API. When any of them change on disk, the next tool call reloads the project in a fresh worker process — no restart or reconnect needed. After editing the schema, run pnpm cms:generate && pnpm cms:push (or keep pnpm dev running, which does both) so the generated API and database match before using the new collection. If a reload fails — for example a type error in cms.config.ts — tool calls return the load error; fix the file and call again.

From the project root:

Terminal window
codex mcp add kide -- pnpm cms:mcp

For a project-scoped setup, create .codex/config.toml:

[mcp_servers.kide]
command = "pnpm"
args = ["cms:mcp"]
cwd = "/path/to/your-kide-project"
[mcp_servers.kide.env]
KIDE_MCP_USER_ROLE = "editor"
KIDE_MCP_USER_EMAIL = "editor@example.com"

The env table is optional — it runs the server as an editor-like actor instead of the defaults listed under Access rules actor.

From the project root:

Terminal window
claude mcp add --transport stdio kide -- pnpm cms:mcp

Open Claude Code and use /mcp to confirm that kide is connected.

{
"mcpServers": {
"kide": {
"command": "pnpm",
"args": ["cms:mcp"],
"cwd": "/path/to/your-kide-project"
}
}
}

pnpm cms:mcp runs kide mcp, a stdio server registered as kide-cms. Tools:

Tool Does
kide_list_collections List all collections and their high-level metadata
kide_describe_collection Fields, value shapes, and options for one collection
kide_list_documents List documents with filters, search, sort, locale, availability, and status
kide_count_documents Count documents with the same filters
kide_get_document One document by id, optionally overlaying a locale and selecting status
kide_create_document Create a document from declared schema fields (a draft in draft-enabled collections)
kide_update_document Update declared schema fields on a document
kide_publish_document Publish a draft-enabled document
kide_unpublish_document Unpublish a draft-enabled document
kide_schedule_document Schedule publish (and optionally unpublish) at ISO timestamps
kide_get_translations All stored translations for a document
kide_upsert_translation Create or update one locale’s translation (translatable fields only)
kide_list_assets Asset records, optionally scoped to a folder
kide_update_asset Safe asset metadata: alt text, filename, folder, focal point
kide_list_asset_folders Asset folders

Resource: kide://model returns the machine-readable content model — the same manifest pnpm cms:describe writes to .kide/model.json (see Migrations).

There are no delete tools.

Create and update tools accept only declared schema fields; system fields are ignored, and publishing is always explicit. Draft-enabled collections create drafts by default, so publish only after review.

Auth collections, such as users, are blocked for MCP mutations by default. Enable them only when you intentionally want agent access:

Terminal window
KIDE_MCP_ALLOW_AUTH_COLLECTIONS=true pnpm cms:mcp

MCP calls include an actor, so collection access rules still receive context.user. Defaults:

Variable Default
KIDE_MCP_USER_ID mcp-local
KIDE_MCP_USER_ROLE admin
KIDE_MCP_USER_EMAIL mcp@local

To run as an editor-like actor:

Terminal window
claude mcp add --transport stdio \
--env KIDE_MCP_USER_ROLE=editor \
--env KIDE_MCP_USER_EMAIL=editor@example.com \
kide -- pnpm cms:mcp

The server uses the same local database as your Kide app (data/cms.db on Node unless CMS_DATABASE_URL is set). For production edits, work against local or staging content, review drafts and previews, then apply only approved changes. Do not routinely replace a production database with an AI-edited copy.