Payload MCP MCP Server

MCP server for Payload CMS 3.0, designed to help developers validate code, generate templates, and scaffold projects following best practices.

Local serverstdioTypeScript

What is the Payload MCP MCP server?

Most developer tooling work still happens through a UI a human drives. Payload MCP MCP server moves it into the conversation instead. MCP server for Payload CMS 3.0, designed to help developers validate code, generate templates, and scaffold projects following best practices.

The short version

A powerful Model Context Protocol (MCP) server for Payload CMS that enables AI assistants to help you develop, manage, and extend your Payload CMS projects.

Payload MCP (Model Context Protocol) is a specialized server that connects AI assistants to your Payload CMS development workflow. It provides a set of tools for generating code, validating components, scaffolding projects, and performing specialized queries - all accessible to AI agents through the standardized Model Context Protocol.

  • Code Generation — Create collections, fields, config files, access control rules, hooks, endpoints, plugins, blocks, migrations, and components with the right structure and best practices
  • Validation — Validate your Payload CMS components to ensure they follow best practices and will work correctly
  • Scaffolding — Set up new Payload CMS projects with the right file structure and dependencies
  • Specialized Queries — Get recommendations and insights for your Payload CMS codebase
  • MCP Compliant — Works with any AI assistant that supports the Model Context Protocol
  • Local-first — Run entirely on your local machine for privacy and security

The tools it exposes

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

  • collection — Generate a Payload collection with fields, hooks, and access control
  • field — Generate a field configuration for collections
  • config — Generate a Payload configuration file
  • access-control — Generate access control functions
  • hook — Generate before/after hooks for collections
  • endpoint — Generate custom API endpoints
  • plugin — Generate a Payload plugin
  • block — Generate a block for the Payload block field type
  • migration — Generate a database migration
  • component — Generate a React component for the admin panel
  • validate_query — Validate and format Payload queries
  • get_query_suggestions — Get suggestions for Payload queries based on your collections

What it needs from you

  • Node.js (v16 or higher) - npm or Bun (recommended)

Getting it running

@ngyngcphu/payload-mcp on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

How it compares

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Payload MCP's toolset — collection, field, config and 11 more — is a fair guide to whether it matches your workflow. It is maintained by ngyngcphu; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

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.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Payload MCP.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
collectionGenerate a Payload collection with fields, hooks, and access control
fieldGenerate a field configuration for collections
configGenerate a Payload configuration file
access-controlGenerate access control functions
hookGenerate before/after hooks for collections
endpointGenerate custom API endpoints
pluginGenerate a Payload plugin
blockGenerate a block for the Payload block field type
migrationGenerate a database migration
componentGenerate a React component for the admin panel
validate_queryValidate and format Payload queries
get_query_suggestionsGet suggestions for Payload queries based on your collections
format_responseFormat the response from a Payload query
create_projectCreate a new Payload CMS project with recommended structure

How to install the Payload MCP MCP server

{
  "mcpServers": {
    "payload": {
      "command": "npx",
      "args": ["-y", "@ngyngcphu/payload-mcp"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Node.js (v16 or higher) - npm or Bun (recommended)

Example prompts to try

  • Use Payload MCP to collection.
  • Use Payload MCP to field.
  • Use Payload MCP to config.

Frequently asked questions

Node.js v16 or higher and npm (Bun recommended). The server runs locally and communicates over HTTP.