MCP 服务器

可以通过 Cursor 深链安装 MCP 服务器。它使用与 mcp.json 相同的格式,包含名称和传输配置。 安装链接:
cursor://anysphere.cursor-deeplink/mcp/install?name=$NAME&config=$BASE64_ENCODED_CONFIG
ComponentDescription
cursor://协议方案
anysphere.cursor-deeplink深度链接处理程序
/mcp/install路径
name服务器名称的查询参数
config以 base64 编码的 JSON 配置的查询参数
  1. 获取服务器名称和 JSON 配置
  2. 将配置用 JSON.stringify 序列化后,再进行 base64 编码
  3. 用名称和编码后的配置分别替换 $NAME$BASE64_ENCODED_CONFIG
生成链接的辅助工具:

示例

在 MCP 安装链接生成器中试试这个 JSON:
单个 MCP 服务器配置
{
  "postgres": {
    "command": "npx",
    "args": [
      "-y",
      "@modelcontextprotocol/server-postgres",
      "postgresql://localhost/mydb"
    ]
  }
}
Result:
格式示例
文本链接cursor://anysphere.curs…
深色按钮将 Postgres MCP 服务器添加到 Cursor
浅色按钮将 Postgres MCP 服务器添加到 Cursor

安装服务器

  1. 点击链接或将其粘贴到浏览器
  2. Cursor 会提示你安装服务器
  3. 在 Cursor 中使用该服务器