anthropics / anthropics/claude-ai-mcp

Support explicit OAuth/No auth choice for MCP servers with mixed authentication

Offen
#43 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
auth enhancement
Vorherrschende Sprache
Keine Sprachdaten
Sterne
471
Forks
77
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Problem Statement

Some MCP servers allow unauthorised access to their tools, applying rate limits for unauthenticated users. When adding such a server to Claude, it is not clear how the auth flow will work. It seems that, by default, if the tool definitions/tool handlers are public, Claude will not trigger the auth flow even though the `/.well-known/oauth-authorization-server` endpoint is present. This leads to an unclear and unpredictable user experience when limits are reached and the server starts responding with 401 codes.

Having tool definitions/handlers public for certain limits is very helpful for most MCP server builders, as it enables demo capabilities without introducing complex URL or query parameter structures.

Example server with such an auth model:
`https://api.keenable.ai/mcp`

### Proposed Solution

Add an explicit `Auth` dropdown with `OAuth` and `No Auth` options to make the expected flow more predictable. If `OAuth` is selected, perform the appropriate authentication flow and fail early if any required server-side settings are missing. If `No Auth` is selected, attempt to use the tools directly and fail if authentication is required by the server.

For instance, ChatGPT has such a logic.

Image

### Alternatives Considered

We also tried manually creating an OAuth client and providing the client ID when adding the connector, but that still didn’t trigger the OAuth flow.

### Area

MCP Connector (adding/managing servers)

### Priority

Medium - Would be helpful

### Additional Context

_No response_

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.