Skip to content
Open
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
44 changes: 44 additions & 0 deletions ai/model-context-protocol.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
The MCP search tool supports optional parameters that AI applications use to control and refine search results.

- **`pageSize`**: Number of results to return, between 1 and 50. Defaults to 10.
- **`scoreThreshold`**: Minimum relevance score between 0 and 1. Only returns results at or above this threshold. Use this to filter out low-relevance matches.

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/model-context-protocol.mdx#L41

Use 'preceding' instead of 'above'.
- **`version`**: Filter results to a specific documentation version. For example, `'v0.7'`. Only returns content tagged with the specified version or content available across all versions.
- **`language`**: Filter results to a specific language code. For example, `'en'`, `'zh'`, or `'es'`. Only returns content in the specified language or content available across all languages.

Expand Down Expand Up @@ -104,6 +104,50 @@
</Step>
</Steps>

### Client credentials for programmatic access

If you need machine-to-machine access to your authenticated MCP server without interactive login, you can generate client credentials. Client credentials use the OAuth2 `client_credentials` grant type and are designed for backend services, CI/CD pipelines, and automated workflows that need to query your documentation programmatically.

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/model-context-protocol.mdx#L109

In general, use active voice instead of passive voice ('are designed').

Client credentials bypass the interactive OAuth redirect flow. Instead, your service authenticates directly with a client ID and client secret to obtain an access token.

<Steps>
<Step title="Generate client credentials">
1. Navigate to the [MCP server page](https://dashboard.mintlify.com/products/mcp) in your dashboard.
2. In the **Client credentials** section, click **Generate credentials**.
3. Enter a label for the credential (for example, "Production server").
4. Click **Generate**.
5. Copy the client ID and client secret. The secret is only shown once.
</Step>
<Step title="Request an access token">
Use the client ID and secret to request an access token from your MCP server's token endpoint. You can authenticate using either the request body or an `Authorization: Basic` header.

```bash
curl -X POST https://your-docs-domain.com/mcp/oauth/token \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET"
```

The token endpoint returns an access token:

```json
{
"access_token": "eyJhbG...",
"token_type": "Bearer",
"expires_in": 1209600,
"scope": "mcp:search"
}
```
</Step>
<Step title="Connect to your MCP server">
Use the access token as a Bearer token when connecting to your MCP server. Pass it in the `Authorization` header with any MCP client that supports token-based authentication.
</Step>
</Steps>

<Warning>
Store client secrets securely. Secrets are shown only once when generated. If a credential is compromised, delete it from the dashboard and generate a new one.

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/model-context-protocol.mdx#L148

In general, use active voice instead of passive voice ('are shown').

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/model-context-protocol.mdx#L148

In general, use active voice instead of passive voice ('is compromised').
</Warning>

### Rate limits

To protect availability, Mintlify applies rate limits to MCP servers.
Expand Down
Loading