Skip to content
Merged
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
40 changes: 22 additions & 18 deletions mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@

## Overview

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.

Check warning on line 9 in mcp.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

mcp.mdx#L9

Did you really mean 'LLMs'?

## Quick Usage Guide
<Note>
MCP servers can only be generated for public documentation. Documentation behind end-user authentication cannot be accessed for server generation.
</Note>

Any public documentation hosted on Mintlify can be extracted as an MCP server using a simple command:
## Generating your MCP server

Public documentation hosted on Mintlify can be extracted as an MCP server using the following command:

```bash
npx mint-mcp add <your-subdomain-or-domain>
Expand All @@ -30,35 +34,35 @@

When you run the command, you'll need to provide two API keys, `External Admin Key` and `Assistant API Key`.

These can be found in your [Mintlify Dashboard](https://dashboard.mintlify.com/settings/organization/api-keys) under **Settings > API Keys**.
These can be found in your [dashboard](https://dashboard.mintlify.com/settings/organization/api-keys) under **Settings > API Keys**.

<Frame>
<img src="/images/mcp/mcp-terminal.png" alt="API Keys" />
<img src="/images/mcp/mcp-terminal.png" alt="Terminal prompt asking What is the Bearer Token for Mintlify External API?" />
</Frame>

### Select MCP Clients
### Select MCP clients

After authentication, you'll choose which MCP clients to enable for your server:

<Frame>
<img src="/images/mcp/mcp-terminal-completed.png" alt="MCP Clients" />
<img src="/images/mcp/mcp-terminal-completed.png" alt="MCP Clients listed in the terminal." />
</Frame>

Once configured, your MCP server is ready to use with the command provided in the terminal.

## Configuring Your MCP Server
## Configuring your MCP server

Now let's take a look at how to configure your MCP server.

### Default Functionality
### Default functionality

All MCP servers include the `search` tool by default, allowing users to query information across your entire documentation.

### Adding API Functions
### Adding API functions

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.

#### File-Level Configuration
#### File-level configuration

Enable MCP for all endpoints in a specification file:

Expand All @@ -72,7 +76,7 @@
}
```

#### Endpoint-Level Configuration
#### Endpoint-level configuration

Enable MCP for specific endpoints only:

Expand All @@ -89,27 +93,27 @@
}
```

### Authentication Handling
### Authentication handling

If your OpenAPI spec defines authentication using securitySchemes, these authentication methods will be automatically applied to your MCP server.
If your OpenAPI spec defines authentication using `securitySchemes`, these authentication methods will be automatically applied to your MCP server.

### Monitoring Your MCP Server
### Monitoring your MCP server

After publishing your changes, you can view all available MCP tools in the **Available Tools** section on the MCP server page in your dashboard.

<Frame>
<img src="/images/mcp/mcp-server-page-light.png" alt="MCP Dashboard" class="block dark:hidden" />
<img src="/images/mcp/mcp-server-page-dark.png" alt="MCP Dashboard" class="hidden dark:block" />
<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>

## Distribution

### User Installation
### User installation

Your users can install and use your MCP server with:

```bash
npx mint-mcp add <your-subdomain-or-domain>
```

This provides them with a ready-to-use MCP server that connects your documented functions to AI applications.
This provides them with a ready-to-use MCP server that connects your documented functions to AI applications.