Skip to content
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
14 changes: 9 additions & 5 deletions ai/model-context-protocol.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

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

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

Expand All @@ -39,8 +39,10 @@
```json
{
"openapi": "3.1.0",
"x-mcp": {
"enabled": true
"x-mint": {
"mcp": {

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/model-context-protocol.mdx#L43

Did you really mean 'mcp'?
"enabled": true
}
},
// Other OpenAPI content
}
Expand All @@ -54,8 +56,10 @@
{
"paths": {
"/api/v1/users": {
"x-mcp": {
"enabled": true
"x-mint": {
"mcp": {
"enabled": true
}
},
// Endpoint configuration
}
Expand Down Expand Up @@ -97,7 +101,7 @@

<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 104 in ai/model-context-protocol.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/model-context-protocol.mdx#L104

Did you really mean 'Ctrl'?
2. Search for "Open MCP settings".
3. Select **Add custom MCP**. This will open the `mcp.json` file.
</Step>
Expand Down
26 changes: 26 additions & 0 deletions api-playground/openapi-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

### Specifying the URL for your API

To enable Mintlify features like the API playground, add a `servers` field to your OpenAPI document with your API's base URL.

Check warning on line 30 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L30

Did you really mean 'API's'?

```json
{
Expand Down Expand Up @@ -181,6 +181,32 @@
}
```

### MCP

Expose endpoints as MCP tools by using `x-mint: mcp`:

```json {6-10}
{
"paths": {
"/users": {
"post": {
"summary": "Create user",
"x-mint": {
"mcp": {
"enabled": true
}
},
"parameters": [
{
// Parameter configuration
}
]
}
}
}
}
```

## Auto-populate API pages

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.
Expand Down Expand Up @@ -298,10 +324,10 @@

### Autogenerate `MDX` files

Use our Mintlify [scraper](https://www.npmjs.com/package/@mintlify/scraping) to autogenerate `MDX` pages for large OpenAPI documents.

Check warning on line 327 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L327

Did you really mean 'autogenerate'?

<Note>
Your OpenAPI document must be valid or the files will not autogenerate.

Check warning on line 330 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L330

Did you really mean 'autogenerate'?
</Note>

The scraper generates:
Expand All @@ -313,12 +339,12 @@
<Steps>
<Step title="Generate `MDX` files.">
```bash
npx @mintlify/scraping@latest openapi-file <path-to-openapi-file>

Check warning on line 342 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L342

Did you really mean 'npx'?
```
</Step>
<Step title="Specify an output folder.">
```bash
npx @mintlify/scraping@latest openapi-file <path-to-openapi-file> -o api-reference

Check warning on line 347 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L347

Did you really mean 'npx'?
```

Add the `-o` flag to specify a folder to populate the files into. If a folder is not specified, the files will populate in the working directory.
Expand Down