|
| 1 | +--- |
| 2 | +title: "Model Context Protocol" |
| 3 | +description: "Let users access your docs and APIs through their favorite AI tools" |
| 4 | +icon: 'audio-waveform' |
| 5 | +--- |
| 6 | + |
| 7 | +<Info> |
| 8 | + MCP server generation is available on [Pro and Enterprise plans](https://mintlify.com/pricing?ref=mcp). |
| 9 | +</Info> |
| 10 | + |
| 11 | +## About MCP servers |
| 12 | + |
| 13 | +The Model Context Protocol (MCP) is an open protocol that creates standardized connections between AI applications and external services, like documentation. Mintlify generates an MCP server from your documentation and OpenAPI specifications, preparing your content for the broader AI ecosystem where any MCP client (like Claude, Cursor, Goose, and others) can connect to your documentation and APIs. |
| 14 | + |
| 15 | +Your MCP server exposes tools for AI applications to search your documentation and interact with your APIs. |
| 16 | + |
| 17 | +## Accessing your MCP server |
| 18 | + |
| 19 | +<Note> |
| 20 | + MCP servers can only be generated for public documentation. Documentation behind end-user authentication cannot be accessed for server generation. |
| 21 | +</Note> |
| 22 | + |
| 23 | +Your MCP server is automatically generated and hosted at your documentation URL with the `/mcp` path. |
| 24 | + |
| 25 | +For example, Mintlify's MCP server is available at `https://mintlify.com/docs/mcp`. |
| 26 | + |
| 27 | +## Configuring your MCP server |
| 28 | + |
| 29 | +All MCP servers include the `search` tool by default, allowing users to query information from your docs in other tools. |
| 30 | + |
| 31 | +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. |
| 32 | + |
| 33 | +For example, the Mintlify MCP server includes tools to get status updates, trigger updates, and create assistant chats. |
| 34 | + |
| 35 | +### File-level configuration |
| 36 | + |
| 37 | +Enable MCP for all endpoints in an OpenAPI specification file: |
| 38 | + |
| 39 | +```json |
| 40 | +{ |
| 41 | + "openapi": "3.1.0", |
| 42 | + "x-mcp": { |
| 43 | + "enabled": true |
| 44 | + }, |
| 45 | + // Other OpenAPI content |
| 46 | +} |
| 47 | +``` |
| 48 | + |
| 49 | +### Endpoint-level configuration |
| 50 | + |
| 51 | +Enable MCP for specific endpoints only: |
| 52 | + |
| 53 | +```json |
| 54 | +{ |
| 55 | + "paths": { |
| 56 | + "/api/v1/users": { |
| 57 | + "x-mcp": { |
| 58 | + "enabled": true |
| 59 | + }, |
| 60 | + // Endpoint configuration |
| 61 | + } |
| 62 | + } |
| 63 | +} |
| 64 | +``` |
| 65 | + |
| 66 | +## Using your MCP server |
| 67 | + |
| 68 | +Your users must connect your MCP server to their preferred AI tools. |
| 69 | + |
| 70 | +1. Make your MCP server URL publicly available. |
| 71 | +2. Users copy your MCP server URL and add it to their tools. |
| 72 | +3. The tools will have standardized access to your documentation and API endpoints. |
| 73 | + |
| 74 | +### Claude |
| 75 | + |
| 76 | +To use your MCP server with Claude: |
| 77 | + |
| 78 | +<Steps> |
| 79 | + <Step title="Add your MCP server to Claude"> |
| 80 | + 1. Navigate to the [Connectors](https://claude.ai/settings/connectors) page in the Claude settings. |
| 81 | + 2. Select **Add custom connector**. |
| 82 | + 3. Add your MCP server name and URL. |
| 83 | + 4. Select **Add**. |
| 84 | + </Step> |
| 85 | + <Step title="Access your MCP server in your chat"> |
| 86 | + 1. When using Claude, select the attachments button (the plus icon). |
| 87 | + 2. Select your MCP server. |
| 88 | + 3. Query Claude with your MCP server as context. |
| 89 | + </Step> |
| 90 | +</Steps> |
| 91 | + |
| 92 | +See the [Model Context Protocol documentation](https://modelcontextprotocol.io/docs/tutorials/use-remote-mcp-server#connecting-to-a-remote-mcp-server) for more details. |
| 93 | + |
| 94 | +### Cursor |
| 95 | + |
| 96 | +To connect your MCP server to Cursor: |
| 97 | + |
| 98 | +<Steps> |
| 99 | + <Step title="Open MCP settings"> |
| 100 | + 1. Use <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> on Windows) to open the command palette. |
| 101 | + 2. Search for "Open MCP settings". |
| 102 | + 3. Select **Add custom MCP**. This will open the `mcp.json` file. |
| 103 | + </Step> |
| 104 | + <Step title="Configure your server"> |
| 105 | + In `mcp.json`, configure your server: |
| 106 | + |
| 107 | + ```json mcp.json example |
| 108 | + { |
| 109 | + "mcpServers": { |
| 110 | + "server-name": { |
| 111 | + "url": "https://your-docs-site.com/mcp" |
| 112 | + } |
| 113 | + } |
| 114 | + } |
| 115 | + ``` |
| 116 | + </Step> |
| 117 | + <Step title="Test the connection"> |
| 118 | + In Cursor's chat, you can ask "What tools do you have available?" Cursor should have your documentation search and any configured API endpoints. |
| 119 | + </Step> |
| 120 | +</Steps> |
| 121 | + |
| 122 | +See [Installing MCP servers](https://docs.cursor.com/en/context/mcp#installing-mcp-servers) in the Cursor documentation for more details. |
| 123 | + |
| 124 | +## Authentication |
| 125 | + |
| 126 | +When using API endpoints through your MCP server, AI tools will prompt users for their API keys as needed. These keys are handled directly by the tool and not stored or processed by Mintlify. |
| 127 | + |
| 128 | +If a user asks their AI tool to demonstrate an API call, it will request the necessary authentication credentials from the user at that moment. |
| 129 | + |
| 130 | +## Monitoring your MCP server |
| 131 | + |
| 132 | +You can view all available MCP tools in the **Available tools** section of the [MCP Server page](https://dashboard.mintlify.com/products/mcp) in your dashboard. |
| 133 | + |
| 134 | +<Frame> |
| 135 | + <img src="/images/mcp/mcp-server-page-light.png" alt="MCP dashboard with Available tools section emphasized" class="block dark:hidden" /> |
| 136 | + <img src="/images/mcp/mcp-server-page-dark.png" alt="MCP dashboard with Available tools section emphasized" class="hidden dark:block" /> |
| 137 | +</Frame> |
0 commit comments