返回 MCP 目录
public公开dns本地运行

cursor-mcp-installer

Cursor MCP Installer 是一个用于在 Cursor IDE 中安装和配置其他 MCP 服务器的工具,支持从 npm 包或本地目录安装,简化了 MCP 服务器的设置流程。

article

README

🚀 光标 MCP 安装程序

光标 MCP 安装程序是你的 MCP 服务器一站式解决方案,它能让你用自然语言与代码互动,让开发变得更简单、更高效。

   ___         __  __    ___  __            ___   ___ 
  / __\/\ /\  /__\/ _\  /___\/__\  /\/\    / __\ / _ \
 / /  / / \ \/ \//\ \  //  // \//\ /\/\  / /  / /_\ \
/ /__/\ /_/\ / / \_\(/\ /\_\\/_\_\_\_/\/ /__/\___/
\____/\_\_\_/\_\_\___/\ \___/____/\____/ \____/\____/
                     \_\_\                       \_\_

光标 MCP 安装程序 - 你的 MCP 服务器一站式解决方案

用自然语言与你的代码互动,让开发更简单、更高效。

✨ 主要特性

  • 从 npm 安装 MCP 服务器:可直接从 npm 包或 Git 仓库安装并运行 MCP 服务器。
  • 本地 MCP 服务器支持:能将本地目录注册为 MCP 服务器,便于开发和测试。
  • 自动配置:自动生成光标所需的配置文件,实现无缝集成。
  • 多平台兼容:支持 Windows、macOS 和 Linux 系统。

📦 安装指南

使用 npm (推荐)

npm install -g cursor-mcp-installer@latest

安装完成后,将其添加到光标的 MCP 配置文件中:

{
  "mcpServers": {
    "MCP 安装程序": {
      "command": "cursor-mcp-installer",
      "type": "stdio",
      "args": [
        "index.mjs"
      ]
    }
  }
}

使用 npx (无需安装)

你也可以使用 npx 直接运行,而无需全局安装:

{
  "mcpServers": {
    "MCP 安装程序": {
      "command": "npx",
      "type": "stdio",
      "args": [
        "cursor-mcp-installer@latest",
        "index.mjs"
      ]
    }
  }
}

从 GitHub 克隆

# 克隆仓库
git clone https://github.com/yourusername/cursor-mcp-installer.git
cd cursor-mcp-installer

# 安装依赖并构建
npm install
npm run build

然后配置光标以使用你的本地安装:

{
  "mcpServers": {
    "MCP 安装程序": {
      "command": "node",
      "type": "stdio",
      "args": [
        "/path/to/cursor-mcp-installer/lib/index.mjs"
      ]
    }
  }
}

请将 /path/to/cursor-mcp-installer 替换为你实际克隆仓库的路径。

💻 使用示例

基础用法

安装完成后,你可以在光标中使用以下命令与 MCP 安装程序交互:

安装 npm 包作为 MCP 服务器

安装名为 mcp-server-fetch 的 MCP 服务器

带参数安装

将 @modelcontextprotocol/server-filesystem 包作为 MCP 服务器安装。使用 ['/home/user/documents'] 作为参数

安装本地 MCP 服务器

在 /home/user/projects/my-mcp-server 目录下安装 MCP 服务器

带环境变量安装

 使用特定的环境变量配置 MCP 服务器
help

运行方式说明

cloud

托管运行

托管运行通常表示这个 MCP Server 由服务方环境承载,用户一般按页面提供的连接方式或授权流程接入,不需要在本地长期启动一个 MCP 进程

  1. 打开服务方连接页
  2. 完成授权或复制端点
  3. 在 MCP 客户端中连接
terminal

本地运行 / 其它方式

本地运行通常需要用户在自己的电脑或服务器上安装依赖,把 server_config 复制到 MCP 客户端,并按 env_schema 补齐环境变量、密钥或其它配置

  1. 复制 server_config
  2. 安装所需依赖
  3. 补齐环境变量后重启客户端