data
Payload CMS MCP, CLI, and Lua Integration for AI Agents
Payload CMS integration docs for AI agents: MCP gateway setup, Payload CMS CLI commands, Lua API reference, credentials, and function schemas.
7 functions 6 read 1 write API token auth
Payload CMS for agents
Credentials can be configured manually in web or CLI hosts.
Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.
Machine-Readable Metadata
- integration_slug
payload-cms- route_slug
payload-cms- package
payload-cms- auth_strategy
api_tokenAPI token- cli_setup_supported
true- cli_runtime_supported
true- mcp_gateway_supported
true- lua_supported
true- supports_multi_account
true
Quick Links
Lua APIAgent-facing namespace and function reference. Payload CMS CLIHeadless setup and direct function calls. Payload CMS MCPMCP gateway setup for external clients. Submit feedbackReport missing tools, auth problems, wrong docs, or runtime issues. ContributeAdd tools or improve metadata in the integrations repo.
Payload CMS MCP Client Matrix
Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Payload CMS.
Claude Code Payload CMS MCP setup for Claude Code. Cursor Payload CMS MCP setup for Cursor. Codex Payload CMS MCP setup for Codex. OpenAI Agents Payload CMS MCP setup for OpenAI Agents SDK. Claude Agent SDK Payload CMS MCP setup for Claude Agent SDK. Vercel AI SDK Payload CMS MCP setup for Vercel AI SDK. LangChain Payload CMS MCP setup for LangChain. LangGraph Payload CMS MCP setup for LangGraph. CrewAI Payload CMS MCP setup for CrewAI. MCP clients Payload CMS MCP setup for Generic MCP Clients.
Payload CMS CLI Matrix
Use these pages for direct Payload CMS CLI workflows in scripts, CI, cron, and agent wrappers.
CI Payload CMS CLI for CI. Cron Jobs Payload CMS CLI for cron jobs. Shell Scripts Payload CMS CLI for shell scripts. Headless Automation Payload CMS CLI for headless automation. Coding Agents Payload CMS CLI for coding agents.
Function Catalog
| Function | Type | Parameters | Description |
|---|---|---|---|
payload-cms.payload_cms_list_collections | Read read | 0 | List all collections defined in the Payload CMS instance. Returns each collection's slug, labels, and field configuration. |
payload-cms.payload_cms_get_collection | Read read | 1 | Get detailed information about a specific collection by its slug. Returns field definitions, labels, default sort, and other configuration. |
payload-cms.payload_cms_list_documents | Read read | 5 | 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. |
payload-cms.payload_cms_get_document | Read read | 2 | Get detailed information about a specific document by its ID within a collection. Returns all field values, timestamps, and metadata. |
payload-cms.payload_cms_create_document | Write write | 2 | 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). |
payload-cms.payload_cms_list_users | Read read | 2 | List users in the Payload CMS instance. Supports pagination with limit and page parameters. Returns user IDs, emails, names, and roles. |
payload-cms.payload_cms_get_current_user | Read read | 0 | Get the profile of the currently authenticated Payload CMS user. Returns email, name, roles, and account metadata. |