Payload
PayloadThird party
Let an agent read and write the collections of your Payload app.
What it does
Payload’s MCP plugin (@payloadcms/plugin-mcp) adds an MCP server to your own Payload app. An assistant can then find, create, update and delete documents in the collections and globals you switch on for it; Payload’s access rules, hooks and multi-tenant limits still apply.
It runs inside your app, at /api/mcp (the path in Payload’s examples) of its host, so replace the placeholder host with yours. Every request needs an API key as a bearer token: create one in the admin panel under MCP, API Keys, and tick what it may do. The variable name below is our suggestion; Payload does not name one. Payload’s page also shows the mcp-remote bridge for clients that cannot send a header.
- Find, create, update and delete documents in the collections you allow
- Work with globals
- Limit each API key to chosen collections and actions
The facts
- Address (your own server)
https://YOUR-PAYLOAD-HOST/api/mcpReplace YOUR-PAYLOAD-HOST with the address of your own Payload instance.- Kind
- Remote: a server on the internet
- Transport
- Streamable HTTP
- Sign-in
- API key in
PAYLOAD_MCP_API_KEY - Account
- No account: it runs on your own server
How to connect
Connect from Claude Code
Set PAYLOAD_MCP_API_KEY in the environment you start Claude Code from, then run this in a terminal. Keep the single quotes: Claude Code reads the variable, your key is never written down. Replace YOUR-PAYLOAD-HOST with the address of your own server first.
claude mcp add --transport http payload 'https://YOUR-PAYLOAD-HOST/api/mcp' --header 'Authorization: Bearer ${PAYLOAD_MCP_API_KEY}'Connect from Claude.ai
Claude.ai connects from Anthropic’s cloud, so it needs a public address. Follow these steps in the app.
- Open Customize > Connectors, click "+ Add", then "Add custom connector".
- Name: payload
- Remote MCP server URL: https://YOUR-PAYLOAD-HOST/api/mcp
- Replace YOUR-PAYLOAD-HOST with the address of your own payload server. It must be reachable from the internet.
- Click "Continue".
- Under Authentication choose "No sign in".
- Under Request headers add the header Authorization with the value Bearer <the value of PAYLOAD_MCP_API_KEY>.
- Request headers are a beta that only some organizations have. If you do not see that section, your organization does not have it yet: use Claude Code, Cursor or Codex below.
- Click "Add", then "Connect" if it asks.
- On a Team or Enterprise plan an Owner adds the connector under Organization settings > Connectors, and each member then clicks Connect.
Connect from Cursor
Set PAYLOAD_MCP_API_KEY in the environment you start Cursor from, then add this to ~/.cursor/mcp.json for every project, or to .cursor/mcp.json for one. Replace YOUR-PAYLOAD-HOST with the address of your own server first.
{
"mcpServers": {
"payload": {
"url": "https://YOUR-PAYLOAD-HOST/api/mcp",
"headers": {
"Authorization": "Bearer ${env:PAYLOAD_MCP_API_KEY}"
}
}
}
}Connect from Codex
Set PAYLOAD_MCP_API_KEY in the environment you start Codex from, then add this to ~/.codex/config.toml, or to .codex/config.toml in a trusted project. Replace YOUR-PAYLOAD-HOST with the address of your own server first.
[mcp_servers.payload]
url = "https://YOUR-PAYLOAD-HOST/api/mcp"
bearer_token_env_var = "PAYLOAD_MCP_API_KEY"Payload docsChecked on
Plugins that go with it
PayloadCMS dev plugin for Agents Store. Covers collections, fields, globals, hooks, access control, authentication, queries, data…
v1.5.1