data
Payload CMS MCP Integration for Claude Code
Connect Payload CMS to Claude Code through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.
Connect Payload CMS to Claude Code
Connect local KosmoKrator integrations to Claude Code through one scoped MCP gateway entry.
Add KosmoKrator as a stdio MCP server in the Claude Code project config and select the integrations that should be visible. The gateway is local, scoped to this integration, and starts with
--write=deny so Claude Code can inspect read-capable tools without receiving write access by default.
Payload CMS MCP Config for Claude Code
Claude Code can launch the local kosmo binary directly from the project MCP config.
{
"mcpServers": {
"kosmokrator-payload-cms": {
"type": "stdio",
"command": "kosmo",
"args": [
"mcp:serve",
"--integration=payload-cms",
"--write=deny"
]
}
}
} Run the Gateway Manually
kosmokrator mcp:serve --integration=payload-cms --write=deny Why Use KosmoKrator Here
Expose only Payload CMS instead of a broad multi-service tool list.
Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.
Start read-only, then opt into ask or allow for trusted workspaces.
Payload CMS Tools Visible to Claude Code
Claude Code sees stable MCP tool names generated from the Payload CMS integration catalog.
| MCP tool | Source function | Type | Description |
|---|---|---|---|
integration__payload_cms__payload_cms_list_collections | payload-cms.payload_cms_list_collections | Read | List all collections defined in the Payload CMS instance. Returns each collection's slug, labels, and field configuration. |
integration__payload_cms__payload_cms_get_collection | payload-cms.payload_cms_get_collection | Read | Get detailed information about a specific collection by its slug. Returns field definitions, labels, default sort, and other configuration. |
integration__payload_cms__payload_cms_list_documents | payload-cms.payload_cms_list_documents | Read | List documents in a Payload CMS collection. Supports pagination (limit, page), sorting, and filtering via the where parameter. Returns document IDs, timestamps, and field values. |
integration__payload_cms__payload_cms_get_document | payload-cms.payload_cms_get_document | Read | Get detailed information about a specific document by its ID within a collection. Returns all field values, timestamps, and metadata. |
integration__payload_cms__payload_cms_create_document | payload-cms.payload_cms_create_document | Write | Create a new document in a Payload CMS collection. Provide the collection slug and a JSON object of field values. The document is created as a draft by default (if versions are enabled on the collection). |
integration__payload_cms__payload_cms_list_users | payload-cms.payload_cms_list_users | Read | List users in the Payload CMS instance. Supports pagination with limit and page parameters. Returns user IDs, emails, names, and roles. |
integration__payload_cms__payload_cms_get_current_user | payload-cms.payload_cms_get_current_user | Read | Get the profile of the currently authenticated Payload CMS user. Returns email, name, roles, and account metadata. |