Repository navigation
技能仓库支持 MCP 服务,Codex 加载 MCP 技能 - #129
Merged
Merged
Conversation
- 目录同步识别插件声明的 MCP(plugin.json 的 mcpServers 或插件目录 .mcp.json),
登记为 MCP 技能,配置加密保存、以仓库为准;含 SKILL.md 的插件仍按 Git 技能处理
- MCP 配置校验抽到 skill_policy,管理台编辑与仓库同步共用
- Codex 驱动每轮把工作目录 .mcp.json 转成 -c mcp_servers.skill_<名字>={...},
stdio 服务经 env_vars 拿到员工环境变量,明文 env 走进程环境不进命令行
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
背景
技能仓库原来只能放 Git 技能;MCP 技能只能在管理台手工登记,而且 Codex 驱动不读工作目录的
.mcp.json,跑 Codex 的 AI 员工装了 MCP 技能也用不上。改动
目录同步
plugin.json的mcpServers可以是对象,也可以是插件内的相对路径;都没写时读插件目录的.mcp.json。这样的插件登记为 MCP 技能,配置加密保存。SKILL.md时仍按 Git 技能处理,已有技能仓库不受影响。SkillIn移到skill_policy.mcp_config,管理台和同步共用。Codex 驱动
.mcp.json,每个服务转成-c mcp_servers.skill_<名字>={...}。加skill_前缀是因为-c会深度合并:节点全局配置里如果有同名但传输方式不同的服务,Codex 会直接拒绝启动(已实测)。COREMAN_开头的除外)通过env_vars透传,${同名变量}也走这条路;明文 env 经进程环境传入,不出现在命令行;cwd设为工作目录。Authorization: Bearer ${X}转为bearer_token_env_var,${X}形式的请求头转为env_http_headers。${...}写法会跳过该服务并记节点日志,不影响本轮其它功能。.mcp.json(已用claude -p实测,source=project,connected)。验证
go test ./...全部通过;新增用例覆盖 stdio/http 转换、密钥不进命令行、不支持的写法被跳过、符号链接被忽略、续聊时同样挂载。pytest -n 6:3031 通过;test_gateway_wecom有 1 个用例在并行下偶发失败,单独重跑通过,与本改动无关。发布
无数据库迁移。Codex 侧要等运行时节点升级后才生效。
🤖 Generated with Claude Code