Skip to content

Commit 46e779b

Browse files
committed
feat(cli): add mcp subcommand for reliable MCP server invocation
Add `spm mcp` subcommand that starts the MCP server via stdio transport. This allows `npx -y sysprom mcp` to work reliably, since npx cannot resolve secondary binaries from a package. Update marketplace MCP config to use the new subcommand.
1 parent 6bf4fad commit 46e779b

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,7 @@
2727
"mcpServers": {
2828
"sysprom": {
2929
"command": "npx",
30-
"args": [
31-
"-y",
32-
"--package",
33-
"sysprom",
34-
"sysprom-mcp"
35-
]
30+
"args": ["-y", "sysprom", "mcp"]
3631
}
3732
},
3833
"strict": false

src/cli/program.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,10 @@ export const commands: CommandDef[] = [
5454
for (const cmd of commands) {
5555
buildCommander(cmd, program);
5656
}
57+
58+
program
59+
.command("mcp")
60+
.description("Start the SysProM MCP server (stdio transport)")
61+
.action(async () => {
62+
await import("../mcp/server.js");
63+
});

0 commit comments

Comments
 (0)