From 91010d4632b87d0d8281d51c6b1a608e47817fa8 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Thu, 9 Apr 2026 00:50:11 +0000 Subject: [PATCH] docs: add client credentials for programmatic MCP access Generated-By: mintlify-agent --- ai/model-context-protocol.mdx | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/ai/model-context-protocol.mdx b/ai/model-context-protocol.mdx index ec93468d2..cfaab8d1a 100644 --- a/ai/model-context-protocol.mdx +++ b/ai/model-context-protocol.mdx @@ -104,6 +104,50 @@ By default, your MCP server is only available for localhost tools. To allow web- +### 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. + +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. + + + + 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. + + + 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" + } + ``` + + + 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. + + + + + 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. + + ### Rate limits To protect availability, Mintlify applies rate limits to MCP servers.