Add "Available in MCP" badge for OpenAPI operations#4350
Conversation
Render a badge on operations marked with x-gitbook-mcp: true. When x-gitbook-mcp-url is set (resolved operation > path > root), the badge becomes a button that copies the MCP server URL to the clipboard. The label is localized across all supported locales.
🦋 Changeset detectedLatest commit: c4a157a The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
ae5d4f7 to
ea9e103
Compare
zenoachtig
left a comment
There was a problem hiding this comment.
I have some doubts about the placement and understandability of the badge, but let's not block it and iterate as we get feedback on it
|
On my side I don't understand why we don't expose everything. If this just for us or for other customers also? |
@zenoachtig Yeah I agree it's not perfect in terms of readability. I've put it in the same row as the other badges, but happy to move it if you have a better idea for this one (or all badges ?)
@gregberge wdym by "expose everything" ? This could be used by anyone who did |
…for-x-gitbook-mcp-true
Adds an "Available in MCP" badge to OpenAPI operations, driven by the
x-gitbook-mcpextension.What
x-gitbook-mcp: trueshow an "Available in MCP" badge next to the title, alongside the existing Deprecated / stability badges.x-gitbook-mcp-urlis set, the badge becomes a button that copies the MCP server URL to the clipboard (reusing the existingOpenAPICopyButton).x-gitbook-mcp-urlresolves with cascade precedence operation → path → root (mirroringgetServers), so it can be set once at the spec root and overridden per path or operation.mcpicon and an emerald theme consistent with the existing badge styles.Extensions
x-gitbook-mcp: booleanx-gitbook-mcp-url: stringDemo
Resolves RND-11615.