rush-ai 0.11.1 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -130,6 +130,8 @@ rush-ai task status <id> --json
130
130
  | `agent info <name>` | 查某个 agent 的描述、技能、MCP 配置 |
131
131
  | `mcp list` / `mcp ls` | 列出 MCP server |
132
132
  | `mcp list-tools <id>` | 列 MCP server 提供的工具 |
133
+ | `mcp install <id>` | 从 Registry 安装 MCP 到 Claude Desktop / Claude Code |
134
+ | `mcp uninstall <id>` | 从 Claude Desktop / Claude Code 移除 MCP |
133
135
  | `mcp serve` | 把 rush-ai 当成 MCP stdio server 启动 |
134
136
 
135
137
  ### 插件分发
@@ -207,6 +209,34 @@ rush-ai plugin install rush --dry-run
207
209
 
208
210
  这条路径和每个 IDE 自己的 `/plugin install` 等价 —— 装完之后 IDE 的 `/plugin list` 能看到、`/plugin uninstall` 也能卸载。不用这条路径就忽略;日常的 `task create` / `task push` 和插件分发完全独立。
209
211
 
212
+ ### MCP 安装
213
+
214
+ ```bash
215
+ # 列出可用的 MCP server
216
+ rush-ai mcp list
217
+
218
+ # 安装到 Claude Desktop + Claude Code(默认两个都装)
219
+ rush-ai mcp install octopus-cli-mcp
220
+
221
+ # 只装到 Claude Desktop
222
+ rush-ai mcp install octopus-cli-mcp --target claude-desktop
223
+
224
+ # 跳过交互 + JSON 输出
225
+ rush-ai mcp install octopus-cli-mcp -y --json
226
+
227
+ # 传入凭证(适合需要 token 的 MCP,两种写法等价)
228
+ rush-ai mcp install bigdata-mcp-server --set refresh_token=xxx groups=basic
229
+ rush-ai mcp install bigdata-mcp-server --set refresh_token=xxx --set groups=basic
230
+
231
+ # 安装未验证的 MCP(需明确确认)
232
+ rush-ai mcp install some-mcp --allow-unverified
233
+
234
+ # 卸载
235
+ rush-ai mcp uninstall octopus-cli-mcp
236
+ ```
237
+
238
+ stdio MCP 写入 `claude_desktop_config.json`;http/sse MCP 写入 `configLibrary`(managed server,工具自动 allow)。安装后需重启 IDE 生效。
239
+
210
240
  ### CI / 脚本
211
241
 
212
242
  ```bash
package/dist/index.js CHANGED
@@ -3915,15 +3915,39 @@ function registerMcpCommand(program) {
3915
3915
  ).option("-y, --yes", "Skip confirmation prompts (use defaults)").option(
3916
3916
  "--target <targets>",
3917
3917
  "Comma-separated targets: claude-desktop,claude-code (default: both)"
3918
- ).option("--allow-unverified", "Allow installing unverified MCP servers").action(async (mcpId, opts) => {
3918
+ ).option("--allow-unverified", "Allow installing unverified MCP servers").option(
3919
+ "--set <key=value...>",
3920
+ "Set credential values (e.g. --set TOKEN=xxx KEY=yyy)"
3921
+ ).action(async (mcpId, opts) => {
3919
3922
  const format = resolveFormat(program.opts());
3920
- const { runMcpInstall, printMcpInstallSummary } = await import("./install-DNSVANLM.js");
3923
+ const { runMcpInstall, printMcpInstallSummary } = await import("./install-AGHG4XKQ.js");
3924
+ let setValues;
3925
+ if (opts.set) {
3926
+ setValues = {};
3927
+ const raw = Array.isArray(opts.set) ? opts.set : [opts.set];
3928
+ for (const rawItem of raw) {
3929
+ const item = String(rawItem);
3930
+ const eqIdx = item.indexOf("=");
3931
+ if (eqIdx === -1) {
3932
+ const msg = `Invalid --set format: "${item}". Use --set KEY=VALUE`;
3933
+ if (format === "json") {
3934
+ output.log(JSON.stringify({ error: msg }, null, 2));
3935
+ } else {
3936
+ output.error(msg);
3937
+ }
3938
+ process.exitCode = 1;
3939
+ return;
3940
+ }
3941
+ setValues[item.slice(0, eqIdx)] = item.slice(eqIdx + 1);
3942
+ }
3943
+ }
3921
3944
  try {
3922
3945
  const result = await runMcpInstall({
3923
3946
  mcpId,
3924
3947
  yes: opts.yes,
3925
3948
  targetRaw: opts.target,
3926
- allowUnverified: opts.allowUnverified
3949
+ allowUnverified: opts.allowUnverified,
3950
+ setValues
3927
3951
  });
3928
3952
  const anyOk = result.targets.some((t) => t.status === "ok");
3929
3953
  const anyError = result.targets.some((t) => t.status === "error");
@@ -3957,7 +3981,7 @@ function registerMcpCommand(program) {
3957
3981
  "Comma-separated targets: claude-desktop,claude-code (default: both)"
3958
3982
  ).action(async (mcpId, opts) => {
3959
3983
  const format = resolveFormat(program.opts());
3960
- const { runMcpUninstall, printMcpUninstallSummary } = await import("./install-DNSVANLM.js");
3984
+ const { runMcpUninstall, printMcpUninstallSummary } = await import("./install-AGHG4XKQ.js");
3961
3985
  try {
3962
3986
  const result = await runMcpUninstall({
3963
3987
  mcpId,