From dee4895733b78be441bbe8fd9ae7e5de165322d7 Mon Sep 17 00:00:00 2001 From: kulvirgit Date: Mon, 23 Mar 2026 15:09:44 -0700 Subject: [PATCH] fix: ship discover-and-add-mcps as a builtin command Toast suggests `/discover-and-add-mcps` but the command only existed as a project-level `.opencode/command/` file not shipped with the package. Register it as a hardcoded command with a `.txt` template (same pattern as configure-claude) so it ships with every install. Co-Authored-By: Claude Opus 4.6 (1M context) --- packages/opencode/src/command/index.ts | 11 +++++++++++ .../src/command/template/discover-and-add-mcps.txt | 4 ---- 2 files changed, 11 insertions(+), 4 deletions(-) rename .opencode/command/discover-and-add-mcps.md => packages/opencode/src/command/template/discover-and-add-mcps.txt (87%) diff --git a/packages/opencode/src/command/index.ts b/packages/opencode/src/command/index.ts index 28af2f9b43..3295ebd14e 100644 --- a/packages/opencode/src/command/index.ts +++ b/packages/opencode/src/command/index.ts @@ -11,6 +11,7 @@ import PROMPT_FEEDBACK from "./template/feedback.txt" // altimate_change start — configure commands for external AI CLIs import PROMPT_CONFIGURE_CLAUDE from "./template/configure-claude.txt" import PROMPT_CONFIGURE_CODEX from "./template/configure-codex.txt" +import PROMPT_DISCOVER_MCPS from "./template/discover-and-add-mcps.txt" // altimate_change end import { MCP } from "../mcp" import { Skill } from "../skill" @@ -67,6 +68,7 @@ export namespace Command { // altimate_change start CONFIGURE_CLAUDE: "configure-claude", CONFIGURE_CODEX: "configure-codex", + DISCOVER_MCPS: "discover-and-add-mcps", // altimate_change end } as const @@ -130,6 +132,15 @@ export namespace Command { }, hints: hints(PROMPT_CONFIGURE_CODEX), }, + [Default.DISCOVER_MCPS]: { + name: Default.DISCOVER_MCPS, + description: "discover MCP servers from external AI tool configs and add them", + source: "command", + get template() { + return PROMPT_DISCOVER_MCPS + }, + hints: hints(PROMPT_DISCOVER_MCPS), + }, // altimate_change end } diff --git a/.opencode/command/discover-and-add-mcps.md b/packages/opencode/src/command/template/discover-and-add-mcps.txt similarity index 87% rename from .opencode/command/discover-and-add-mcps.md rename to packages/opencode/src/command/template/discover-and-add-mcps.txt index bd8bf1d137..8d7badf063 100644 --- a/.opencode/command/discover-and-add-mcps.md +++ b/packages/opencode/src/command/template/discover-and-add-mcps.txt @@ -1,7 +1,3 @@ ---- -description: "Discover MCP servers from external AI tool configs and add them permanently" ---- - Discover MCP servers configured in other AI tools (VS Code, Cursor, GitHub Copilot, Claude Code, Gemini CLI) and add them to the altimate-code config. ## Instructions