Payload MCP Server

Payload CMS 3.0 MCP Server - A specialized Model Context Protocol server for Payload CMS

Local serverstdioTypeScript

What is the Payload MCP server?

Most developer tooling work still happens through a UI a human drives. Payload MCP server moves it into the conversation instead. Payload CMS 3.0 MCP Server - A specialized Model Context Protocol server for Payload CMS.

The short version

Getting it running

Installation goes through your MCP client rather than a global install: point it at payload-cms-mcp on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

The tools it exposes

The server publishes 7 tools. What each one is for:

  • validate — Validate code for collections, fields, globals, and config
  • query — Query validation rules and best practices
  • mcp_query — Execute SQL-like queries for Payload CMS structures
  • generate_template — Generates code templates for various Payload CMS components
  • generate_collection — The generate_collection tool exposed by this server
  • generate_field — The generate_field tool exposed by this server
  • scaffold_project — The scaffold_project tool exposed by this server

What it needs from you

Configuration is passed through the environment: YOUR_SERVICE_ID. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

How it compares

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Payload's toolset — validate, query, mcp_query and 4 more — is a fair guide to whether it matches your workflow. It is maintained by matmaxtech; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Payload's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Available tools

ToolWhat it does
validateValidate code for collections, fields, globals, and config
queryQuery validation rules and best practices
mcp_queryExecute SQL-like queries for Payload CMS structures
generate_templateGenerates code templates for various Payload CMS components.
generate_collectionThe generate_collection tool exposed by this server.
generate_fieldThe generate_field tool exposed by this server.
scaffold_projectThe scaffold_project tool exposed by this server.

How to install the Payload MCP server

{
  "mcpServers": {
    "payload-cms": {
      "command": "npx",
      "args": ["-y", "payload-cms-mcp"],
      "env": {
        "YOUR_SERVICE_ID": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
YOUR_SERVICE_IDConfiguration value read at startup.Optional

Example prompts to try

  • Use Payload to validate.
  • Use Payload to query.
  • Use Payload to mcp query.

Frequently asked questions

It connects Payload to MCP-compatible AI assistants such as Claude and Cursor, exposing 7 tools (validate, query, mcp_query, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Payload directly.