返回市场
光标安装器

光标安装器

作者:matthewdcage73 星标更新:2025-03-30

项目介绍

Cursor MCP Installer

<div align="center"> <pre style="text-align: center;"> ___ __ __ ___ __ ___ ___ / __\/\ /\ /__\/ _\ /___\/__\ /\/\ / __\ / _ \ / / / / \ \/ \//\ \ // // \// / \ / / / /_)/ / /___\ \_/ / _ \_\ \/ \_// _ \/ /\/\ \/ /___/ ___/ \____/ \___/\/ \_/\__/\___/\/ \_/\/ \/\____/\/ _____ __ __ _____ _ __ __ __ __ \_ \/\ \ \/ _\/__ \/_\ / / / / /__\/__\ / /\/ \/ /\ \ / /\//_\\ / / / / /_\ / \// /\/ /_/ /\ / _\ \ / / / _ \/ /___/ /___//__/ _ \ \____/\_\ \/ \__/ \/ \_/ \_/\____/\____/\__/\/ \_/ +---------------------------------------------+ | 🚀 CURSOR MCP INSTALLER 🚀 | | ✨ 轻松安装MCP服务器✨ | +---------------------------------------------+ </pre> <p>一个用于在Cursor IDE中安装和配置其他MCP服务器的模型上下文协议(MCP)服务器。</p>

License: MIT npm version MCP Compatible Cursor IDE npm downloads

<a href="https://www.linkedin.com/in/digitalmarketingstrategyexpert/"> <img src="https://img.shields.io/badge/LinkedIn-Matthew_Cage-blue?style=flat&logo=linkedin" alt="LinkedIn"/> </a> </div>

📢 现已可在NPM上使用! 使用简单的npm install -g cursor-mcp-installer-free命令进行安装,或直接使用npx cursor-mcp-installer-freeuvx cursor-mcp-installer-free

🔄 最新更新(v0.1.3): 改进了所有MCP服务器安装路径处理,增强了OpenAPI模式检测,并且在本地目录中更稳健地发现服务器。感谢@ItzAmirreza提交了初始安装路径处理问题。详情见CHANGELOG.md

快速入门指南

第一步:添加到Cursor配置

选择以下方法之一将MCP Installer添加到您的Cursor配置:

使用npx(最简单 - 不需要安装)

在您的~/.cursor/mcp.json文件中添加以下内容(如果不存在,请创建该文件):

{
  "mcpServers": {
    "MCP Installer": {
      "command": "npx",
      "type": "stdio",
      "args": [
        "cursor-mcp-installer-free@0.1.3",
        "index.mjs"
      ]
    }
  }
}

使用npm(全局安装)

npm install -g cursor-mcp-installer-free@0.1.3

然后在您的~/.cursor/mcp.json中添加:

{
  "mcpServers": {
    "MCP Installer": {
      "command": "cursor-mcp-installer-free",
      "type": "stdio",
      "args": [
        "index.mjs"
      ]
    }
  }
}

第二步:重启Cursor

关闭并重新打开Cursor以应用配置更改。

第三步:使用Claude安装服务器

请求Claude为您安装任何MCP服务器:

安装web搜索MCP服务器

或者

使用my-schema.yaml安装用于OpenAPI模式探索的MCP服务器

第四步:安装后看到的内容

一旦正确安装并重启Cursor,您将在使用Claude时在侧边栏中看到MCP Installer:

<img src="docs/installtion-success-cursor-screenshot.png" alt="MCP Installer界面" width="500"/>

MCP Installer提供了三个主要工具:

  • install_repo_mcp_server:从npm包或仓库安装MCP服务器
  • install_local_mcp_server:从本地目录安装MCP服务器
  • add_to_cursor_config:添加自定义MCP服务器配置

功能

  • 从npm包安装MCP服务器
  • 从本地目录安装MCP服务器
  • 配置Cursor中的MCP服务器
  • 添加自定义MCP服务器配置

先决条件

在使用此工具之前,您需要安装:

安装

有几种方式可以安装和使用Cursor MCP Installer:

1. 使用npm(推荐)

npm install -g cursor-mcp-installer-free@0.1.3

安装后,将其添加到您的Cursor MCP配置文件中:

{
  "mcpServers": {
    "MCP Installer": {
      "command": "cursor-mcp-installer-free",
      "type": "stdio",
      "args": [
        "index.mjs"
      ]
    }
  }
}

2. 使用npx(无需安装)

您可以使用npx运行该包而不需全局安装它:

{
  "mcpServers": {
    "MCP Installer": {
      "command": "npx",
      "type": "stdio",
      "args": [
        "cursor-mcp-installer-free@0.1.3",
        "index.mjs"
      ]
    }
  }
}

3. 直接从GitHub

克隆仓库并在本地构建:

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

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

然后配置Cursor以使用您的本地安装:

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

/path/to/cursor-mcp-installer替换为您实际克隆仓库的位置。

Cursor MCP配置文件在哪里?

Cursor MCP配置文件位于:

  • macOS/Linux: ~/.cursor/mcp.json
  • Windows: %USERPROFILE%\.cursor\mcp.json

如果文件不存在,您可以根据上述任何安装方法创建它。

v0.1.3中的路径处理改进

版本0.1.3引入了对MCP服务器安装路径处理的重大改进:

增强的路径解析

  • 正确规范化相对路径和绝对路径
  • 处理包含空格和特殊字符的路径
  • 在不同操作系统之间确保一致的路径格式

更好的模式检测

  • 现在扫描所有参数中的模式文件,而不仅仅是第一个
  • 支持更多模式文件扩展名(.yaml, .yml, .json, .openapi)
  • 在传递给服务器之前正确规范化模式文件路径

改进的服务器发现

  • 增加了对本地目录中常见服务器入口点的检测
  • 增强了对基于Python的MCP服务器的支持
  • 对与路径相关的问题有更好的错误报告

这些改进使MCP Installer在处理自定义文件路径、OpenAPI模式和本地目录安装时更加健壮。

使用

安装后,您可以使用Claude或Cursor与MCP Installer交互。这里有一些示例提示:

将npm包安装为MCP服务器

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

带参数安装

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

安装本地MCP服务器

在/home/user/projects/my-mcp-server处安装MCP服务器

带环境变量安装

# 输出格式
直接输出翻译后的中文技术文档,保持完整Markdown格式。