Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR repurposes the MCP command in the CLI to configure a connection to the remote Bucket MCP server while updating the related documentation and code for better error handling and consistency. Key changes include removing redundant schema utility functions, introducing new options (such as --editor and --scope), and refactoring the MCP command logic to prompt users for editor and app selection.
Reviewed Changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/cli/utils/schemas.ts | Removed unused utility functions (withDefaults and withDescriptions) |
| packages/cli/utils/options.ts | Added new editor and scope options; removed the mcpSsePortOption |
| packages/cli/commands/mcp.ts | Overhauled the MCP command to support remote MCP server configuration and interactive prompts |
| packages/cli/commands/init.ts | Simplified app selection by defaulting to the first non-demo app when available |
| packages/cli/README.md | Updated documentation to reflect the new MCP setup process and option changes |
Files not reviewed (1)
- packages/cli/package.json: Language not supported
Comments suppressed due to low confidence (2)
packages/cli/utils/schemas.ts:63
- The removal of the withDefaults and withDescriptions functions may break any downstream usage. Please ensure that these utility functions are no longer referenced anywhere in the codebase or update the references accordingly.
export const withDefaults = <T extends z.ZodRawShape>( ... ) => {
packages/cli/commands/mcp.ts:189
- [nitpick] Consider adding a note or additional comment about the hard-coded 'mcp-remote@next' value to remind maintainers to update it when the remote MCP server becomes stable.
"mcp-remote@next", // todo: remove next once stable
mcp command to setup the remote Bucket MCP connection
roncohen
left a comment
There was a problem hiding this comment.
a few small docs changes, but otherwise looks good to me. I haven't tested the MCP command with all these different clients though, but I'm good to merge if you have.
Co-authored-by: Ron Cohen <ron@bucket.co>
Co-authored-by: Ron Cohen <ron@bucket.co>
Cursor, VS Code, and Claude |
Changes
Repurposed the
mcpcommand to help set up the connection to the remotely hosted Bucket MCP server instead of creating a local MCP server.Kapture.2025-04-29.at.15.48.34.mp4
AI Summary
This pull request includes updates to the
packages/clidocumentation and codebase to improve usability, error handling, and maintainability. The most significant changes involve reordering CLI command arguments for consistency, enhancing error handling in various actions, and updating the MCP setup process to use a remote server.Documentation Updates:
bucket new,bucket features create, and others to place--app-idbefore other options, improving clarity and consistency across the CLI documentation. (packages/cli/README.md: [1] [2] [3]--editorand--scopeto configure editors/clients and clarified compatibility with MCP STDIO and HTTP streaming. (packages/cli/README.md: packages/cli/README.mdL269-R298)Codebase Enhancements:
getAppin multiple actions (e.g.,createFeatureAction,generateTypesAction,featureAccessAction) to handle errors gracefully and provide better feedback to users. (packages/cli/commands/features.ts: [1] [2] [3]path.jstourls.jsand updated imports across affected files to better reflect the file's purpose. (packages/cli/commands/companies.ts: [1]packages/cli/commands/features.ts: [2]Usability Improvements:
initAction: Automatically defaults to the first non-demo app if available and sets it as the default choice in the app selection prompt, streamlining the initialization process. (packages/cli/commands/init.ts: packages/cli/commands/init.tsL45-R53)