cd /news/developer-tools/payload-v4-the-mcp-plugin-exposes-yo… · home topics developer-tools article
[ARTICLE · art-40570] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Payload v4: the MCP plugin exposes your collections to LLMs — and it's opt-out

Payload CMS v4's plugin now exposes every collection as an MCP tool with full CRUD by default, requiring opt-out for sensitive operations. Developers must review collections after upgrading to prevent accidental exposure of endpoints like user deletion.

read1 min views1 publishedJun 26, 2026

@payloadcms/plugin-mcp

turns your Payload CMS into an MCP server, exposing your collections as tools for LLMs.

Heads up for v4: after a refactor, every collection is now exposed with full CRUD by default. It's opt-out — you disable individual tools rather than enabling them:

mcpPlugin({
  collections: {
    // posts is exposed automatically — no entry needed
    users: { tools: { create: false, update: false, delete: false } }, // find only
  },
})

Custom tools are defined with the defineTool

builder, taking input via zod

v4:

tools: {
  getPostScores: defineTool({
    description: 'Score recent posts',
    input: z.object({ since: z.string() }),
  }).handler(async ({ input, req }) => ({ content: [/* ... */] })),
}

⚠️ The thing to actually do after upgrading: collections you never listed are suddenly reachable through MCP. Review them and disable anything sensitive — an exposed users

collection with delete

is not a great default to inherit by accident.

── more in #developer-tools 4 stories · sorted by recency
── more on @payload cms 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/payload-v4-the-mcp-p…] indexed:0 read:1min 2026-06-26 ·