Skip to content

Commit 7505621

Browse files
feat(cli): added open code to mcps (#1573)
* feat(mcp): added open code to mcps * chore: update tsdown --------- Co-authored-by: Sadegh Barati <sadeghbaratiwork@gmail.com>
1 parent f6ee585 commit 7505621

File tree

4 files changed

+271
-211
lines changed

4 files changed

+271
-211
lines changed

packages/cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
"undici": "^7.16.0",
9595
"vue-metamorph": "^3.3.3",
9696
"zod": "catalog:",
97-
"zod-to-json-schema": "^3.24.6"
97+
"zod-to-json-schema": "^3.25.0"
9898
},
9999
"devDependencies": {
100100
"@types/fs-extra": "^11.0.4",
@@ -103,7 +103,7 @@
103103
"@types/semver": "^7.7.1",
104104
"@types/stringify-object": "^4.0.5",
105105
"msw": "^2.12.2",
106-
"tsdown": "^0.15.12",
106+
"tsdown": "^0.16.6",
107107
"type-fest": "^5.2.0",
108108
"typescript": "catalog:"
109109
}

packages/cli/src/commands/mcp.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,21 @@ command = "npx"
6868
args = ["shadcn-vue@${SHADCN_MCP_VERSION}", "mcp"]
6969
`,
7070
},
71+
{
72+
name: 'opencode',
73+
label: 'Opencode',
74+
configPath: 'opencode.json',
75+
config: {
76+
$schema: 'https://opencode.ai/config.json',
77+
mcp: {
78+
shadcnVue: {
79+
type: 'local',
80+
enabled: true,
81+
command: ['npx', `shadcn-vue@${SHADCN_MCP_VERSION}`, 'mcp'],
82+
},
83+
},
84+
},
85+
},
7186
] as const
7287

7388
const DEPENDENCIES = [`shadcn-vue@${SHADCN_MCP_VERSION}`]
@@ -93,7 +108,7 @@ export const mcp = new Command()
93108
})
94109

95110
const mcpInitOptionsSchema = z.object({
96-
client: z.enum(['claude', 'cursor', 'vscode', 'codex']),
111+
client: z.enum(['claude', 'cursor', 'vscode', 'codex', 'opencode']),
97112
cwd: z.string(),
98113
})
99114

0 commit comments

Comments
 (0)