Skip to content

Conversation

@jhb-dev
Copy link
Contributor

@jhb-dev jhb-dev commented Dec 15, 2025

What?

Add draft parameter support to the MCP plugin's find tool

Why?

MCP clients currently have no way to query draft/unpublished documents. When a collection has drafts enabled, agents need the ability to retrieve draft versions of documents for preview, editing workflows, or content management tasks.

How?

  • Added draft boolean parameter to the findResources schema in schemas.ts
  • Updated find.ts to accept and pass the draft parameter to both payload.find() and payload.findByID() calls
  • Enabled drafts on the test Posts collection to support testing
  • Added integration tests

@kendelljoseph kendelljoseph self-requested a review January 9, 2026 18:52
@kendelljoseph kendelljoseph merged commit 744a593 into payloadcms:main Jan 9, 2026
98 checks passed
@github-actions
Copy link
Contributor

🚀 This is included in version v3.71.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants