anthropics / anthropics/claude-agent-sdk-python

MCP Servers with OAuth are failing at startup

未关闭
#128 1 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Python
星标
8.1k
派生
1.3k
平均合并
2 天 31 分钟
30 天内合并 PR
1

描述

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.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。