Skip to main content
Glama

Cursor MCP - Claude 桌面集成

铁匠徽章

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

快速启动(Windows)

通过 Smithery 安装

要通过Smithery自动安装 Cursor for Claude Desktop:

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

手动安装

  1. 先决条件

  2. 安装

    # 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. 配置

    • 在项目根目录中创建一个.env文件:

      # Windows path example DEFAULT_WORKSPACE_PATH=C:/Users/YourUsername/Documents/cursor-workspaces
  4. 添加到 Claude 的 MCP 配置将以下内容添加到您的 Claude 配置中:

    { "name": "cursor", "type": "mcp", "config": { "server": "https://glama.ai/mcp/servers/4fg1gxbcex", "capabilities": ["cursor_control", "window_management"] } }
  5. 启动服务器

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

Related MCP server: AI Development Assistant MCP Server

特征

  • 开发工作流程中的实时 AI 协助

  • 上下文感知的代码建议和完成

  • 与 Cursor IDE 无缝集成

  • Windows 自动化可提高生产力

详细设置

本地开发设置

  1. 克隆并安装:

    git clone https://github.com/yourusername/cursor-mcp.git cd cursor-mcp npm install
  2. 创建环境配置:

    cp .env.example .env

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

    DEFAULT_WORKSPACE_PATH=C:/Users/YourUsername/Documents/cursor-workspaces
  3. 构建并运行:

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

故障排除

  1. 窗口检测问题

    • 确保 Cursor IDE 正在运行

    • 尝试重启 MCP 服务器

    • 检查你的工作区路径是否正确

  2. 权限问题

    • 首次设置时以管理员身份运行终端

    • 确保工作区目录中有正确的文件权限

  3. Node 版本问题

    • 使用nvm切换到 Node.js v18 或更高版本:

      nvm install 18 nvm use 18

项目结构

cursor-mcp/ ├── src/ # Source code │ ├── services/ # Core services │ ├── handlers/ # Event handlers │ └── types/ # TypeScript definitions ├── build/ # Compiled JavaScript └── .env # Environment configuration

脚本

  • npm run build编译 TypeScript

  • npm start运行生产服务器

  • npm run dev - 使用热重载启动开发服务器

贡献

  1. 分叉存储库

  2. 创建功能分支( git checkout -b feature/amazing-feature

  3. 提交更改( git commit -m 'Add feature'

  4. 推送到分支( git push origin feature/amazing-feature

  5. 打开拉取请求

执照

MIT 许可证 - 详情请参阅 LICENSE 文件。

支持

如需支持:

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Buga-luga/cursor-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server