Skip to content

MCP tool updates #1022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Aug 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ai/contextual-menu.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
| **Open in ChatGPT** | `chatgpt` | Creates a ChatGPT conversation with the current page as context |
| **Open in Claude** | `claude` | Creates a Claude conversation with the current page as context |
| **Open in Perplexity** | `perplexity` | Creates a Perplexity conversation with the current page as context |
| **Copy MCP Server URL** | `mcp` | Copies the MCP server URL to the clipboard |
| **Open in Cursor** | `cursor` | Installs the hosted MCP server in Cursor |
| **Open in VSCode** | `vscode` | Installs the hosted MCP server in VSCode |
| **Copy MCP server URL** | `mcp` | Copies your MCP server URL to the clipboard |
| **Connect to Cursor** | `cursor` | Installs your hosted MCP server in Cursor |
| **Connect to VS Code** | `vscode` | Installs your hosted MCP server in VS Code |

<Frame>
<img
Expand All @@ -41,10 +41,10 @@
"options": [
"copy",
"view",
"chatgpt",

Check warning on line 44 in ai/contextual-menu.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/contextual-menu.mdx#L44

Did you really mean 'chatgpt'?
"claude",

Check warning on line 45 in ai/contextual-menu.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/contextual-menu.mdx#L45

Did you really mean 'claude'?
"perplexity",
"mcp",

Check warning on line 47 in ai/contextual-menu.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/contextual-menu.mdx#L47

Did you really mean 'mcp'?
"cursor",
"vscode"
]
Expand Down
288 changes: 253 additions & 35 deletions ai/model-context-protocol.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
---
title: "Model Context Protocol"
description: "Let users access your docs and APIs through their favorite AI tools"
icon: 'audio-waveform'
icon: "audio-waveform"
keywords: ["mcp"]
---

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

## About MCP servers

Expand All @@ -20,116 +19,308 @@
MCP servers can only be generated for public documentation. Documentation behind end-user authentication cannot be accessed for server generation.
</Note>

Your MCP server is automatically generated and hosted at your documentation URL with the `/mcp` path.
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`.

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

## Configuring your MCP server

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 `mcp` object within the `x-mint` extension at either the file or endpoint level.
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.

For example, the Mintlify MCP server includes tools to get status updates, trigger updates, and create assistant chats.
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.

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.

<ResponseField name="mcp" type="object">

Check warning on line 36 in ai/model-context-protocol.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/model-context-protocol.mdx#L36

Did you really mean 'mcp'?
The MCP configuration for the endpoint.

<Expandable title="MCP">
<ResponseField name="enabled" type="boolean">
Whether to expose the endpoint as an MCP tool. Takes precedence over the file-level configuration.
</ResponseField>
<ResponseField name="name" type="string">
The name of the MCP tool.
</ResponseField>
<ResponseField name="description" type="string">
The description of the MCP tool.
</ResponseField>
</Expandable>
</ResponseField>

### File-level configuration

Enable MCP for all endpoints in an OpenAPI specification file:
Enable MCP for all endpoints by default in an OpenAPI specification file and selectively exclude endpoints:

```json
{
"openapi": "3.1.0",
"x-mint": {
"mcp": {

Check warning on line 60 in ai/model-context-protocol.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/model-context-protocol.mdx#L60

Did you really mean 'mcp'?
"enabled": true
}
},
// Other OpenAPI content
// ...
"paths": {
"/api/v1/users": {
"get": {
"x-mint": {
"mcp": {
"enabled": false // Disables MCP for this endpoint
}
},
// ...
}
}
}
}
```

### Endpoint-level configuration

Enable MCP for specific endpoints only:
Enable MCP for specific endpoints:

```json
{
"paths": {
"/api/v1/users": {
"x-mint": {
"mcp": {
"enabled": true
"get": {
"x-mint": {
"mcp": {
"enabled": true,
"name": "get-users",
"description": "Get a list of users"
},
// ...
}
},
// Endpoint configuration
}
},
"/api/v1/delete": {
"delete": {
// No `x-mint: mcp` so this endpoint is not exposed as an MCP tool
// ...
}
}
}
}
```

## Using your MCP server

Your users must connect your MCP server to their preferred AI tools.
Your users must connect your MCP server to their preferred AI tools.

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

### Claude
These are some of the ways you can help your users connect to your MCP server:

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

| Option | Identifier | Description |
| :----- | :--------- | :---------- |
| **Copy MCP server URL** | `mcp` | Copies your MCP server URL to the user's clipboard. |
| **Connect to Cursor** | `cursor` | Installs your MCP server in Cursor. |
| **Connect to VS Code** | `vscode` | Installs your MCP server in VS Code. |
</Tab>
<Tab title="Claude">
<Steps>
<Step title="Add your MCP server to Claude">
<Step title="Get your MCP server URL.">
Navigate to your [dashboard](https://dashboard.mintlify.com/products/mcp) and find your MCP server URL.
</Step>
<Step title="Publish your MCP server URL for your users.">
Create a guide for your users that includes your MCP server URL and the steps to connect it to Claude.

1. Navigate to the [Connectors](https://claude.ai/settings/connectors) page in the Claude settings.
2. Select **Add custom connector**.
3. Add your MCP server name and URL.
4. Select **Add**.
5. When using Claude, select the attachments button (the plus icon).
6. Select your MCP server.
</Step>
</Steps>

See the [Model Context Protocol documentation](https://modelcontextprotocol.io/docs/tutorials/use-remote-mcp-server#connecting-to-a-remote-mcp-server) for more details.
</Tab>
<Tab title="Claude Code">
<Steps>
<Step title="Get your MCP server URL.">
Navigate to your [dashboard](https://dashboard.mintlify.com/products/mcp) and find your MCP server URL.
</Step>
<Step title="Publish your MCP server URL for your users.">
Create a guide for your users that includes your MCP server URL and the command to connect it to Claude Code.

```bash
claude mcp add --transport http <name> <url>
```
</Step>
</Steps>

See the [Claude Code documentation](https://docs.anthropic.com/en/docs/claude-code/mcp#installing-mcp-servers) for more details.
</Tab>
<Tab title="Cursor">
<Steps>
<Step title="Get your MCP server URL.">
Navigate to your [dashboard](https://dashboard.mintlify.com/products/mcp) and find your MCP server URL.
</Step>
<Step title="Publish your MCP server URL for your users.">
Create a guide for your users that includes your MCP server URL and the steps to connect it to Cursor.

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.
2. Search for "Open MCP settings".
3. Select **Add custom MCP**. This will open the `mcp.json` file.
4. In `mcp.json`, configure your server:

```json
{
"mcpServers": {
"<your-mcp-server-name>": {
"url": "<your-mcp-server-url>"
}
}
}
```
</Step>
</Steps>

See the [Cursor documentation](https://docs.cursor.com/en/context/mcp#installing-mcp-servers) for more details.
</Tab>
<Tab title="VS Code">
<Steps>
<Step title="Get your MCP server URL.">
Navigate to your [dashboard](https://dashboard.mintlify.com/products/mcp) and find your MCP server URL.
</Step>
<Step title="Publish your MCP server URL for your users.">
Create a guide for your users that includes your MCP server URL and the steps to connect it to VS Code.

1. Create a `.vscode/mcp.json` file.
2. In `mcp.json`, configure your server:

```json
{
"servers": {
"<your-mcp-server-name>": {
"type": "http",
"url": "<your-mcp-server-url>"
}
}
}
```
</Step>
</Steps>

See the [VS Code documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more details.
</Tab>
</Tabs>

### Example: Connecting to the Mintlify MCP server

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.

<Tabs>
<Tab title="Contextual menu">
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.
</Tab>
<Tab title="Claude">

To use the Mintlify MCP server with Claude:

<Steps>
<Step title="Add the Mintlify MCP server to Claude">
1. Navigate to the [Connectors](https://claude.ai/settings/connectors) page in the Claude settings.
2. Select **Add custom connector**.
3. Add the Mintlify MCP server:
- Name: `Mintlify`
- URL: `https://mintlify.com/docs/mcp`
4. Select **Add**.
</Step>
<Step title="Access your MCP server in your chat">
1. When using Claude, select the attachments button (the plus icon).
2. Select your MCP server.
3. Query Claude with your MCP server as context.
<Step title="Access the MCP server in your chat">
1. When using Claude, select the attachments button (the plus icon).
2. Select the Mintlify MCP server.
3. Ask Claude a question about Mintlify.
</Step>
</Steps>

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

### Cursor
</Tab>
<Tab title="Claude Code">

To use the Mintlify MCP server with Claude Code, run the following command:

```bash
claude mcp add --transport http Mintlify https://mintlify.com/docs/mcp
```

Test the connection by running:

```bash
claude mcp list
```

See the [Claude Code documentation](https://docs.anthropic.com/en/docs/claude-code/mcp#installing-mcp-servers) for more details.
</Tab>
<Tab title="Cursor">

<PreviewButton href="cursor://anysphere.cursor-deeplink/mcp/install?name=mintlify&config=eyJ1cmwiOiJodHRwczovL21pbnRsaWZ5LmNvbS9kb2NzL21jcCJ9">Install in Cursor</PreviewButton>

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

<Steps>
<Step title="Open MCP settings">
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.

Check warning on line 274 in ai/model-context-protocol.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/model-context-protocol.mdx#L274

Did you really mean 'Ctrl'?
2. Search for "Open MCP settings".
3. Select **Add custom MCP**. This will open the `mcp.json` file.
</Step>
<Step title="Configure your server">
In `mcp.json`, configure your server:
<Step title="Configure the Mintlify MCP server">
In `mcp.json`, add:

```json mcp.json example
```json
{
"mcpServers": {
"server-name": {
"url": "https://your-docs-site.com/mcp"
"Mintlify": {
"url": "https://mintlify.com/docs/mcp"
}
}
}
```
</Step>
<Step title="Test the connection">
In Cursor's chat, you can ask "What tools do you have available?" Cursor should have your documentation search and any configured API endpoints.
In Cursor's chat, ask "What tools do you have available?" Cursor should show the Mintlify MCP server as an available tool.
</Step>
</Steps>

See [Installing MCP servers](https://docs.cursor.com/en/context/mcp#installing-mcp-servers) in the Cursor documentation for more details.
</Tab>
<Tab title="VS Code">

<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>

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:

```json
{
"servers": {
"Mintlify": {
"type": "http",
"url": "https://mintlify.com/docs/mcp"
}
}
}
```

See the [VS Code documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more details.
</Tab>
</Tabs>

## Authentication

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.
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.

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.
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.

## Monitoring your MCP server

Expand All @@ -139,3 +330,30 @@
<img src="/images/mcp/mcp-server-page-light.png" alt="MCP dashboard with Available tools section emphasized" class="block dark:hidden" />
<img src="/images/mcp/mcp-server-page-dark.png" alt="MCP dashboard with Available tools section emphasized" class="hidden dark:block" />
</Frame>

## Troubleshooting

<AccordionGroup>
<Accordion title="MCP server only shows search tool">
If your MCP server only exposes the search tool despite having an OpenAPI specification:

1. Verify your OpenAPI specification is valid and accessible.
2. Ensure you've explicitly enabled MCP for specific endpoints using `x-mint.mcp.enabled: true`.
3. Check your deployment logs for OpenAPI processing errors.

If OpenAPI processing fails, the server continues with just the search tool to maintain functionality.
</Accordion>
<Accordion title="Authentication issues">
If users report authentication problems:

1. Check that your OpenAPI specification includes proper `securitySchemes` definitions.
2. Confirm that enabled endpoints work with the specified authentication methods.
</Accordion>
<Accordion title="Tool descriptions missing or unclear">
If AI tools aren't using your API endpoints effectively:

1. Add detailed `summary` and `description` fields to your endpoints.
2. Ensure parameter names and descriptions are self-explanatory.
3. Use the MCP dashboard to verify how your endpoints appear as tools.
</Accordion>
</AccordionGroup>
Loading