docs(plugin-mcp): clarify Bearer-only auth on /api/mcp endpoint#16602
Open
algojogacor wants to merge 1 commit into
Open
docs(plugin-mcp): clarify Bearer-only auth on /api/mcp endpoint#16602algojogacor wants to merge 1 commit into
algojogacor wants to merge 1 commit into
Conversation
Unlike other Payload API-key-based endpoints that accept the <collection-slug> API-Key <key> convention, the MCP endpoint only supports Authorization: Bearer <key>. Add Banner clarifying this. Fixes payloadcms#16572
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Adds a
<Banner type="info">to the MCP plugin documentation clarifying that the/api/mcpendpoint only supportsAuthorization: Bearer <key>authentication. Unlike other Payload API-key-based endpoints that accept the<collection-slug> API-Key <key>convention, the MCP endpoint will reject any other auth scheme.Why?
Fixes #16572
Users familiar with Payload's standard
API-Keyauth convention (used by every other API-key-backed surface) naturally trypayload-mcp-api-keys API-Key <token>against/api/mcp. This is silently rejected. The existing docs mention Bearer but don't call out that it's the only supported format.How?
Added a
<Banner type="info">block after the "All MCP requests must include a valid API key as a Bearer token" sentence indocs/plugins/mcp.mdx, explicitly stating:Authorization: Bearer <key>payload-mcp-api-keys API-Key <key>convention used elsewhere in Payload does not work hereChanges
docs/plugins/mcp.mdx: Added Banner note about Bearer-only auth (+11 -1lines)Testing
<Banner type="info">shortcode is already used elsewhere in the same file (lines 13, 126, 187) ✅