Skip to content

Commit 97b3768

Browse files
authored
add x-mint: mcp (#1000)
1 parent dec98d1 commit 97b3768

File tree

2 files changed

+35
-5
lines changed

2 files changed

+35
-5
lines changed

ai/model-context-protocol.mdx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ For example, Mintlify's MCP server is available at `https://mintlify.com/docs/mc
2828

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

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

3333
For example, the Mintlify MCP server includes tools to get status updates, trigger updates, and create assistant chats.
3434

@@ -39,8 +39,10 @@ Enable MCP for all endpoints in an OpenAPI specification file:
3939
```json
4040
{
4141
"openapi": "3.1.0",
42-
"x-mcp": {
43-
"enabled": true
42+
"x-mint": {
43+
"mcp": {
44+
"enabled": true
45+
}
4446
},
4547
// Other OpenAPI content
4648
}
@@ -54,8 +56,10 @@ Enable MCP for specific endpoints only:
5456
{
5557
"paths": {
5658
"/api/v1/users": {
57-
"x-mcp": {
58-
"enabled": true
59+
"x-mint": {
60+
"mcp": {
61+
"enabled": true
62+
}
5963
},
6064
// Endpoint configuration
6165
}

api-playground/openapi-setup.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,32 @@ Change the URL of the endpoint page in your docs using `x-mint: href`:
181181
}
182182
```
183183

184+
### MCP
185+
186+
Expose endpoints as MCP tools by using `x-mint: mcp`:
187+
188+
```json {6-10}
189+
{
190+
"paths": {
191+
"/users": {
192+
"post": {
193+
"summary": "Create user",
194+
"x-mint": {
195+
"mcp": {
196+
"enabled": true
197+
}
198+
},
199+
"parameters": [
200+
{
201+
// Parameter configuration
202+
}
203+
]
204+
}
205+
}
206+
}
207+
}
208+
```
209+
184210
## Auto-populate API pages
185211

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

0 commit comments

Comments
 (0)