MCP 实战 + OAuth Dynamic Client Registration
预计阅读 13 分钟
MCP 实战 + OAuth Dynamic Client Registration#
opencode 接 MCP 比 Claude Code 少一步——它自带 OAuth Dynamic Client Registration,接 GitHub / Linear / Atlassian 这种 OAuth 协议的 MCP 服务时不用你手工去开发者后台注册 client_id。
0. 5 分钟搞清 opencode 的 MCP 命令族#
bash
opencode mcp --help输出:
text
opencode mcp add [name] add an MCP server
opencode mcp list list MCP servers and their status
opencode mcp auth [name] authenticate with an OAuth-enabled MCP server
opencode mcp logout [name] remove OAuth credentials for an MCP server
opencode mcp debug <name> debug OAuth connection for an MCP server5 个动词,干 5 件事:
| 动词 | 用途 | 何时跑 |
|---|---|---|
add | 注册一个新 MCP server | 第一次接入 |
list | 看已注册 + 状态 | 排查 / 总览 |
auth | 对 OAuth-required 的 server 跑授权 | OAuth server 首次接入或 token 过期 |
logout | 删除 OAuth credentials | 换号 / 撤权 |
debug | 看 OAuth handshake trace | 接不上时排查 |
预览到此为止 — 你已阅读 8 / 45 段 (18%)
剩余 37 段完整内容购买后解锁 · 「MCP 实战 + OAuth Dynamic Client Registration」属于《企业级 AI Native 开发实战》
原价 ¥999限时验证价
验证期价格,售完恢复 ¥999
点击解锁会先引导你完成登录查看完整目录 →
