Documenting MCP Servers
Zudoku can render a dedicated MCP endpoint UI for any OpenAPI
operation that has the x-mcp-server extension. When detected, the operation page replaces the
standard request/response view with an MCP card showing the endpoint URL, a copy button, and tabbed
installation instructions for Claude, ChatGPT, Cursor, VS Code, and a generic config.
Adding the extension
Add the x-mcp-server extension to an operation in your OpenAPI spec. While MCP servers typically
use POST, the extension works on any HTTP method:
openapi.json (paths section)
The UI will display beneath the operation heading, showing the full MCP URL derived from the server URL and the operation path.
You can also use the shorthand "x-mcp-server": true to enable the MCP UI without specifying any
metadata. In this case, the operation's summary is used as the server name.
Extension properties
| Property | Type | Required | Description |
|---|---|---|---|
name | string | No | Display name used in the generated client configuration snippets. Falls back to the operation summary, then "mcp-server" |
version | string | No | Version metadata (included for completeness; not currently rendered in UI) |
tools | array | No | Tools metadata (used by Zuplo enrichment; not currently rendered in UI) |
Each tool in the tools array has:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Tool name |
description | string | No | Human-readable tool description |
MCP URL resolution
The displayed MCP URL is constructed from the server URL of the API and the path of the
operation. The server URL comes from the OpenAPI servers array (or the operation-level servers
override if present).
For example, with this configuration:
Code
The displayed MCP URL will be https://api.example.com/mcp/docs.
Complete example
This is a minimal but complete OpenAPI spec that produces an MCP endpoint page:
mcp-api.json
Then reference this spec in your Zudoku config (see
API Reference for full apis configuration):
zudoku.config.tsx
You can see a live example of this in the Cosmo Cargo demo.
Generated UI
When Zudoku detects the x-mcp-server extension on an operation, the page shows:
- MCP Endpoint card with the full URL and a copy button
- AI Tool Configuration tabs with setup instructions for:
- Claude —
claude_desktop_config.jsonusing native HTTP transport - ChatGPT — connector setup via Settings
- Cursor —
mcp.jsonconfiguration (global or project-level) - VS Code —
.vscode/mcp.jsonfor GitHub Copilot - Generic — standard
mcp.jsonformat compatible with most MCP clients
- Claude —
The standard method badge, request body, parameters, and sidecar panels are hidden for MCP endpoints since they use a different interaction model.
Using with Zuplo
If you are using Zuplo to host your API, the x-mcp-server extension is
automatically added to POST operations that use the mcpServerHandler. No manual schema changes are
needed. See the Zuplo MCP documentation for details.