data
Payload CMS MCP Integration for OpenAI Agents SDK
Connect Payload CMS to OpenAI Agents SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.
Connect Payload CMS to OpenAI Agents SDK
Attach KosmoKrator integration tools to OpenAI Agents SDK workflows through a local MCP gateway.
Start the KosmoKrator MCP gateway locally and point the OpenAI Agents SDK MCP tool at that process or wrapper. The gateway is local, scoped to this integration, and starts with
--write=deny so OpenAI Agents can inspect read-capable tools without receiving write access by default.
Payload CMS MCP Config for OpenAI Agents SDK
Use headless JSON commands for CI-style execution and MCP for agent tool discovery.
{
"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 OpenAI Agents
OpenAI Agents 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. |