You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ai/model-context-protocol.mdx
+83-65Lines changed: 83 additions & 65 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,70 +1,40 @@
1
1
---
2
2
title: "Model Context Protocol"
3
-
description: "Generate MCP servers from your documentation or OpenAPI specs"
3
+
description: "Let users access your docs and APIs through their favorite AI tools"
4
4
icon: 'audio-waveform'
5
5
---
6
6
7
-
## Overview
7
+
<Info>
8
+
MCP server generation is available on [Pro and Enterprise plans](https://mintlify.com/pricing?ref=mcp).
9
+
</Info>
8
10
9
-
The Model Context Protocol (MCP) is an open protocol that connects your functions to LLMs and AI applications. With Mintlify's integration, you can automatically generate an MCP server from your existing documentation or OpenAPI specifications, enabling seamless AI-powered interactions with your product.
11
+
## About MCP servers
10
12
11
-
<Note>
12
-
MCP servers can only be generated for public documentation. Documentation behind end-user authentication cannot be accessed for server generation.
13
-
</Note>
14
-
15
-
## Generating your MCP server
16
-
17
-
Public documentation hosted on Mintlify can be extracted as an MCP server using the following command:
18
-
19
-
```bash
20
-
npx mint-mcp add <your-subdomain-or-domain>
21
-
```
22
-
23
-
Examples:
24
-
25
-
```bash
26
-
# Using subdomain
27
-
npx mint-mcp add mintlify
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.
28
14
29
-
# Using domain
30
-
npx mint-mcp add mintlify.com
31
-
```
32
-
33
-
### Authentication
34
-
35
-
When you run the command, you'll need to provide two API keys, `External Admin Key` and `Assistant API Key`.
15
+
Your MCP server exposes tools for AI applications to search your documentation and interact with your APIs.
36
16
37
-
These can be found in your [dashboard](https://dashboard.mintlify.com/settings/organization/api-keys) under **Settings > API Keys**.
17
+
## Accessing your MCP server
38
18
39
-
<Frame>
40
-
<imgsrc="/images/mcp/mcp-terminal.png"alt="Terminal prompt asking What is the Bearer Token for Mintlify External API?" />
41
-
</Frame>
42
-
43
-
### Select MCP clients
44
-
45
-
After authentication, you'll choose which MCP clients to enable for your server:
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>
46
22
47
-
<Frame>
48
-
<imgsrc="/images/mcp/mcp-terminal-completed.png"alt="MCP Clients listed in the terminal." />
49
-
</Frame>
23
+
Your MCP server is automatically generated and hosted at your documentation URL with the `/mcp` path.
50
24
51
-
Once configured, your MCP server is ready to use with the command provided in the terminal.
25
+
For example, Mintlify's MCP server is available at `https://mintlify.com/docs/mcp`.
52
26
53
27
## Configuring your MCP server
54
28
55
-
Now let's take a look at how to configure your MCP server.
56
-
57
-
### Default functionality
58
-
59
-
All MCP servers include the `search` tool by default, allowing users to query information across your entire documentation.
60
-
61
-
### Adding API functions
29
+
All MCP servers include the `search` tool by default, allowing users to query information from your docs in other tools.
62
30
63
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.
64
32
65
-
#### File-level configuration
33
+
For example, the Mintlify MCP server includes tools to get status updates, trigger updates, and create assistant chats.
34
+
35
+
### File-level configuration
66
36
67
-
Enable MCP for all endpoints in a specification file:
37
+
Enable MCP for all endpoints in an OpenAPI specification file:
68
38
69
39
```json
70
40
{
@@ -76,7 +46,7 @@ Enable MCP for all endpoints in a specification file:
76
46
}
77
47
```
78
48
79
-
####Endpoint-level configuration
49
+
### Endpoint-level configuration
80
50
81
51
Enable MCP for specific endpoints only:
82
52
@@ -93,27 +63,75 @@ Enable MCP for specific endpoints only:
93
63
}
94
64
```
95
65
96
-
### Authentication handling
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
+
<Steptitle="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
+
<Steptitle="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
+
<Steptitle="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
+
<Steptitle="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
+
<Steptitle="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.
97
123
98
-
If your OpenAPI spec defines authentication using `securitySchemes`, these authentication methods will be automatically applied to your MCP server.
124
+
## Authentication
99
125
100
-
### Monitoring your MCP server
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.
101
127
102
-
After publishing your changes, you can view all available MCP tools in the **Available Tools** section on the MCP server page in your dashboard.
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.
103
133
104
134
<Frame>
105
135
<imgsrc="/images/mcp/mcp-server-page-light.png"alt="MCP dashboard with Available tools section emphasized"class="block dark:hidden" />
106
136
<imgsrc="/images/mcp/mcp-server-page-dark.png"alt="MCP dashboard with Available tools section emphasized"class="hidden dark:block" />
107
137
</Frame>
108
-
109
-
## Distribution
110
-
111
-
### User installation
112
-
113
-
Your users can install and use your MCP server with:
114
-
115
-
```bash
116
-
npx mint-mcp add <your-subdomain-or-domain>
117
-
```
118
-
119
-
This provides them with a ready-to-use MCP server that connects your documented functions to AI applications.
0 commit comments