diff --git a/ai/model-context-protocol.mdx b/ai/model-context-protocol.mdx index b8da90f1c..aca5aa318 100644 --- a/ai/model-context-protocol.mdx +++ b/ai/model-context-protocol.mdx @@ -28,7 +28,7 @@ For example, Mintlify's MCP server is available at `https://mintlify.com/docs/mc All MCP servers include the `search` tool by default, allowing users to query information from your docs in other tools. -If you have an OpenAPI specification, you can expose specific endpoints as MCP tools by using the `x-mcp` extension at either the file or endpoint level. +If you have an OpenAPI specification, you can expose specific endpoints as MCP tools by using the `mcp` object within the `x-mint` extension at either the file or endpoint level. For example, the Mintlify MCP server includes tools to get status updates, trigger updates, and create assistant chats. @@ -39,8 +39,10 @@ Enable MCP for all endpoints in an OpenAPI specification file: ```json { "openapi": "3.1.0", - "x-mcp": { - "enabled": true + "x-mint": { + "mcp": { + "enabled": true + } }, // Other OpenAPI content } @@ -54,8 +56,10 @@ Enable MCP for specific endpoints only: { "paths": { "/api/v1/users": { - "x-mcp": { - "enabled": true + "x-mint": { + "mcp": { + "enabled": true + } }, // Endpoint configuration } diff --git a/api-playground/openapi-setup.mdx b/api-playground/openapi-setup.mdx index 1b36c4083..f78a734b3 100644 --- a/api-playground/openapi-setup.mdx +++ b/api-playground/openapi-setup.mdx @@ -181,6 +181,32 @@ Change the URL of the endpoint page in your docs using `x-mint: href`: } ``` +### MCP + +Expose endpoints as MCP tools by using `x-mint: mcp`: + +```json {6-10} +{ + "paths": { + "/users": { + "post": { + "summary": "Create user", + "x-mint": { + "mcp": { + "enabled": true + } + }, + "parameters": [ + { + // Parameter configuration + } + ] + } + } + } +} +``` + ## Auto-populate API pages Add an `openapi` field to any navigation element in your `docs.json` to automatically generate pages for OpenAPI endpoints. The `openapi` field accepts either a file path in your docs repo or a URL to a hosted OpenAPI document.