This page explains the authentication logic in MetaMCP exposed MCP endpoints and helps troubleshoot common OAuth-related issues.
Implementation Reference: The authentication logic described in this page is implemented in apps/backend/src/middleware/api-key-oauth.middleware.ts
.
enable_api_key_auth: false
, enable_oauth: false
Behavior:
enable_api_key_auth: true
, enable_oauth: false
Behavior:
X-API-Key
header or query parameterenable_api_key_auth: true
, enable_oauth: true
Behavior:
enable_api_key_auth: false
, enable_oauth: true
Behavior:
X-API-Key
headerX-API-Key
header or api_key
query parameterAuthorization: Bearer
header