-
Notifications
You must be signed in to change notification settings - Fork 13
fix: unify MCP --editor flag to use --as for consistency #256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -139,8 +139,8 @@ prpm install @org/my-mcp-server | |||||
| prpm install @org/my-mcp-server --global | ||||||
|
|
||||||
| # Install for a specific editor | ||||||
| prpm install @org/my-mcp-server --editor cursor | ||||||
| prpm install @org/my-mcp-server --editor vscode --global | ||||||
| prpm install @org/my-mcp-server --as cursor | ||||||
| prpm install @org/my-mcp-server --as vscode --global | ||||||
| ``` | ||||||
|
|
||||||
| ## MCP Servers + PRPM Collections | ||||||
|
|
@@ -185,7 +185,7 @@ If you're looking for existing MCP servers to use (not publish), these catalogs | |||||
| </Accordion> | ||||||
|
|
||||||
| <Accordion title="Which editors are supported?"> | ||||||
| PRPM can install MCP server configs for Claude Code, Cursor, VS Code, Codex, Windsurf, Gemini, Kiro, OpenCode, Trae, Amp, and Zed. Use the `--editor` flag to target a specific editor. | ||||||
| PRPM can install MCP server configs for Claude Code, Cursor, VS Code, Codex, Windsurf, Gemini, Kiro, OpenCode, Trae, Amp, and Zed. Use the `--as` flag to target a specific editor (e.g., `--as cursor`). | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: The FAQ answer now tells users to "Use the Severity Level: Major
|
||||||
| PRPM can install MCP server configs for Claude Code, Cursor, VS Code, Codex, Windsurf, Gemini, Kiro, OpenCode, Trae, Amp, and Zed. Use the `--as` flag to target a specific editor (e.g., `--as cursor`). | |
| PRPM can install MCP server configs for Claude Code, Cursor, VS Code, Codex, Windsurf, Gemini, Kiro, OpenCode, Trae, Amp, and Zed. Use the `--editor` flag to target a specific editor (e.g., `--editor cursor`). |
Steps of Reproduction β
1. Read the FAQ in `public-documentation/guides/mcp-servers.mdx:187-189` (Final File
State). The "Which editors are supported?" answer explicitly instructs: "Use the `--as`
flag to target a specific editor (e.g., `--as cursor`)."
2. Following this guidance, run an MCP server install such as `prpm install
@org/my-mcp-server --as cursor`. This invokes the `install` command defined in
`packages/cli/src/commands/install.ts:1926-2000`, where the action handler derives
`convertTo = (options.format || options.as)` and passes `as: convertTo` and `editor:
mcpEditor` into `handleInstall()` (lines 1946-1957 and 1987-2000).
3. In `handleInstall()` (same file, lines 483-509), for an MCP package (`pkg.format ===
'mcp'`), `isMCPServerPackage` is true, `options.as` is `'cursor'`, and `format` is set to
`'cursor'`. The conversion block at lines 528-540 then sees `options.as` set and `format
!== pkg.format` and proceeds to perform format conversion.
4. The conversion logic (lines 653-690) computes `sourceFormat = 'mcp'`, but the switch
has no branch for `'mcp'`, so it hits the `default` clause at 688-690, throwing
`CLIError("Unsupported source format for conversion: mcp")`. As a result, using `--as`
exactly as the FAQ recommends causes MCP installs to fail, while using `--editor` (which
avoids setting `options.as`) allows the special MCP server path at lines 939-1001 to run
successfully.Prompt for AI Agent π€
This is a comment left during a code review.
**Path:** public-documentation/guides/mcp-servers.mdx
**Line:** 188:188
**Comment:**
*Possible Bug: The FAQ answer now tells users to "Use the `--as` flag to target a specific editor", but for MCP servers the CLI still relies on the `--editor` option and using only `--as` with `mcp` packages will attempt an unsupported format conversion and fail, so this guidance is incorrect.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: In the MCP servers guide, the "Install for a specific editor" examples now use
--asto choose the editor, but the CLI still uses the--editoroption for MCP editor selection and--ascauses conversion ofmcppackages, so these commands will not behave as documented. [possible bug]Severity Level: Majorβ οΈ
Steps of Reproduction β
Prompt for AI Agent π€