Skip to content

feat(cli): manage MCP through local IPC - #335

Merged
shihuili1218 merged 2 commits into
mainfrom
feat/cli-mcp-control
Nov 13, 2026
Merged

shihuili1218 merged 2 commits into
mainfrom
feat/cli-mcp-control

Conversation

@shihuili1218

Copy link
Copy Markdown
Collaborator

本地 Agent 现在可以执行 rssh mcp start,为已打开的 RSSH 前端开启 MCP 并获取连接 JSON,无需手动打开 MCP 和复制地址、token。stop 停止服务,status 返回开启状态及连接信息;多个候选前端通过返回的 instance / owner 明确选择。

外部 CLI 通过 Unix socket(macOS / Linux)或 Named Pipe(Windows)连接现有宿主,以 #[cfg] + trait 隔离传输差异,共用有长度限制和超时的 JSON 协议。内嵌终端既有通信继续使用 OSC 7337,扩展方式已写入 AGENTS.md。MCP 连接仍使用既有 Streamable HTTP 和终端授权流程。

启停复用现有 MCP 生命周期与前端状态同步。关闭 owner 会取消排队中的启动请求,旧 generation 无法重新创建端点;控制服务失效也不会阻断正常 Headless WebSocket 连接。

入口覆盖:

  • 桌面 GUI:支持现有窗口,包括尚未打开终端的窗口。
  • 移动 GUI:不提供桌面本地控制服务,沿用现有 MCP 能力限制。
  • CLI:仅提供 mcp start / stop / status,结果与错误均为 JSON。
  • Headless / JetBrains:支持已连接的本机前端,连接断开后撤销对应 MCP。

验证:

  • npm test:1402 个测试通过;npm run build 通过。
  • cargo test --workspace --all-features:1002 个测试通过,1 个 doctest 忽略。
  • cargo fmt --all --check、CLI / Tauri / Headless feature checks 通过。
  • macOS 实际 GUI 验证 start / status / stop、重复启停及返回连接的 MCP initialize。
  • 已增加 Windows 原生 Named Pipe CI;本地交叉类型检查通过,Windows 运行结果待 CI。

Copilot AI balanced review requested due to automatic review settings November 13, 2026 10:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T10:35:19.276811Z 848bb5b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@shihuili1218
shihuili1218 merged commit 540e4fc into main Nov 13, 2026
2 checks passed
@shihuili1218
shihuili1218 deleted the feat/cli-mcp-control branch November 13, 2026 13:49
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.

2 participants