mcp-auth-proxy icon indicating copy to clipboard operation
mcp-auth-proxy copied to clipboard

feat: advertise logo_uri in authorization server metadata (for MCP client connector icons)

Open pestrov opened this issue 5 months ago • 0 comments

Problem

MCP clients that connect over OAuth — notably Claude.ai custom connectors — render a connector's icon from the logo_uri field in the OAuth Authorization Server Metadata (/.well-known/oauth-authorization-server). mcp-auth-proxy doesn't expose one today, so every connector fronted by the proxy shows the generic/default icon with no way to brand it.

Empirically, a logo_uri pointing at a same-origin image is currently the only reliable way to get a custom connector icon to render in Claude.ai. The MCP-native serverInfo.icons[] (spec 2025-11-25 / SEP-973) isn't honored by Claude.ai yet (anthropics/claude-ai-mcp#152), so logo_uri in the AS metadata is the working path.

Proposal

Add an optional, config-driven logo_uri to the authorization-server metadata response:

  • New flag/env, e.g. --logo-uri / LOGO_URI. When unset, the field is omitted (json:",omitempty") — fully backward-compatible.
  • Surfaced in handleOauthAuthorizationServer (pkg/idp/idp.go), added to the authorizationServerResponse struct.
  • Optionally, a companion public icon route (e.g. --favicon-path / FAVICON_PATH) served unauthenticated alongside /healthz, so logo_uri can resolve same-origin without the operator having to stand up separate hosting. (Today every non-OAuth path is gated, so /favicon.png returns 401 and a same-origin logo can't be served by the proxy itself.)

References

  • RFC 7591 §2 (OAuth 2.0 Dynamic Client Registration) defines logo_uri: "URL string that references a logo for the client. If present, the server SHOULD display this image to the end-user during approval." (Standardized for client metadata; here it would be an extension field of the AS metadata document.)
  • RFC 8414 §2 (OAuth 2.0 Authorization Server Metadata) permits additional metadata parameters beyond the registered set, so an opt-in extension field is spec-compatible.
  • MCP-native mechanism (not yet widely client-supported): SEP-973 / MCP spec 2025-11-25 icons; Claude.ai tracking issue anthropics/claude-ai-mcp#152.

Scope

Small and localized: the metadata struct + handler in pkg/idp/idp.go, plus an optional public route in pkg/mcp-proxy/main.go, with table-driven tests. Default behavior is unchanged when the new config is unset.

Happy to open a PR if this direction sounds good — wanted to check on the approach (env/flag naming, and whether you'd want the built-in favicon route or just logo_uri) before sending code.

pestrov avatar Jun 15 '26 22:06 pestrov