Skip to content

feat(mcp): external agent connect UI + Codex model defaults - #98

Open
Alphaxiaoteng wants to merge 1 commit into
0xsline:mainfrom
Alphaxiaoteng:ui/mcp-guide-redesign
Open

feat(mcp): external agent connect UI + Codex model defaults#98
Alphaxiaoteng wants to merge 1 commit into
0xsline:mainfrom
Alphaxiaoteng:ui/mcp-guide-redesign

Conversation

@Alphaxiaoteng

Copy link
Copy Markdown

摘要

外部 Agent(Claude Code / Codex / Cursor / Antigravity)通过 MCP 接入 OpenChatCut,并提供一键「连接」配置 UI;同时把编辑器左下角模型默认切到 Codex(MCP 后端),移除 BytePlus/API 模型在下拉中的显示与 Q&A (ask) 模式选项。

截图

左下角(模型默认 Codex + Agent 模式):

left-corner

MCP 设置配置 UI(4 客户端一键连接):

mcp-dialog

改动

  • McpGuide UI 改版:官方 logo(Claude Code / Codex / Cursor / Antigravity)+ 每个客户端独立「连接」按钮,服务端 POST /api/external-agent/connect-client 幂等写入客户端配置
  • Codex 401 修复:启动时把系统 ~/.codex/auth.json 播种到隔离 CODEX_HOME(copy-once、0600)
  • 模型选择:Codex 官方模型全部进下拉;pref 优先于 snapshot 默认;无 pref 时默认 Codex(MCP 后端);Codex 可用时隐藏 BytePlus/API 模型
  • Composer:移除 Q&A (ask) 模式选项;左下角模型按钮显示 Codex logo
  • 404 清理:server run 清理不再对重启后的陈旧 run 报 warning
  • mcp.verify:await editor 注册 + 通知超时 2s→30s(修复 flaky)

测试

  • npm test 全绿(exit=0,104 段)
  • tsc / lint / i18n 校验通过
  • 实测:agy CLI 通过 MCP 调用 list_projects 返回真实项目;Claude Code / Cursor 协议握手 + tools/list 全流程通过;三客户端配置文件均正确写入

- McpGuide: redesigned dialog with official client logos and one-click
  'connect' buttons (Claude Code / Codex / Cursor / Antigravity)
- server: POST /api/external-agent/connect-client writes client MCP configs
  (idempotent, atomic, token validation), with verification script
- codex: seed system auth credentials into the isolated CODEX_HOME so the
  Codex CLI talks to OpenAI without 401
- model-selection: Codex official models expand into the composer picker;
  persisted preference wins over snapshot default; composer defaults to
  Codex (MCP backend) when no model was pinned; BytePlus/API models are
  hidden from the picker while Codex is available
- composer: drop the Q&A (ask) mode option; show Codex logo in the corner
  model button
- 404 handling: server run abandon/protocol/stream lifecycle no longer
  warn on stale runs after server restart
- mcp.verify: await editor registration and raise notify timeout to 30s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant