Skip to content

Conversation

@jonathanelmgren
Copy link
Contributor

@jonathanelmgren jonathanelmgren commented Dec 22, 2025

Fixes #15013

Problem

The MCP plugin crashes when defaultDepth: 0 is set in Payload config, throwing:

TypeError: Cannot create property 'collection' on string '69495e5d1c30e1099b58e9df'

See the linked issue for full reproduction steps and error details.

@jonathanelmgren jonathanelmgren changed the title fix(plugin-mcp): Handle defaultDepth: 0 in API key authentication fix(plugin-mcp): handle defaultDepth: 0 in API key authentication Dec 22, 2025
@jonathanelmgren jonathanelmgren changed the title fix(plugin-mcp): handle defaultDepth: 0 in API key authentication fix(plugin-mcp): handle defaultDepth: 0 in api key authentication Dec 22, 2025
JarrodMFlesch
JarrodMFlesch previously approved these changes Jan 6, 2026
@jonathanelmgren
Copy link
Contributor Author

@JarrodMFlesch Had the same isse with failing tests in this PR. Had to be force merged..

@JarrodMFlesch
Copy link
Contributor

@jonathanelmgren I fixed those issues in a PR that landed yesterday. Just merged latest main into this branch so tests should pass.

@jonathanelmgren jonathanelmgren force-pushed the fix/mcp-plugin-defaultdepth-zero branch from 1437716 to f473d92 Compare January 8, 2026 18:08
@jonathanelmgren
Copy link
Contributor Author

@JarrodMFlesch welp, tests were still failing so I rebased and the commits got rebased weirdly onto my branch. Had to reset and cherry-pick my fix onto fresh main. Should be clean now but the review went stale, would you mind re-approving?

@JarrodMFlesch JarrodMFlesch merged commit e0e058c into payloadcms:main Jan 8, 2026
98 checks passed
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.

MCP Plugin Crashes with defaultDepth: 0

2 participants