Skip to content

Commit b6c9df2

Browse files
authored
MCP tool updates (#1022)
* update `x-mint: mcp` info * fix JSON examples * update MCP * include `securityRequirement` * include responseField for mcp object adds x-mint.mcp.name and x-mint.mcp.description * update availability * move troubleshooting to the bottom * add `mcp` as keyword * use tabs for installation options * add VS code MCP install to contextual menu * make it more clear what contextual menu does * add tabs for how to connect MCP server to popular tools * update Mintlify example * fix VS Code since did it everywhere else * fix contextual menu label * update placeholder values * make buttons look nicer
1 parent a70e29f commit b6c9df2

File tree

5 files changed

+310
-47
lines changed

5 files changed

+310
-47
lines changed

ai/contextual-menu.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ The contextual menu includes several pre-built options that you can enable by ad
2020
| **Open in ChatGPT** | `chatgpt` | Creates a ChatGPT conversation with the current page as context |
2121
| **Open in Claude** | `claude` | Creates a Claude conversation with the current page as context |
2222
| **Open in Perplexity** | `perplexity` | Creates a Perplexity conversation with the current page as context |
23-
| **Copy MCP Server URL** | `mcp` | Copies the MCP server URL to the clipboard |
24-
| **Open in Cursor** | `cursor` | Installs the hosted MCP server in Cursor |
25-
| **Open in VSCode** | `vscode` | Installs the hosted MCP server in VSCode |
23+
| **Copy MCP server URL** | `mcp` | Copies your MCP server URL to the clipboard |
24+
| **Connect to Cursor** | `cursor` | Installs your hosted MCP server in Cursor |
25+
| **Connect to VS Code** | `vscode` | Installs your hosted MCP server in VS Code |
2626

2727
<Frame>
2828
<img

ai/model-context-protocol.mdx

Lines changed: 253 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
---
22
title: "Model Context Protocol"
33
description: "Let users access your docs and APIs through their favorite AI tools"
4-
icon: 'audio-waveform'
4+
icon: "audio-waveform"
5+
keywords: ["mcp"]
56
---
67

7-
<Info>
8-
MCP server generation is available on [Pro and Enterprise plans](https://mintlify.com/pricing?ref=mcp).
9-
</Info>
8+
import { PreviewButton } from "/snippets/previewbutton.jsx"
109

1110
## About MCP servers
1211

@@ -20,21 +19,39 @@ Your MCP server exposes tools for AI applications to search your documentation a
2019
MCP servers can only be generated for public documentation. Documentation behind end-user authentication cannot be accessed for server generation.
2120
</Note>
2221

23-
Your MCP server is automatically generated and hosted at your documentation URL with the `/mcp` path.
22+
Your MCP server is automatically generated and hosted at your documentation URL with the `/mcp` path. For example, Mintlify's MCP server is available at `https://mintlify.com/docs/mcp`.
2423

25-
For example, Mintlify's MCP server is available at `https://mintlify.com/docs/mcp`.
24+
You can see and copy your MCP server URL in your [dashboard](https://dashboard.mintlify.com/products/mcp).
2625

2726
## Configuring your MCP server
2827

2928
All MCP servers include the `search` tool by default, allowing users to query information from your docs in other tools.
3029

31-
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.
30+
If you have a [Pro or Enterprise plan](https://mintlify.com/pricing?ref=mcp), you can expose endpoints from your OpenAPI specification as MCP tools.
3231

33-
For example, the Mintlify MCP server includes tools to get status updates, trigger updates, and create assistant chats.
32+
To expose endpoints as MCP tools, use the `mcp` object within the `x-mint` extension at either the file or endpoint level. For example, the Mintlify MCP server includes tools to create assistant chats, get status updates, and trigger updates.
33+
34+
MCP servers follow a security-first approach where API endpoints are not exposed by default. You must explicitly enable endpoints to make them available as MCP tools. Only expose endpoints that are safe for public access through AI tools.
35+
36+
<ResponseField name="mcp" type="object">
37+
The MCP configuration for the endpoint.
38+
39+
<Expandable title="MCP">
40+
<ResponseField name="enabled" type="boolean">
41+
Whether to expose the endpoint as an MCP tool. Takes precedence over the file-level configuration.
42+
</ResponseField>
43+
<ResponseField name="name" type="string">
44+
The name of the MCP tool.
45+
</ResponseField>
46+
<ResponseField name="description" type="string">
47+
The description of the MCP tool.
48+
</ResponseField>
49+
</Expandable>
50+
</ResponseField>
3451

3552
### File-level configuration
3653

37-
Enable MCP for all endpoints in an OpenAPI specification file:
54+
Enable MCP for all endpoints by default in an OpenAPI specification file and selectively exclude endpoints:
3855

3956
```json
4057
{
@@ -44,92 +61,266 @@ Enable MCP for all endpoints in an OpenAPI specification file:
4461
"enabled": true
4562
}
4663
},
47-
// Other OpenAPI content
64+
// ...
65+
"paths": {
66+
"/api/v1/users": {
67+
"get": {
68+
"x-mint": {
69+
"mcp": {
70+
"enabled": false // Disables MCP for this endpoint
71+
}
72+
},
73+
// ...
74+
}
75+
}
76+
}
4877
}
4978
```
5079

5180
### Endpoint-level configuration
5281

53-
Enable MCP for specific endpoints only:
82+
Enable MCP for specific endpoints:
5483

5584
```json
5685
{
5786
"paths": {
5887
"/api/v1/users": {
59-
"x-mint": {
60-
"mcp": {
61-
"enabled": true
88+
"get": {
89+
"x-mint": {
90+
"mcp": {
91+
"enabled": true,
92+
"name": "get-users",
93+
"description": "Get a list of users"
94+
},
95+
// ...
6296
}
63-
},
64-
// Endpoint configuration
97+
}
98+
},
99+
"/api/v1/delete": {
100+
"delete": {
101+
// No `x-mint: mcp` so this endpoint is not exposed as an MCP tool
102+
// ...
103+
}
65104
}
66105
}
67106
}
68107
```
69108

70109
## Using your MCP server
71110

72-
Your users must connect your MCP server to their preferred AI tools.
111+
Your users must connect your MCP server to their preferred AI tools.
73112

74113
1. Make your MCP server URL publicly available.
75114
2. Users copy your MCP server URL and add it to their tools.
76-
3. The tools will have standardized access to your documentation and API endpoints.
115+
3. Users access your documentation and API endpoints through their tools.
77116

78-
### Claude
117+
These are some of the ways you can help your users connect to your MCP server:
79118

80-
To use your MCP server with Claude:
119+
<Tabs>
120+
<Tab title="Contextual menu">
121+
Add options in the [contextual menu](/ai/contextual-menu) for your users to connect to your MCP server from any page of your documentation.
81122

123+
| Option | Identifier | Description |
124+
| :----- | :--------- | :---------- |
125+
| **Copy MCP server URL** | `mcp` | Copies your MCP server URL to the user's clipboard. |
126+
| **Connect to Cursor** | `cursor` | Installs your MCP server in Cursor. |
127+
| **Connect to VS Code** | `vscode` | Installs your MCP server in VS Code. |
128+
</Tab>
129+
<Tab title="Claude">
82130
<Steps>
83-
<Step title="Add your MCP server to Claude">
131+
<Step title="Get your MCP server URL.">
132+
Navigate to your [dashboard](https://dashboard.mintlify.com/products/mcp) and find your MCP server URL.
133+
</Step>
134+
<Step title="Publish your MCP server URL for your users.">
135+
Create a guide for your users that includes your MCP server URL and the steps to connect it to Claude.
136+
84137
1. Navigate to the [Connectors](https://claude.ai/settings/connectors) page in the Claude settings.
85138
2. Select **Add custom connector**.
86139
3. Add your MCP server name and URL.
87140
4. Select **Add**.
141+
5. When using Claude, select the attachments button (the plus icon).
142+
6. Select your MCP server.
143+
</Step>
144+
</Steps>
145+
146+
See the [Model Context Protocol documentation](https://modelcontextprotocol.io/docs/tutorials/use-remote-mcp-server#connecting-to-a-remote-mcp-server) for more details.
147+
</Tab>
148+
<Tab title="Claude Code">
149+
<Steps>
150+
<Step title="Get your MCP server URL.">
151+
Navigate to your [dashboard](https://dashboard.mintlify.com/products/mcp) and find your MCP server URL.
152+
</Step>
153+
<Step title="Publish your MCP server URL for your users.">
154+
Create a guide for your users that includes your MCP server URL and the command to connect it to Claude Code.
155+
156+
```bash
157+
claude mcp add --transport http <name> <url>
158+
```
159+
</Step>
160+
</Steps>
161+
162+
See the [Claude Code documentation](https://docs.anthropic.com/en/docs/claude-code/mcp#installing-mcp-servers) for more details.
163+
</Tab>
164+
<Tab title="Cursor">
165+
<Steps>
166+
<Step title="Get your MCP server URL.">
167+
Navigate to your [dashboard](https://dashboard.mintlify.com/products/mcp) and find your MCP server URL.
168+
</Step>
169+
<Step title="Publish your MCP server URL for your users.">
170+
Create a guide for your users that includes your MCP server URL and the steps to connect it to Cursor.
171+
172+
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.
173+
2. Search for "Open MCP settings".
174+
3. Select **Add custom MCP**. This will open the `mcp.json` file.
175+
4. In `mcp.json`, configure your server:
176+
177+
```json
178+
{
179+
"mcpServers": {
180+
"<your-mcp-server-name>": {
181+
"url": "<your-mcp-server-url>"
182+
}
183+
}
184+
}
185+
```
186+
</Step>
187+
</Steps>
188+
189+
See the [Cursor documentation](https://docs.cursor.com/en/context/mcp#installing-mcp-servers) for more details.
190+
</Tab>
191+
<Tab title="VS Code">
192+
<Steps>
193+
<Step title="Get your MCP server URL.">
194+
Navigate to your [dashboard](https://dashboard.mintlify.com/products/mcp) and find your MCP server URL.
195+
</Step>
196+
<Step title="Publish your MCP server URL for your users.">
197+
Create a guide for your users that includes your MCP server URL and the steps to connect it to VS Code.
198+
199+
1. Create a `.vscode/mcp.json` file.
200+
2. In `mcp.json`, configure your server:
201+
202+
```json
203+
{
204+
"servers": {
205+
"<your-mcp-server-name>": {
206+
"type": "http",
207+
"url": "<your-mcp-server-url>"
208+
}
209+
}
210+
}
211+
```
212+
</Step>
213+
</Steps>
214+
215+
See the [VS Code documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more details.
216+
</Tab>
217+
</Tabs>
218+
219+
### Example: Connecting to the Mintlify MCP server
220+
221+
Connect to the Mintlify MCP server to interact with the Mintlify API and search our documentation. This will give you more accurate answers about how to use Mintlify in your local environment and demonstrates how you can help your users connect to your MCP server.
222+
223+
<Tabs>
224+
<Tab title="Contextual menu">
225+
At the top of this page, select the contextual menu and choose **Connect to Cursor** or **Connect to VS Code** to connect the Mintlify MCP server to the IDE of your choice.
226+
</Tab>
227+
<Tab title="Claude">
228+
229+
To use the Mintlify MCP server with Claude:
230+
231+
<Steps>
232+
<Step title="Add the Mintlify MCP server to Claude">
233+
1. Navigate to the [Connectors](https://claude.ai/settings/connectors) page in the Claude settings.
234+
2. Select **Add custom connector**.
235+
3. Add the Mintlify MCP server:
236+
- Name: `Mintlify`
237+
- URL: `https://mintlify.com/docs/mcp`
238+
4. Select **Add**.
88239
</Step>
89-
<Step title="Access your MCP server in your chat">
90-
1. When using Claude, select the attachments button (the plus icon).
91-
2. Select your MCP server.
92-
3. Query Claude with your MCP server as context.
240+
<Step title="Access the MCP server in your chat">
241+
1. When using Claude, select the attachments button (the plus icon).
242+
2. Select the Mintlify MCP server.
243+
3. Ask Claude a question about Mintlify.
93244
</Step>
94245
</Steps>
95246

96247
See the [Model Context Protocol documentation](https://modelcontextprotocol.io/docs/tutorials/use-remote-mcp-server#connecting-to-a-remote-mcp-server) for more details.
97248

98-
### Cursor
249+
</Tab>
250+
<Tab title="Claude Code">
251+
252+
To use the Mintlify MCP server with Claude Code, run the following command:
253+
254+
```bash
255+
claude mcp add --transport http Mintlify https://mintlify.com/docs/mcp
256+
```
257+
258+
Test the connection by running:
259+
260+
```bash
261+
claude mcp list
262+
```
263+
264+
See the [Claude Code documentation](https://docs.anthropic.com/en/docs/claude-code/mcp#installing-mcp-servers) for more details.
265+
</Tab>
266+
<Tab title="Cursor">
267+
268+
<PreviewButton href="cursor://anysphere.cursor-deeplink/mcp/install?name=mintlify&config=eyJ1cmwiOiJodHRwczovL21pbnRsaWZ5LmNvbS9kb2NzL21jcCJ9">Install in Cursor</PreviewButton>
99269

100-
To connect your MCP server to Cursor:
270+
To connect the Mintlify MCP server to Cursor, click the **Install in Cursor** button. Or to manually connect the MCP server, follow these steps:
101271

102272
<Steps>
103273
<Step title="Open MCP settings">
104274
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.
105275
2. Search for "Open MCP settings".
106276
3. Select **Add custom MCP**. This will open the `mcp.json` file.
107277
</Step>
108-
<Step title="Configure your server">
109-
In `mcp.json`, configure your server:
278+
<Step title="Configure the Mintlify MCP server">
279+
In `mcp.json`, add:
110280

111-
```json mcp.json example
281+
```json
112282
{
113283
"mcpServers": {
114-
"server-name": {
115-
"url": "https://your-docs-site.com/mcp"
284+
"Mintlify": {
285+
"url": "https://mintlify.com/docs/mcp"
116286
}
117287
}
118288
}
119289
```
120290
</Step>
121291
<Step title="Test the connection">
122-
In Cursor's chat, you can ask "What tools do you have available?" Cursor should have your documentation search and any configured API endpoints.
292+
In Cursor's chat, ask "What tools do you have available?" Cursor should show the Mintlify MCP server as an available tool.
123293
</Step>
124294
</Steps>
125295

126296
See [Installing MCP servers](https://docs.cursor.com/en/context/mcp#installing-mcp-servers) in the Cursor documentation for more details.
297+
</Tab>
298+
<Tab title="VS Code">
299+
300+
<PreviewButton href="https://vscode.dev/redirect/mcp/install?name=mintlify&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmintlify.com%2Fdocs%2Fmcp%22%7D">Install in VS Code</PreviewButton>
301+
302+
To connect the Mintlify MCP server to VS Code, click the **Install in VS Code** button. Or to manually connect the MCP server, create a `.vscode/mcp.json` file and add:
303+
304+
```json
305+
{
306+
"servers": {
307+
"Mintlify": {
308+
"type": "http",
309+
"url": "https://mintlify.com/docs/mcp"
310+
}
311+
}
312+
}
313+
```
314+
315+
See the [VS Code documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more details.
316+
</Tab>
317+
</Tabs>
127318

128319
## Authentication
129320

130-
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.
321+
When you enable an API endpoint for MCP, the server includes the authentication requirements defined in your OpenAPI `securitySchemes` and `securityRequirement`. Any keys are handled directly by the tool and not stored or processed by Mintlify.
131322

132-
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.
323+
If a user asks their AI tool to call a protected endpoint, the tool will request the necessary authentication credentials from the user at that moment.
133324

134325
## Monitoring your MCP server
135326

@@ -139,3 +330,30 @@ You can view all available MCP tools in the **Available tools** section of the [
139330
<img src="/images/mcp/mcp-server-page-light.png" alt="MCP dashboard with Available tools section emphasized" class="block dark:hidden" />
140331
<img src="/images/mcp/mcp-server-page-dark.png" alt="MCP dashboard with Available tools section emphasized" class="hidden dark:block" />
141332
</Frame>
333+
334+
## Troubleshooting
335+
336+
<AccordionGroup>
337+
<Accordion title="MCP server only shows search tool">
338+
If your MCP server only exposes the search tool despite having an OpenAPI specification:
339+
340+
1. Verify your OpenAPI specification is valid and accessible.
341+
2. Ensure you've explicitly enabled MCP for specific endpoints using `x-mint.mcp.enabled: true`.
342+
3. Check your deployment logs for OpenAPI processing errors.
343+
344+
If OpenAPI processing fails, the server continues with just the search tool to maintain functionality.
345+
</Accordion>
346+
<Accordion title="Authentication issues">
347+
If users report authentication problems:
348+
349+
1. Check that your OpenAPI specification includes proper `securitySchemes` definitions.
350+
2. Confirm that enabled endpoints work with the specified authentication methods.
351+
</Accordion>
352+
<Accordion title="Tool descriptions missing or unclear">
353+
If AI tools aren't using your API endpoints effectively:
354+
355+
1. Add detailed `summary` and `description` fields to your endpoints.
356+
2. Ensure parameter names and descriptions are self-explanatory.
357+
3. Use the MCP dashboard to verify how your endpoints appear as tools.
358+
</Accordion>
359+
</AccordionGroup>

0 commit comments

Comments
 (0)