dsh-vercel-mcp
v0.1.1
Published
Vercel MCP connection for DeepSeek Harness: official OAuth 2.0 flow (dynamic client registration + PKCE) against mcp.vercel.com, Vercel API tools under mcp__vercel__*, and a web settings panel
Maintainers
Readme
English | 中文
dsh-vercel-mcp
DeepSeek Harness (DSH) 的 Vercel MCP 连接插件:官方 Vercel API MCP 服务器(mcp.vercel.com)+ 完整的 OAuth 2.0 客户端流程(动态客户端注册、PKCE S256、回调挂在 GUI 自己的 Web 服务上、refresh_token 自动续期)+ 可视化设置面板。
授权后,Vercel 平台的全部工具(部署、项目、域名、环境变量、DNS 记录、
部署代码等)就会以 mcp__vercel__* 形式出现在会话中,遇 401 自动刷新令牌。
为什么自建
DSH 自带的 @deepseek-ai/dsh-mcp-client 只支持静态 headers,无法完成
mcp.vercel.com 要求的 OAuth 流程(WWW-Authenticate: Bearer realm="OAuth")。
本插件基于官方 @modelcontextprotocol/sdk 原语自己实现了 OAuth 客户端,
连接是真实授权,而不是手动贴 token。
安装
# 本地开发(link)
dsh plugin --profile web add link:/path/to/dsh-vercel-mcpbundle 补丁会自动挂上插件行,重启 Host 后生效。令牌存
~/.dsh/dsh-vercel-mcp.json(权限 0600)。
授权方式
两条路,都走同一个 Vercel OAuth 流程:
- 设置面板(Web GUI → 设置 → Vercel MCP):点「开始授权」, 浏览器打开 Vercel 授权页,授权后自动回调完成;「测试连接」列出发现的工具。
- 对话里:让 agent 执行
vercel_mcp_oauth_start,打开返回的authorizeUrl;或把回调地址里的code交给vercel_mcp_oauth_finish。
工具
Agent 侧辅助工具:
| 工具 | 作用 |
|---|---|
| vercel_mcp_status | 授权 + 连接状态、工具数量(不泄露密钥) |
| vercel_mcp_oauth_start | 开始 OAuth 流程,返回浏览器授权链接 |
| vercel_mcp_oauth_finish | 手动粘贴 code 的兜底方式 |
| vercel_mcp_test | 连接并列出 MCP 服务器全部工具 |
| vercel_mcp_clear | 清除凭据并断开 |
另有 MCP 服务器自身的工具,名为 mcp__vercel__*。
API 路由
全部仅限本机回环(127.0.0.1),OAuth 回调除外(需接受 mcp.vercel.com 的跨站跳转,但仍校验 OAuth state):
GET /api/dsh-vercel-mcp/statusPOST /api/dsh-vercel-mcp/oauth/startGET /api/dsh-vercel-mcp/oauth/callback(浏览器落地页)POST /api/dsh-vercel-mcp/oauth/finishPOST /api/dsh-vercel-mcp/oauth/refreshPOST /api/dsh-vercel-mcp/testPOST /api/dsh-vercel-mcp/clear
开发
pnpm install
npm run typecheck
npm run test # 离线 store/provider 冒烟
DSH_VERCEL_MCP_LIVE=1 npm run test # 对 mcp.vercel.com 的真实 OAuth 第一阶段
npm run build # tsc 声明 + tsdown(lib/ + lib/client.js)License
MIT
