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 中使用伺服器