Repository navigation
[Feature Request] MCP 客户端缺少 OAuth 2.0 支持(PKCE/动态注册/令牌刷新),无法直连强制 OAuth 的远程 MCP 服务器(如 Atlassian Remote MCP)——工程化必需 #2017
Replies: 6 comments 1 reply
|
MCP 缺 OAuth 2.0(PKCE/动态注册/令牌刷新)——远程 MCP 服务器强制 OAuth 的越来越多(Atlassian 这类),纯静态请求头确实不够工程化。 MCP 接入的工程边界第 9 章有讨论,OAuth 是下一块要补的:https://github.com/Electricitysheep/dsh-handbook/blob/main/docs/09-mcp-subagent-workflow.md |
|
To help discovery for English-speaking people and agents, here is a google translate dump of the original post.
Also, +1 :) |
|
这个场景现在可以不再自建 OAuth 转发桥。我们已经用 安装仍然只用 DSH 官方插件命令: dsh plugin --profile web add pi2dsh
dsh plugin --profile web add pi-mcp-adapter重启后,在标准 刚完成的真实验收不是 mock:Atlassian 授权服务器发现、动态客户端注册、PKCE、 这是一条现在即可安装的生态兼容路径,不代表官方 项目与复现步骤: |
|
+1,同样的场景又踩了一次,补充一个独立复现案例,供跟踪参考。 背景: 确认结论:
看到 @weijiafu14 提到的 |
|
感谢你愿意实际验证这条路径。你描述的正是我们完整跑过的场景,不只是确认命令能够挂载:Atlassian 授权服务器发现、动态客户端注册、PKCE、本地浏览器回调、token 安全存储与刷新、MCP 重连、工具目录发现,以及 DSH Agent 的真实工具调用都走完了端到端闭环。 为了避免不同版本的命令或配置细节产生偏差,可以直接让你的 Agent 按仓库里的可复现示例执行:
这条路线保留的是原 如果你的环境里遇到问题,直接在这里继续回复即可。最好附上 DSH、pi2dsh、pi-mcp-adapter 的版本,以及 |
|
又一个独立案例 + 一个零代码过渡方案,今天(2026-10-09)端到端实测跑通,补充给后续跟踪的同学。 1. 服务端证据:规范的 OAuth 已完全就绪目标服务器
也就是说服务端完全符合 MCP Authorization 规范,缺口 100% 在客户端。 2. 客户端缺口仍然存在(当前桌面版实测)从 app.asar 里的 dsh-mcp-client 运行时代码确认,streamable-http transport 仍然只传静态 headers、没有 authProvider:
配置 schema(transport/serverName/url/headers/toolCallTimeoutMs/…)也没有任何 OAuth 字段——与 @lastorder 在 dsh-mcp-client@0.1.1-rc.2 的类型确认一致。 3. 过渡方案:mcp-remote stdio 桥(无需自写桥接代码)比 600 行自建桥更省事的通用做法——harness 的 stdio transport 原生支持: - insert:
- id: mcp-composio
name: "@deepseek-ai/dsh-mcp-client"
config:
serverName: composio
transport: stdio
command: /opt/homebrew/bin/mcp-remote
args:
- https://connect.composio.dev/mcp
- "--auth-timeout"
- "120"
env:
HOME: !!js process.env.HOME
PATH: /opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin( 实测结果(2026-10-09):
4. 期望落地形态(呼应主帖)
English TL;DR: confirmed on today's desktop build — dsh-mcp-client still wires StreamableHTTPClientTransport with static headers only (no authProvider, no OAuth config fields), while connect.composio.dev/mcp advertises fully spec-compliant OAuth (RFC 9728 metadata, RFC 7591 dynamic registration, PKCE public client). Interim zero-code workaround: run mcp-remote over the harness's stdio transport (config above), verified end-to-end today — browser auth once, token cached in ~/.mcp-auth, silent reconnect afterwards. Native authProvider wiring would close the gap permanently. |
Uh oh!
There was an error while loading. Please reload this page.
问题
dsh-mcp-client目前只支持 stdio / streamable-http 两种传输 + 静态请求头,完全没有 OAuth 2.0 客户端能力(授权码 + PKCE、RFC 8414 discovery、RFC 7591 动态客户端注册、令牌存储与刷新均缺失;源码 lib/index.js 确认,插件 inject 仅 ['tools'])。而 2026 年官方远程 MCP 服务器基本全部强制 OAuth(Atlassian Remote MCP / mcp.atlassian.com 返回 401 + WWW-Authenticate),DSH 因此无法直接接入任何这类官方 MCP。
复现
期望
按 MCP 规范的 OAuth Authorization 章节(modelcontextprotocol/specification)实现内置 OAuth 2.0 client:
工程价值
All reactions