anthropics / anthropics/claude-agent-sdk-python

MCP Servers with OAuth are failing at startup

Ouverte
#128 1 commentaire 2 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
Python
Étoiles
8.1k
Forks
1.3k
Merge moyen
2 j 31 min
PR mergées (30 j)
1

Description

Using claude code python sdk with oauth mcp servers doesn't work, and marks them as failed.

Adding here a subset of the initial response received by .query, showing an example of monday-api-mcp (which uses env bearer token), and wix-mcp-remote (using oauth)
`{
"subtype": "init",
"data": {
"type": "system",
"subtype": "init",
"mcp_servers": [
{
"name": "monday-api-mcp",
"status": "connected"
},
{
"name": "wix-mcp-remote",
"status": "failed"
}
],
"model": "claude-opus-4-1",
"permissionMode": "bypassPermissions",
"apiKeySource": "ANTHROPIC_API_KEY"
}
}`

In claude code terminal it works great, as soon as running `claude` the oauth window pop ups.
Also, claude code docs lacks a lot about OAuth flows with MCP servers.

Any ideas how to solve it?

I also though about handling the oauth flow manually and then put the secrets somewhere, but can't find where claude saves and uses them.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.