Setup OIDC
Use this guide to configure OIDC trust for Management MCP (/api/v1/mcp).
What this page covers
- IdP/OIDC settings needed for management MCP access.
- Token expectations and required headers.
- Session bootstrap checks (
initialize+Mcp-Session-Id).
Configure OIDC for management MCP
- Configure your management API OIDC trust:
- issuer URL
- audience
- role claim path
- Ensure role mappings include intended management roles:
viewermodifierauditoradmin
- Keep Management MCP path explicit (
/api/v1/mcpby default). - Expose Management MCP only over TLS.
Request model (important)
- Always send
Authorization: Bearer <OIDC access token>. - Do not send
X-Client-ID/X-Profile-IDto Management MCP. - Use JSON-RPC methods (
initialize,tools/list,tools/call).
Example MCP call
curl -i https://gateway.example.com/api/v1/mcp \
-H "Authorization: Bearer $MCP_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "init-1",
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {},
"clientInfo": {"name":"agent","version":"1.0.0"}
}
}'
Validation checklist
initializereturns200and includesMcp-Session-Id.tools/listwith that session succeeds.- Missing/invalid token returns
401. - Out-of-scope operation returns
403.
Common misconfigurations
- Wrong issuer/audience -> valid-looking token still rejected (
401). - Missing role claim path -> everyone appears unauthorized (
403). - Sending gateway headers to management MCP -> non-standard requests and confusion.