前言¶
DSH 采用插件方式扩展能力;插件目录页属于独立社区站点,与 DeepSeek、幻方没有官方从属关系。
给 DSH 接入需要登录态的外部 MCP 服务时,通常会遇到几个问题:OAuth 2.1 授权、动态客户端注册、浏览器回调、令牌保存、断线重连,以及 MCP 工具发现、注册和执行。dsh-oauth-mcp-client 是面向这些问题提供的客户端插件,内置了连接 Springbrand 生产 MCP Gateway 的配置。
这是什么¶
springbrand-lab 维护的 @dsh-external/dsh-oauth-mcp-client,package.json 中的版本是 0.1.0,许可证为 MIT。
它是一句定位清晰的 DSH 客户端插件:OAuth 2.1 Streamable HTTP MCP client plugin for DeepSeek Harness。
已核实的关键信息包括:
- OAuth state 通过 DSH credential service 存储,不存储在这个仓库中。
- 内置配置连接 Springbrand 生产 MCP Gateway,默认
serverName是springbrand,URL 是https://connector.springbrand.ai/mcp。 src/connection.ts和src/tools.ts改编自 DeepSeek Harness 的@deepseek-ai/dsh-mcp-client,许可证为 MIT。
核心功能¶
下面这些能力来自已核实资料:
- OAuth 2.1 authorization code flow with PKCE
- Dynamic OAuth client registration
- Browser login with a loopback callback
- Token and client metadata storage through the DSH credential service
- Streamable HTTP transport with automatic reconnects
- MCP tool discovery, registration, and execution
- DSH Web connection management with live status and capability discovery
- One-click persistent connection setup followed by browser OAuth
将插件 bundle 加入 DSH profile 后,会同时添加内置的 Springbrand MCP connection;不需要再单独执行 MCP 注册步骤。
安装与启用¶
先准备运行环境:
- Node.js 22.19 or later
- Git
- A browser for the first OAuth login
该仓库没有发布到 npm,当前安装使用本地 checkout。
第一步,克隆仓库并完成本地构建:
git clone https://github.com/springbrand-lab/dsh-oauth-mcp-client.git
cd dsh-oauth-mcp-client
corepack enable
pnpm install
pnpm build
第二步,把本地插件安装到 DSH 的 web profile,并启动 DSH Web:
PLUGIN_DIR="$PWD"
npx --yes @deepseek-ai/dsh@latest plugin --profile web add "$PLUGIN_DIR"
npx --yes @deepseek-ai/dsh@latest web
首次启动会打开浏览器完成 Springbrand 登录和 OAuth 授权。授权完成后,打开 Settings → Plugins → MCP Connections,可以看到连接状态和已注册能力。
典型用法¶
下面是一个可以直接对 agent 使用的请求:
Search the Springbrand marketplace for resources and list the first 10.
也可以通过内置工具验证连接状态:
mcp__springbrand__search_capabilities
mcp__springbrand__execute_capability
调用 mcp__springbrand__execute_capability 时,需要使用 mcp__springbrand__search_capabilities 返回的完整名称,例如:
platform:springbrand@0:springbrand.resources.list
不要把它替换成较短的 action_id,例如:
springbrand.resources.list
在 DSH Web 中也可以管理连接:打开 Settings → Plugins → MCP Connections,输入唯一的 server name 和服务器的 HTTPS MCP URL,然后选择 Add and sign in,在打开的浏览器中完成 OAuth 流程。
这个操作会把连接写入持久配置:
~/.dsh/profiles/web/cordis.patch.yml
重启 DSH 后连接仍然保留;这里没有临时 --patch 命令。
内置默认配置¶
已核实的内置默认值包括:
serverName:springbrandurl:https://connector.springbrand.ai/mcpcredentialRef:SPRINGBRAND_MCP_OAUTH_PRODUCTIONcallbackPort:0authorizationTimeoutMs:300000toolCallTimeoutMs:60000failOnStartupError:truereconnect:enabled
其中 callbackPort 为 0 表示选择空闲端口;callback listener 绑定到本地 loopback interface。
适用场景与注意¶
这个插件适合需要让 DSH 通过 OAuth 2.1 连接外部 Streamable HTTP MCP 服务,或需要接入 Springbrand 生产 MCP Gateway 的场景。
安装和使用时需要注意:
- 插件以当前
dsh进程权限运行;安装前建议检查源码、依赖和许可证。 - OAuth state 通过 DSH credential service 存储,不在这个仓库中。
- 不要手动配置
Authorizationheader;OAuth client 负责它。 - 不要提交 access token、refresh token 或导出的 credential data。
- 许可证为 MIT;
src/connection.ts和src/tools.ts基于 MIT License 从@deepseek-ai/dsh-mcp-client改编而来。