Skip to content

Summary

Payload's official MCP plugin — exposes every collection and global of a Payload CMS instance as MCP tools at /api/mcp, gated by Payload access control.

Features

  • Streamable HTTP transport at /api/mcp for local and remote clients
  • Generic discovery and CRUD tools across every collection and global
  • Results filtered by Payload's own access control, not a parallel model
  • Per-tool switches such as tools: { delete: false }
  • Opt-in auth tools: login, forgotPassword, resetPassword, unlock, verify
  • Custom tools, prompts and resources with full TypeScript inference
  • getUploadInstructions keeps file bytes out of tool arguments
  • hooks.afterToolCall to observe or transform completed responses
  • Pluggable auth via overrideGetAuthorizedMCP

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it.
  3. Restart the agent — the "Payload MCP Plugin" tools will be available.
{
  "mcpServers": {
    "payload-mcp-plugin": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "http://127.0.0.1:3000/api/mcp"
      ]
    }
  }
}

Description

The Payload MCP Plugin is the official Model Context Protocol integration for Payload, the TypeScript-native headless CMS and app framework built on Next.js. It is published from the Payload monorepo as @payloadcms/plugin-mcp, and it turns an existing Payload instance into an MCP server rather than asking you to write one.

Installation is a single plugin entry — plugins: [mcpPlugin({})] in the Payload config — after which every configured collection and global is reachable through a set of generic tools served over Streamable HTTP at /api/mcp. The discovery and CRUD surface is stable: getConfigInfo lists the available slugs, getCollectionSchema and getGlobalSchema describe their shape, and findDocuments, createDocuments, updateDocument, deleteDocuments, findGlobal and updateGlobal operate on them. Individual tools are switched off with plain keys such as tools: { delete: false }.

Access control is the part worth understanding. Results are filtered by Payload's own access rules rather than by a parallel permission model, so an agent sees exactly what the authenticating user would see through the API. Tools, prompts and resources can additionally be gated with code-level access callbacks, and auth-enabled collections can opt into login, auth, forgotPassword, resetPassword, unlock and verify tools. The quick-start URL carries ?overrideAccess=true, which skips access control and is meant for local development only — outside development you remove it and send Payload authorization instead.

File uploads avoid the usual problem of stuffing binary data into tool arguments: getUploadInstructions hands back an HTTP request or a named provider instruction plus a file value, the client sends the file by that route, and then references it from createDocuments or updateDocument.

Beyond the built-ins you can define your own tools, prompts and resources with full TypeScript inference through defineTool, defineCollectionTool, defineGlobalTool and definePrompt, observe or rewrite any completed response with the hooks.afterToolCall hook, and replace the authentication strategy entirely via overrideGetAuthorizedMCP. MIT-licensed and fully open-source.

Related MCP Servers

New

Expo's official remote MCP server — searches Expo docs, installs compatible SDK packages, triggers and monitors EAS builds, and drives iOS/Android simulators.

MCP: Hugging Face

by Hugging Face

New

Hugging Face's official MCP server — search the Hub's models, datasets and Spaces, read repository files, and call thousands of Gradio applications as tools from one remote endpoint.

New

Qase test management over MCP: 36 task-oriented tools for cases, runs, results, defects and QQL search, hosted at mcp.qase.io or self-run with your own API token.

New

Arm's official MCP server for porting and tuning software on Arm — semantic docs search, codebase migration scanning, container architecture checks and LLVM-MCA assembly analysis.

Browse all MCP servers →