Cursor MCP Server

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Integration with GitHub Copilot as an MCP provider, allowing users to get code suggestions from Copilot and compare them with other AI services.

커서 MCP(모델 컨텍스트 프로토콜)

Cursor MCP는 Claude의 데스크톱 애플리케이션과 Cursor 편집기를 연결하는 다리 역할을 하며, 원활한 AI 기반 자동화 및 다중 인스턴스 관리를 지원합니다. 더 광범위한 Model Context Protocol(MCP) 생태계의 일부로, Cursor가 표준화된 인터페이스를 통해 다양한 AI 모델 및 서비스와 상호 작용할 수 있도록 지원합니다.

개요

🤖 AI 통합

  • Claude의 데스크톱 애플리케이션과 직접 통합
  • 다른 MCP 호환 AI 서비스를 활용하는 기능
  • AI와 편집자 간 실시간 컨텍스트 공유
  • AI 기반 자동화 및 코드 생성

🔌 MCP 프로토콜 지원

  • AI 모델과의 표준화된 커뮤니케이션
  • 추가 MCP를 위한 확장 가능한 플러그인 시스템
  • 컨텍스트 인식 명령 실행
  • 보안 토큰 기반 인증

🖥️ 크로스 플랫폼 창 관리

  • 운영 체제 전반에서 커서 편집기 창을 원활하게 관리합니다.
  • 프로그래밍 방식으로 창을 초점 맞추고, 최소화하고, 복원하고, 정렬합니다.
  • 창 상태 변경 및 위치 추적
  • 여러 커서 인스턴스를 동시에 처리합니다.

⌨️ 입력 자동화

  • 다음을 지원하는 AI 기반 키보드 입력:
    • 코드 생성 및 삽입
    • 리팩토링 작업
    • 컨텍스트 인식 완성
    • 다중 커서 편집
  • 다음을 포함한 지능형 마우스 자동화:
    • 스마트 선택
    • 컨텍스트 메뉴 작업
    • AI 가이드 내비게이션

🔄 프로세스 관리

  • AI 기반 인스턴스 관리
  • 스마트한 작업 공간 구성
  • 자동 컨텍스트 보존
  • 지능형 세션 복구

MCP 통합

Claude 데스크톱 통합

지엑스피1

여러 MCP 사용

import { MCPRegistry } from 'cursor-mcp/registry' // Register available MCPs MCPRegistry.register('claude', ClaudeMCP) MCPRegistry.register('github-copilot', CopilotMCP) // Use different AI services const claude = await MCPRegistry.get('claude') const copilot = await MCPRegistry.get('github-copilot') // Compare suggestions const claudeSuggestions = await claude.getSuggestions(context) const copilotSuggestions = await copilot.getSuggestions(context)

맞춤형 MCP 통합

import { BaseMCP, MCPProvider } from 'cursor-mcp/core' class CustomMCP extends BaseMCP implements MCPProvider { async connect() { // Custom connection logic } async generateSuggestions(context: CodeContext) { // Custom AI integration } } // Register custom MCP MCPRegistry.register('custom-ai', CustomMCP)

구성

이 도구는 환경 변수나 다음 위치의 구성 파일을 통해 구성할 수 있습니다.

  • 윈도우: %LOCALAPPDATA%\cursor-mcp\config\config.json
  • macOS: ~/Library/Application Support/cursor-mcp/config/config.json
  • 리눅스: ~/.config/cursor-mcp/config.json

구성 예:

{ "mcp": { "claude": { "enabled": true, "apiKey": "${CLAUDE_API_KEY}", "contextWindow": 100000 }, "providers": { "github-copilot": { "enabled": true, "auth": "${GITHUB_TOKEN}" } } }, "autoStart": true, "maxInstances": 4, "windowArrangement": "grid", "logging": { "level": "info", "file": "cursor-mcp.log" } }

설치

윈도우

# Run as Administrator Invoke-WebRequest -Uri "https://github.com/your-org/cursor-mcp/releases/latest/download/cursor-mcp-windows.zip" -OutFile "cursor-mcp.zip" Expand-Archive -Path "cursor-mcp.zip" -DestinationPath "." .\windows.ps1

맥OS

# Run with sudo curl -L "https://github.com/your-org/cursor-mcp/releases/latest/download/cursor-mcp-macos.zip" -o "cursor-mcp.zip" unzip cursor-mcp.zip sudo ./macos.sh

리눅스

# Run with sudo curl -L "https://github.com/your-org/cursor-mcp/releases/latest/download/cursor-mcp-linux.zip" -o "cursor-mcp.zip" unzip cursor-mcp.zip sudo ./linux.sh

용법

기본 사용법

import { CursorInstanceManager } from 'cursor-mcp' // Get the instance manager const manager = CursorInstanceManager.getInstance() // Start a new Cursor instance await manager.startNewInstance() // Get all running instances const instances = await manager.getRunningInstances() // Focus a specific instance await manager.focusInstance(instances[0]) // Close all instances await manager.closeAllInstances()

창 관리

import { WindowManager } from 'cursor-mcp' const windowManager = WindowManager.getInstance() // Find all Cursor windows const windows = await windowManager.findCursorWindows() // Focus a window await windowManager.focusWindow(windows[0]) // Arrange windows side by side await windowManager.arrangeWindows(windows, 'sideBySide') // Minimize all windows for (const window of windows) { await windowManager.minimizeWindow(window) }

입력 자동화

import { InputAutomationService } from 'cursor-mcp' const inputService = InputAutomationService.getInstance() // Type text await inputService.typeText('Hello, World!') // Send keyboard shortcuts if (process.platform === 'darwin') { await inputService.sendKeys(['command', 'c']) } else { await inputService.sendKeys(['control', 'c']) } // Mouse operations await inputService.moveMouse(100, 100) await inputService.mouseClick('left') await inputService.mouseDrag(100, 100, 200, 200)

작동 원리

교량 건축

이 도구는 Cursor와 MCP 서버 사이의 미들웨어 계층 역할을 합니다.

  1. 커서 통합 :
    • 커서의 파일 시스템 이벤트를 모니터링합니다.
    • 편집자 상태 및 컨텍스트를 캡처합니다.
    • 편집기에 응답을 다시 주입합니다.
    • 창 및 프로세스 자동화를 관리합니다.
  2. MCP 프로토콜 번역 :
    • 커서의 내부 이벤트를 MCP 프로토콜 메시지로 변환합니다.
    • MCP 응답을 커서 호환 작업으로 변환합니다.
    • 세션 상태 및 컨텍스트를 유지합니다.
    • 인증 및 보안을 처리합니다
  3. 서버 통신 :
    • Claude의 데스크톱 앱 MCP 서버에 연결합니다.
    • 적절한 AI 공급자에게 요청을 라우팅합니다.
    • 여러 MCP에 대한 동시 연결을 관리합니다.
    • 폴백 및 오류 복구를 처리합니다.

워크플로 예시

  1. 코드 완성 요청 :
    // 1. Cursor Event (File Change) // When user types in Cursor: function calculateTotal(items) { // Calculate the total price of items| <-- cursor position // 2. Bridge Translation const event = { type: 'completion_request', context: { file: 'shopping-cart.ts', line: 2, prefix: '// Calculate the total price of items', language: 'typescript', cursor_position: 43 } } // 3. MCP Protocol Message await mcpServer.call('generate_completion', { prompt: event.context, max_tokens: 150, temperature: 0.7 }) // 4. Response Translation // Bridge converts MCP response: const response = `return items.reduce((total, item) => { return total + (item.price * item.quantity); }, 0);` // 5. Cursor Integration // Bridge injects the code at cursor position
  2. 코드 리팩토링 :
    // 1. Cursor Event (Command) // User selects code and triggers refactor command const oldCode = ` if (user.age >= 18) { if (user.hasLicense) { if (car.isAvailable) { rentCar(user, car); } } } ` // 2. Bridge Translation const event = { type: 'refactor_request', context: { selection: oldCode, command: 'simplify_nesting' } } // 3. MCP Protocol Message await mcpServer.call('refactor_code', { code: event.context.selection, style: 'simplified', maintain_logic: true }) // 4. Response Translation const response = ` const canRentCar = user.age >= 18 && user.hasLicense && car.isAvailable; if (canRentCar) { rentCar(user, car); } ` // 5. Cursor Integration // Bridge replaces selected code
  3. 다중 파일 컨텍스트 :
    // 1. Cursor Event (File Dependencies) // When user requests help with a component // 2. Bridge Translation const event = { type: 'context_request', files: { 'UserProfile.tsx': '...', 'types.ts': '...', 'api.ts': '...' }, focus_file: 'UserProfile.tsx' } // 3. MCP Protocol Message await mcpServer.call('analyze_context', { files: event.files, primary_file: event.focus_file, analysis_type: 'component_dependencies' }) // 4. Response Processing // Bridge maintains context across requests

통합 방법

  1. 파일 시스템 모니터링 :
    import { FileSystemWatcher } from 'cursor-mcp/watcher' const watcher = new FileSystemWatcher({ paths: ['/path/to/cursor/workspace'], events: ['change', 'create', 'delete'] }) watcher.on('change', async (event) => { const mcpMessage = await bridge.translateEvent(event) await mcpServer.send(mcpMessage) })
  2. 창 통합 :
    import { CursorWindow } from 'cursor-mcp/window' const window = new CursorWindow() // Inject AI responses await window.injectCode({ position: cursorPosition, code: mcpResponse.code, animate: true // Smooth typing animation }) // Handle user interactions window.onCommand('refactor', async (selection) => { const mcpMessage = await bridge.createRefactorRequest(selection) const response = await mcpServer.send(mcpMessage) await window.applyRefactoring(response) })
  3. 컨텍스트 관리 :
    import { ContextManager } from 'cursor-mcp/context' const context = new ContextManager() // Track file dependencies await context.addFile('component.tsx') await context.trackDependencies() // Maintain conversation history context.addMessage({ role: 'user', content: 'Refactor this component' }) // Send to MCP server const response = await mcpServer.send({ type: 'refactor', context: context.getFullContext() })

보안

  • AI 서비스를 위한 안전한 토큰 기반 인증
  • 암호화된 통신 채널
  • 샌드박스 실행 환경
  • 세분화된 권한 제어

요구 사항

윈도우

  • Windows 10 이상
  • Node.js 18 이상
  • 설치를 위한 관리자 권한

맥OS

  • macOS 10.15(Catalina) 이상
  • Node.js 18 이상
  • Xcode 명령줄 도구
  • 터미널 접근성 권한

리눅스

  • X11 디스플레이 서버
  • Node.js 18 이상
  • 엑스도툴
  • libxtst-dev
  • libpng++-dev
  • 빌드-에센셜

개발

설정

# Clone the repository git clone https://github.com/your-org/cursor-mcp.git cd cursor-mcp # Install dependencies npm install # Build the project npm run build # Run tests npm test

테스트 실행

# Run all tests npm test # Run specific test suite npm test -- window-management # Run with coverage npm run test:coverage

기여하다

기여를 환영합니다! 자세한 내용은 기여 가이드를 참조하세요.

특허

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.

지원하다

감사의 말

-
security - not tested
A
license - permissive license
-
quality - not tested

Claude의 데스크톱 애플리케이션과 커서 편집기 사이의 브리지 역할을 하여 표준화된 통신과 안전한 토큰 기반 인증을 통해 플랫폼 전반에서 원활한 AI 기반 자동화와 다중 인스턴스 관리를 가능하게 합니다.

  1. Overview
    1. 🤖 AI Integration
    2. 🔌 MCP Protocol Support
    3. 🖥️ Cross-Platform Window Management
    4. ⌨️ Input Automation
    5. 🔄 Process Management
  2. MCP Integration
    1. Claude Desktop Integration
    2. Using Multiple MCPs
    3. Custom MCP Integration
  3. Configuration
    1. Installation
      1. Windows
      2. macOS
      3. Linux
    2. Usage
      1. Basic Usage
      2. Window Management
      3. Input Automation
    3. How It Works
      1. Bridge Architecture
      2. Example Workflow
      3. Integration Methods
    4. Security
      1. Requirements
        1. Windows
        2. macOS
        3. Linux
      2. Development
        1. Setup
        2. Running Tests
      3. Contributing
        1. License
          1. Support
            1. Acknowledgments
              ID: jdkl0uz4sp