MCP 伺服器

可以透過 Cursor 深連結(deeplink)安裝 MCP 伺服器。它使用與 mcp.json 相同的格式,包含名稱與傳輸設定。 安裝連結:
cursor://anysphere.cursor-deeplink/mcp/install?name=$NAME&config=$BASE64_ENCODED_CONFIG
元件說明
cursor://通訊協定方案(scheme)
anysphere.cursor-deeplink深連結(deeplink)處理器
/mcp/install路徑
name伺服器名稱的查詢參數
configbase64 編碼之 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 中使用這個伺服器