feat(cli): add Cursor IDE integration to init command #42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π― Add Cursor Integration Support to MXCP CLI
This PR adds comprehensive Cursor support to the
mxcp initcommand, providing feature parity with the existing Claude Desktop integration. Users can now automatically configure MXCP servers for use with Cursor IDE through the same streamlined setup process.β¨ Features
.cursor/mcp.json) and global (~/.cursor/mcp.json) installationcursor://anysphere.cursor-deeplink/mcp/installprotocol for easy team sharingπ Implementation Details
Core Functions Added (
src/mxcp/cli/init.py):detect_cursor_installation()- Cross-platform Cursor detection with PATH and config directory discoverygenerate_cursor_config()- Reuses Claude Desktop config format (both use MCP protocol)generate_cursor_deeplink()- Creates installation deeplinks with proper base64 encodinginstall_cursor_config()- Handles installation with existing config mergingConfiguration Format:
cursor://anysphere.cursor-deeplink/mcp/install?config=<base64>formatπ§ͺ Testing
tests/test_cli_init.pyπ Documentation
docs/guides/integrations.md): Added complete Cursor section with automatic/manual setup instructionsπ§ Example Usage
Generated Deeplink Example:
π‘ Design Decisions
cursor://anysphere.cursor-deeplink/mcp/installformat based on Cursor documentationπ Backwards Compatibility
mxcp initbehavior unchanged when users don't select Cursor optionπ¦ Files Changed
src/mxcp/cli/init.py- Core implementationtests/test_cli_init.py- Comprehensive test coveragedocs/guides/integrations.md- DocumentationREADME.md- Updated integration listexamples/*/README.md- Example integration instructions