Add inki pitfall: document MCP capability registration in register() only - #3270
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
pwizla
commented
Jun 18, 2026
| | Hallucinated pattern | Correct pattern | Context | | ||
| |---------------------|-----------------|---------| | ||
| | `actionProvider.registerMany()` in `register()` | `actionProvider.registerMany()` in `bootstrap()` | Services are not available during `register()`. RBAC actions must be registered in `bootstrap()`. | | ||
| | Registering MCP capabilities (`strapi.ai.mcp.registerTool`/`registerResource`/`registerPrompt`) in `bootstrap()`, or describing `bootstrap()` as a supported or preferred phase | Register MCP capabilities only in the plugin's `register()` phase | Strapi docs convention (design decision): registration is gated to `serverStatus === 'idle'` (`packages/core/core/src/services/mcp/index.ts`), so `bootstrap()` is technically possible, but its edge cases are too narrow to recommend. Docs document `register()` only. strapi/strapi type comments may still mention `bootstrap()`: flag this as a docs-convention issue, not a code-vs-source error. The code may align to register-only later. | |
Collaborator
Author
There was a problem hiding this comment.
@nclsndr Just wanted to check with you that it's correct, so that Inki does not make the same mistake in future PRs 😊
Contributor
There was a problem hiding this comment.
It was actually my mistake that Inki picked up. We actually abuse this limitation ourselves—the content-management tools are leveraging a lifecycle order defect to allow the dynamic generation of MCP tools.
I thought I could expand the edge case to the general usage. I was terribly wrong.
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.
This PR adds a known-pitfalls entry so inki reviews catch documentation that registers MCP capabilities (strapi.ai.mcp.registerTool/registerResource/registerPrompt) in bootstrap() or describes bootstrap() as a supported phase. This reflects a Strapi docs editorial decision to document register() only; bootstrap() is technically possible but its edge cases are too narrow to recommend, and the code may align to register-only later.