> ## Documentation Index
> Fetch the complete documentation index at: https://tbd-6fc993ce-hypeship-docs-website-deploy-hook.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> Authenticate to the Kernel MCP server with OAuth or an API key

## OAuth (recommended)

The MCP server uses OAuth 2.1 for user authentication. When you connect through supported clients, you're prompted to authorize access via your browser.

## API key authentication

For programmatic access or service-to-service authentication, you can use your Kernel API key instead of OAuth.

Add your API key to the MCP configuration:

```json theme={null}
{
  "mcpServers": {
    "kernel": {
      "url": "https://mcp.onkernel.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_KERNEL_API_KEY"
      }
    }
  }
}
```

The server automatically detects non-JWT tokens and treats them as API keys.

API key authentication is useful for:

* Automated workflows and CI/CD pipelines
* Server-to-server integrations
* Environments where OAuth flows are not practical

<Note>API keys bypass the OAuth flow but still require valid Kernel credentials. Keep your API key secure and don't expose it in client-side code.</Note>
