What is the Payload CMS MCP server?
The Payload CMS MCP server is an MIT licensed Node.js server for Payload CMS 3.0 development. It offers tools to validate collection, field, global and config code, generate templates and collections, query best practice rules and scaffold whole projects. It does not manage documents in a running site.
This Model Context Protocol server is aimed at people building with Payload CMS 3.0. It checks Payload code against best practice rules and generates collections, fields, hooks, access control, endpoints, plugins, blocks and migrations.
Its job is development help. The README lists validation, template generation and scaffolding tools, and none that read or write documents in a running Payload site, so it is not a content editing connector.
What an agent can do with it
- Validate collection, field, global and config code and get feedback on syntax and practice.
- Query validation rules, for example for access control.
- Generate templates for ten component types, plus full collection and field definitions.
- Scaffold a project with MongoDB or Postgres, auth, collections, globals, blocks and plugins.
- Run SQL like queries against Payload structures.
Who it is for
Best for
- Developers starting a Payload 3.0 project who want a checked first draft of their schema.
- Teams reviewing collection and access code for common mistakes.
- Agencies who scaffold similar Payload builds repeatedly.
Not for
- Editors who want an agent to publish or update documents in a live Payload CMS.
- Setups that must avoid third party hosting, if you follow the Railway path.
Use it with UiChemy
Payload powers headless sites, so the front end is up to you. If you want a WordPress marketing site as well, UiChemy's AI to WordPress imports AI builds into editable pages. Click Get Started on uichemy.com.
Connect Payload CMS MCP Server: Validate and Scaffold Payload Code to your AI client
npm install -g payload-cms-mcp && payload-cms-mcpCheck the requirements
The README asks for Node.js 18 or newer, and an active Railway account and API token if you use the hosted route.
Install from npm
Run npm install -g payload-cms-mcp, then start it with payload-cms-mcp.
Or clone the repository
Clone it, run npm install, then npm run dev or npm run local. The local route needs no Railway token.
Connect your editor
For the hosted setup the README sets the client command to railway run with your service ID. Local clients need their own command or URL entry.
Try a first prompt
Ask for a template for a hook that logs document creation, or validate a collection you already wrote.
Endpoints and ports
payload-cms-mcpGlobal npm package named in the README.npm run devFrom a clone of the repository.railway run --service=YOUR_SERVICE_IDRailway based setup described in the README.What you can do with it
- Code validationChecks collections, fields, globals and config files and explains what to fix.
- Template generationTen template types, from access control to migrations.
- Collection builderOptions for auth, timestamps, hooks, access control and versioning.
- Project scaffoldingChoose MongoDB or Postgres, TypeScript and auth, then get a full folder layout.
- Rule queriesAsk for best practices by file type, such as access control.
- Local or hostedRun it on your machine, or deploy it on Railway.
Tools it exposes
validate
Checks collection, field, global or config code for syntax and practice.
query
Looks up validation rules and best practices, optionally by file type.
mcp_query
Runs SQL like queries against Payload structures.
generate_template
Creates templates for collection, field, global, config, access control, hook, endpoint, plugin, block or migration.
generate_collection
Builds a collection with slug, fields, auth, timestamps, hooks, access and versions.
generate_field
Builds a field with type, required, unique, localized and validation options.
scaffold_project
Creates a project structure with database, auth, collections, globals, blocks and plugins.
validate_scaffold_options
Checks scaffold options against best practices, used internally.
Frequently asked questions
What is the Payload CMS MCP server?
It is an open source Model Context Protocol server for Payload CMS 3.0 development. It validates Payload code, generates templates, collections and fields, answers best practice queries and scaffolds projects. It is released under the MIT licence.
Can it edit content in a live Payload site?
Not according to the README. Its eight tools cover validation, queries, generation and scaffolding. None are described as reading or writing documents in a running Payload instance, so it suits development rather than content editing.
How do I install the Payload CMS MCP server?
Run npm install -g payload-cms-mcp and then payload-cms-mcp, or clone the repository, run npm install and start it with npm run dev. Node.js 18 or newer is required. The Railway route needs an account and API token as well.
Do I need Railway?
No. The README presents Railway as the recommended hosted deployment, but it also describes local runs through npm or a clone that need no Railway token. Choose local if you would rather not use a third party host.
Which databases can the scaffold tool target?
The scaffold_project tool takes a database option with mongodb or postgres, and it can include authentication, collections, globals, blocks, plugins and TypeScript. The README's examples use both, so check the output before running it.
How current is the project?
The repository was last pushed in March 2025 and the README targets Payload 3.0. Compare the generated code with the current Payload documentation, and check open issues, before you copy templates into a new project.
Does the Payload MCP server work with any AI client?
The README gives setup steps for Cursor only, using a command entry. It does not list other clients, so test it in yours before you plan around it, since any MCP client that can run a command might connect.
What should I compare it with?
For a wider set of CMS tools see WP MCP Ultimate for WordPress, or Lara Dashboard MCP for a Laravel CMS. For UI component code, the shadcn MCP server is a common pairing.


