Implement automatic VS Code installation functionality for the MagicUI CLI, similar to how other tools like Cursor and Windsurf handle their installations. This should provide a seamless setup experience for users who want to use MagicUI with VS Code.
- Create functionality to automatically configure VS Code's MCP (Model Context Protocol) settings
- Target file:
~/Library/Application Support/Code/User/mcp.json (macOS)
- Handle cross-platform paths for Windows and Linux:
- Windows:
%APPDATA%\Code\User\mcp.json
- Linux:
~/.config/Code/User/mcp.json
2. Configuration Format
The MCP configuration should follow this JSON structure:
{
"servers": {
"magicui": {
"command": "npx",
"args": [
"-y",
"@magicuidesign/mcp@latest"
]
}
}
}