Skip to content

Add inki pitfall: document MCP capability registration in register() only - #3270

Merged
pwizla merged 1 commit into
mainfrom
repo/inki-pitfall-mcp-register-only
Jun 18, 2026
Merged

Add inki pitfall: document MCP capability registration in register() only#3270
pwizla merged 1 commit into
mainfrom
repo/inki-pitfall-mcp-register-only

Conversation

@pwizla

@pwizla pwizla commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

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.

@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
documentation Ready Ready Preview, Comment Jun 18, 2026 9:16am

Request Review

@github-actions github-actions Bot added internal PRs created by the Strapi core team pr: chore source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo labels 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. |

@pwizla pwizla Jun 18, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nclsndr Just wanted to check with you that it's correct, so that Inki does not make the same mistake in future PRs 😊

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@pwizla pwizla self-assigned this Jun 18, 2026

@nclsndr nclsndr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@pwizla
pwizla merged commit fb040d3 into main Jun 18, 2026
7 checks passed
@pwizla
pwizla deleted the repo/inki-pitfall-mcp-register-only branch June 18, 2026 12:22
@pwizla pwizla added this to the 6.28.1 milestone Jun 18, 2026
@pwizla pwizla modified the milestones: 6.28.1, 7.0.0 Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal PRs created by the Strapi core team pr: chore source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo

2 participants