This is an implementation of the Model Context Protocol server for Cursor.ai integration, allowing Claude to interact with the Cursor code editor.
- Real-time code indexing and analysis
- Bi-directional communication with Claude
- Support for multiple concurrent sessions
- Automatic reconnection handling
- Comprehensive error handling and logging
- TypeScript implementation with full type safety
npm install @modelcontextprotocol/cursor-mcp
import CursorMCP from '@modelcontextprotocol/cursor-mcp';
const cursorMcp = new CursorMCP('ws://localhost:3000');
// Start the MCP server
await cursorMcp.start();
// Stop the server when done
await cursorMcp.stop();
The server can be configured through the cursor.config.ts
file, which includes settings for:
- Code analysis rules
- Context sharing parameters
- Agent crosstalk settings
- Indexing configuration
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode
npm run dev
# Run tests
npm test
# Run linter
npm run lint
# Format code
npm run format
MIT