MCP 伺服器

可以透過 Cursor deeplink 安裝 MCP 伺服器。它使用與 mcp.json 相同的格式,包含名稱與傳輸設定。 安裝連結:
cursor://anysphere.cursor-deeplink/mcp/install?name=$NAME&config=$BASE64_ENCODED_CONFIG
元件說明
cursor://通訊協定綱要(scheme)
anysphere.cursor-deeplinkdeeplink 處理器
/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"
    ]
  }
}
結果:
FormatExample
文字連結cursor://anysphere.curs…
深色按鈕將 Postgres MCP 伺服器加入 Cursor
淺色按鈕將 Postgres MCP 伺服器加入 Cursor

安裝伺服器

  1. 點擊連結或貼到瀏覽器中
  2. Cursor 會提示你安裝伺服器
  3. 在 Cursor 中使用這個伺服器