MCP 服务器

MCP 服务器可以通过 Cursor 深度链接进行安装。它使用与 mcp.json 相同的格式,包含名称和传输配置。 安装链接:
cursor://anysphere.cursor-deeplink/mcp/install?name=$NAME&config=$BASE64_ENCODED_CONFIG
组件描述
cursor://协议方案
anysphere.cursor-deeplink深度链接处理器
/mcp/install路径
name服务器名称的查询参数
configbase64 编码 JSON 配置的查询参数

生成安装链接

  1. 获取服务器的名称和 JSON 配置
  2. 对配置进行 JSON.stringify 然后进行 base64 编码
  3. $NAME$BASE64_ENCODED_CONFIG 替换为名称和编码后的配置
生成链接的辅助工具:

示例

在 MCP 安装链接生成器中尝试这个 JSON:
Single MCP server config
{
  "postgres": {
    "command": "npx",
    "args": [
      "-y",
      "@modelcontextprotocol/server-postgres",
      "postgresql://localhost/mydb"
    ]
  }
}
结果:
格式示例
文本链接cursor://anysphere.curs…
深色按钮Add postgres MCP server to Cursor
浅色按钮Add postgres MCP server to Cursor

安装服务器

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