Skip to content

fix(mcp): add CLI help examples and align tool descriptions - #343

Merged
shihuili1218 merged 1 commit into
mainfrom
fix/mcp-help-examples
Nov 16, 2026
Merged

shihuili1218 merged 1 commit into
mainfrom
fix/mcp-help-examples

Conversation

@shihuili1218

Copy link
Copy Markdown
Collaborator

rssh mcp --help 补充从启动服务到执行命令的五步示例:start → 使用返回的 URL 和认证头连接 → list_sessions → open_session → run_command。示例包含必填 JSON 参数、用户授权流程和多前端选择方式,明确操作的是已连接的终端。

MCP 工具描述直接复用 core/src/ai/tools.rs,将会话授权前置条件移到额外的 session_id 参数说明中。共享适配器中的 run_command 和 download_file 描述均与源定义完全一致,已有 HTTP 集成测试改为严格相等断言。

入口影响:

  • 桌面 GUI:MCP 使用统一工具描述,继续通过现有终端授权流程执行。
  • 移动 GUI:不涉及界面或输入方式改动;原生移动宿主仍不提供本地 MCP 服务。
  • CLI:rssh mcp --help 展示完整使用案例。
  • Headless / JetBrains:共用 MCP 适配器,同步使用统一描述;帮助文本覆盖本地 headless/JetBrains 前端。

验证:

  • 实际运行 cargo run -p rssh-cli -- mcp --help,确认帮助输出。
  • npm test:1422 项通过;npm run build 通过。
  • cargo fmt --all --check 通过。
  • cargo test --workspace --all-features:1011 项通过,1 个现有 doctest 忽略,包含 MCP 描述一致性测试。
  • cargo check -p rssh-cli 和 cargo check -p rssh-app --features server --bin rssh-server 通过。
  • git diff --check 通过。

未进行真实外部 MCP 客户端的端到端验证。

Copilot AI balanced review requested due to automatic review settings November 16, 2026 03:38

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 16, 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-16T03:40:37.456897Z 7a62313 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 2a7e4cb into main Nov 16, 2026
2 checks passed
@shihuili1218
shihuili1218 deleted the fix/mcp-help-examples branch November 16, 2026 03:51
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