BL

buga-luga/cursor-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

39 stars 15 forks 质量 63 趋势 0MIT

buga-luga/cursor-mcp 是从 https://github.com/buga-luga/cursor-mcp. 导入的 MCP 服务器候选。

概览

buga-luga/cursor-mcp 是从 https://github.com/buga-luga/cursor-mcp. 导入的 MCP 服务器候选。

概述(AI 翻译)

模型上下文协议(MCP)实现,通过光标IDE实现Claude AI与桌面应用的无缝集成。该工具作为Claude能力与桌面软件之间的桥梁,支持增强AI驱动的开发流程。

快速启动(Windows)

通过Smithery安装

通过Smithery自动安装Claude Desktop的Cursor:

手动安装

  1. 先决条件
  • Node.js v18 或更高
  • 光标IDE
  • Windows 10及以上版本
  1. 安装

  2. 配置

  • 在你的项目根创建 .env 文件:
  1. 添加到Claude的MCP配置中 在你的Claude配置中添加以下内容:

  2. 启动服务器

特色

  • 在你的开发流程中提供实时AI协助
  • 上下文感知代码建议与补全
  • 与光标集成环境(IDE)无缝集成
  • Windows自动化以提升生产力

详细铺垫

本地开发设置

  1. 克隆与安装:

  2. 创建环境配置:

编辑 .env 并设置你的工作区路径:

  1. 建造并运行:

排查

  1. 窗口检测问题
  • 确保光标IDE正在运行

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Cursor MCP - Claude Desktop Integration

A Model Context Protocol (MCP) implementation that enables seamless integration between Claude AI and desktop applications through Cursor IDE. This tool serves as a bridge between Claude’s capabilities and desktop software, allowing for enhanced AI-powered development workflows.

Quick Start (Windows)

Installing via Smithery

To install Cursor for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install cursor-mcp-tool --client claude

Installing Manually

  1. Prerequisites

  2. Installation

    # Install globally
    npm install -g mcp-cursor
    
    # Or install locally
    git clone https://github.com/yourusername/cursor-mcp.git
    cd cursor-mcp
    npm install
    
  3. Configuration

    • Create a .env file in your project root:
      # Windows path example
      DEFAULT_WORKSPACE_PATH=C:/Users/YourUsername/Documents/cursor-workspaces
      
  4. Add to Claude’s MCP Configuration Add the following to your Claude configuration:

    {
      "name": "cursor",
      "type": "mcp",
      "config": {
        "server": "https://glama.ai/mcp/servers/4fg1gxbcex",
        "capabilities": ["cursor_control", "window_management"]
      }
    }
    
  5. Start the Server

    # If installed globally
    mcp-cursor
    
    # If installed locally
    npm start
    

Features

  • Real-time AI assistance in your development workflow
  • Context-aware code suggestions and completions
  • Seamless integration with Cursor IDE
  • Windows automation for enhanced productivity

Detailed Setup

Local Development Setup

  1. Clone and install:

    git clone https://github.com/yourusername/cursor-mcp.git
    cd cursor-mcp
    npm install
    
  2. Create environment config:

    cp .env.example .env
    

    Edit .env and set your workspace path:

    DEFAULT_WORKSPACE_PATH=C:/Users/YourUsername/Documents/cursor-workspaces
    
  3. Build and run:

    # Development mode with hot reload
    npm run dev
    
    # Production mode
    npm run build
    npm start
    

Troubleshooting

  1. Window Detection Issues

    • Ensure Cursor IDE is running
    • Try restarting the MCP server
    • Check if your workspace path is correct
  2. Permission Issues

    • Run terminal as administrator for first-time setup
    • Ensure proper file permissions in workspace directory
  3. Node Version Issues

    • Use nvm to switch to Node.js v18 or higher:
      nvm install 18
在 GitHub 查看完整 README

安装

npx -y @smithery/cli install cursor-mcp-tool --client claude
新手?先看 mcpskill.org 教程 →