Repository navigation
fix(mcp): allow SSE servers for OpenCode - #987
Merged
Merged
Conversation
Yong-yuan-X
marked this pull request as ready for review
October 6, 2026 15:12
Yong-yuan-X
force-pushed
the
fix/984-opencode-sse
branch
from
October 6, 2026 16:09
18c9e9b to
9679827
Compare
|
未发现需要报告的问题。 PR 描述已包含构建后的真实 CLI 端到端验证记录,满足运行时行为变更的测试要求。 |
jeff-r2026
approved these changes
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
团队 MCP 配置声明
transport: sse时,TeamAI 会错误地以opencode does not support sse transport为由跳过 OpenCode,导致服务器未安装。本次将 SSE 加入 OpenCode 的传输支持列表,复用现有远程服务器渲染逻辑,将其写入
opencode.json的mcp键下,使用type: "remote"。同步更新中英文使用指南。OpenCode 的 type: "remote" 连接逻辑按 Streamable HTTP、SSE 的顺序尝试传输,因此 TeamAI 的 http 和 sse 均可复用现有远程配置形态。参见 OpenCode 上游实现。Type of Change
Test Plan
node node_modules/typescript/bin/tsc --noEmitnpm run lint通过npm run build通过git diff --check通过针对性回归命令:
node node_modules/vitest/vitest.mjs run src/__tests__/mcp-reconcile.test.ts -t 'OpenCode|sse' --maxWorkers=1 --reporter=dot结果:8 项通过,236 项未匹配筛选条件而跳过。修复前,新增的 SSE 用例能够复现错误跳过的问题。
构建后 CLI 验证
环境:Windows、Node.js v26.1.0。使用隔离的 HOME/USERPROFILE、本地 git provider 配置和虚构凭据,声明一个 URL 与 header 含变量占位符的 SSE 服务器。
node dist/index.js mcp injectmcp.amap,类型为remote,正确替换 URL/header 变量,保留个人服务器和 instructionsnode dist/index.js mcp listinstalled: opencodemcp injectnode dist/index.js doctor --jsonok: true,OpenCode MCP 交付检查通过node dist/index.js mcp remove本次验证覆盖 TeamAI 的配置交付流程,未连接真实 SSE 服务,也未验证 OpenCode 客户端握手。
Related Issues
Fixes #984
Notes for Reviewers
运行时修改仅涉及 OpenCode 的传输支持列表,继续复用已有的远程配置渲染与归属管理逻辑,无新增命令或共享状态。
已检查 docs(含 designs)及 skill-data 中的相关描述;需要修正的限制说明仅出现在两份使用指南中。本次不改变工作流,因此未修改 skill 正文或 README。