Skip to content

MCP Server

The Alokai CMS MCP server lets AI assistants like Claude Code, Claude Desktop, and Cursor create pages, manage content models, publish entries, upload assets, and more — all through natural language.

Setup

The fastest path is to open Settings > MCP Integrations in your CMS. The “Alokai CMS MCP” card has a Connect from Claude Code / Cursor section with a ready-to-paste .mcp.json snippet — the org / space / environment IDs and the gateway secret are pre-filled. You just need to swap <your-api-key> for a content-management key minted under Settings > API Keys, then paste the snippet into .mcp.json (Claude Code) or .cursor/mcp.json (Cursor) and restart the client.

Option 1: Remote (hosted)

A hosted instance is available at https://alokai-cms-mcp.alokai-inc.workers.dev/mcp. Credentials are passed per-request via headers from your MCP client config — nothing is stored on the server. This is the shape you’ll get from the CMS UI:

{
"mcpServers": {
"alokai-cms": {
"type": "http",
"url": "https://alokai-cms-mcp.alokai-inc.workers.dev/mcp",
"headers": {
"X-Alokai-CMS-Api-Key": "your-api-key",
"X-Alokai-CMS-Org-Id": "your-org-id",
"X-Alokai-CMS-Space-Id": "your-space-id",
"X-Alokai-CMS-Environment-Id": "main",
"X-MCP-Gateway-Secret": "from-cms-settings-page"
}
}
}
}

The X-MCP-Gateway-Secret is a deployment-wide DoS gate; per-user authorization is still enforced by X-Alokai-CMS-Api-Key. The CMS Settings page surfaces the current secret to any logged-in user — don’t hand-copy it from anywhere else.

Option 2: Local (stdio)

For users running a local clone of alokai-cms (or who have @alokai/cms-mcp installed from the Alokai npm registry), the stdio transport reads credentials from env vars:

{
"mcpServers": {
"alokai-cms": {
"command": "node",
"args": ["/absolute/path/to/packages/cms-mcp/bin/index.mjs"],
"env": {
"ALOKAI_CMS_API_KEY": "your-api-key",
"ALOKAI_CMS_ORG_ID": "your-org-id",
"ALOKAI_CMS_SPACE_ID": "your-space-id",
"ALOKAI_CMS_ENVIRONMENT_ID": "main",
"ALOKAI_CMS_BASE_URL": "https://cms.alokai-apps.com"
}
}
}
}

For Cursor, use the same format in .cursor/mcp.json.

Configuration values

You’ll need these values from your CMS:

ValueWhere to find it
API KeySettings > API Keys (mint a content-management key, not delivery/preview)
Org IDThe UUID in the CMS URL after /org/ (or Settings > MCP Integrations)
Space IDThe UUID in the CMS URL after /space/ (or Settings > MCP Integrations)
Environment IDThe slug in the CMS URL after /env/ — usually main
Gateway SecretSettings > MCP Integrations (Show button on the snippet)

What you can do

Once configured, you can ask your AI assistant things like:

  • “List all pages in the CMS”
  • “Create a new page at /about with a Hero and a TextBlock component”
  • “Publish the homepage”
  • “Add a new content model called BlogPost with title, body, and image fields”
  • “Upload the logo from ./assets/logo.png”
  • “Show me version history for the homepage and restore version 3”
  • “Create a webhook that fires on publish”

Available tools

The MCP server exposes 70 tools covering the full CMS API:

CategoryTools
EntriesList, create, update, publish, unpublish, schedule, archive, delete, duplicate, version history, restore
Content ModelsList, create, update, duplicate, delete
ComponentsList, create, update, delete, publish, unpublish, batch publish, version history, restore
AssetsList, upload, update metadata, delete
SpacesList, create, update, delete, manage members
EnvironmentsList, create, clone, delete
LocalesList, create, update, delete, detection settings
WebhooksList, create, update, delete, test
Preview URLsList, create, update, delete
DeliveryGet page by path, get page by ID, get layout

Uploading assets

The upload_asset tool supports two modes:

  • Local file path (Node.js/stdio mode): pass file_path with an absolute path
  • Base64 content (remote/hosted mode): pass file_base64 + filename

Supported formats: jpg, png, gif, webp, svg, avif, ico, mp4, webm, pdf.