Skip to content

Commit 36d59fa

Browse files
kulvirgitclaude
andcommitted
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) <noreply@anthropic.com>
1 parent 3b6d5d4 commit 36d59fa

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

packages/opencode/src/command/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import PROMPT_FEEDBACK from "./template/feedback.txt"
1111
// altimate_change start — configure commands for external AI CLIs
1212
import PROMPT_CONFIGURE_CLAUDE from "./template/configure-claude.txt"
1313
import PROMPT_CONFIGURE_CODEX from "./template/configure-codex.txt"
14+
import PROMPT_DISCOVER_MCPS from "./template/discover-and-add-mcps.txt"
1415
// altimate_change end
1516
import { MCP } from "../mcp"
1617
import { Skill } from "../skill"
@@ -67,6 +68,7 @@ export namespace Command {
6768
// altimate_change start
6869
CONFIGURE_CLAUDE: "configure-claude",
6970
CONFIGURE_CODEX: "configure-codex",
71+
DISCOVER_MCPS: "discover-and-add-mcps",
7072
// altimate_change end
7173
} as const
7274

@@ -130,6 +132,15 @@ export namespace Command {
130132
},
131133
hints: hints(PROMPT_CONFIGURE_CODEX),
132134
},
135+
[Default.DISCOVER_MCPS]: {
136+
name: Default.DISCOVER_MCPS,
137+
description: "discover MCP servers from external AI tool configs and add them",
138+
source: "command",
139+
get template() {
140+
return PROMPT_DISCOVER_MCPS
141+
},
142+
hints: hints(PROMPT_DISCOVER_MCPS),
143+
},
133144
// altimate_change end
134145
}
135146

.opencode/command/discover-and-add-mcps.md renamed to packages/opencode/src/command/template/discover-and-add-mcps.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
---
2-
description: "Discover MCP servers from external AI tool configs and add them permanently"
3-
---
4-
51
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.
62

73
## Instructions

0 commit comments

Comments
 (0)