#9689·logto

bug: Can't connect Logto MCP via MCP gateways (e.g. cloudflare)

Author: LaimonasCallsyAiCreated Sep 30, 2026Updated Sep 30, 2026
Labelsbug

Describe the bug

The Logto Cloud MCP server (https://mcp.logto.io) can't be used behind a hosted MCP gateway such as Cloudflare Zero Trust MCP Server Portals.

  • The authorization server https://auth.logto.io/oidc supports neither Dynamic Client Registration (RFC 7591) nor Client ID Metadata Documents, so the gateway can't register its own OAuth client.
  • The only available client is the public mcp-client, which only accepts localhost redirect URIs.
  • Requests using the gateway's callback (https://oauth-callbacks.cloudflareaccess.com/cdn-cgi/access/outbound-oauth-callback) are rejected with HTTP 400 at /oidc/auth.
  • As a result, the OAuth flow can't complete and the server can't be added to the portal.
  • Other providers work in the same portal. Loops connects through CIMD.

Expected behavior

A hosted MCP client or gateway can complete the OAuth flow against https://mcp.logto.io using any one of these:

  1. Client ID Metadata Documents, per the MCP authorization spec (preferred).
  2. Dynamic Client Registration via a registration_endpoint in the auth server metadata.
  3. As a minimum, https://oauth-callbacks.cloudflareaccess.com/cdn-cgi/access/outbound-oauth-callback added to the allowed redirect URIs of mcp-client.

How to reproduce?

  1. Check the protected resource metadata. It lists https://auth.logto.io/oidc as the authorization server: curl https://mcp.logto.io/.well-known/oauth-protected-resource
  2. Check the authorization server metadata. It has no registration_endpoint and no client_id_metadata_document_supported: curl https://auth.logto.io/oidc/.well-known/openid-configuration
  3. Start an authorization request for mcp-client with Cloudflare's callback. It returns 400: curl -i "https://auth.logto.io/oidc/auth?client_id=mcp-client&response_type=code&scope=openid&resource=https%3A%2F%2Fmcp.logto.io%2F&code_challenge=abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqr&code_challenge_method=S256&redirect_uri=https%3A%2F%2Foauth-callbacks.cloudflareaccess.com%2Fcdn-cgi%2Faccess%2Foutbound-oauth-callback"
  4. Repeat step 3 with redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fcallback. It returns 303 to sign-in, so only localhost callbacks are accepted.
  5. Or reproduce it in Cloudflare: Zero Trust → Access → AI Controls → MCP Servers → add https://mcp.logto.io with OAuth auth, attach it to a portal, then connect. The authorization step fails.

Environment

Logto Cloud

Screenshots

No response