anthropics / anthropics/claude-ai-mcp

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

Aperta
#43 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
auth enhancement
Lingua principale
Nessun dato sulla lingua
Stelle
471
Fork
77
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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_

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.