Gate Wallet MCP 設定指南

4 天
1,295 閱讀
0

Gate Agentic Wallet MCP Server 是基於 MCP(Model Context Protocol)的 Web3 錢包服務,提供 Google OAuth 登入、錢包管理、鏈上交易簽名、Swap 交易、市場數據查詢等功能。

1.快速配置

選擇你的工具,輸入以下命令即可接入:

{
  "mcpServers": {
    "gate-wallet": {
      "url": "https://api.gatemcp.ai/mcp/wallet",
      "headers": {
        "x-api-key": "MCP_AK_8W2N7Q",
        "Authorization": "Bearer <your_mcp_token>"
      }
    }
  }
}

接入後,登入錢包即可自動獲取 。

2.舉例:在 Cursor 中添加 Gate Wallet MCP

2.1添加 Gate Wallet MCP server

  • 依序選擇右上角齒輪圖示 - Settings - 選擇 Tools&MCP - Add Custom MCP;
123
  • 在開啟的視窗中配置 Gate Wallet MCP 的 json 設定檔,將以下程式碼複製到 Cursor 的 json 中並儲存;//一定要儲存,否則無法讀取設定資料
    {
    "mcpServers": {
      "gate-wallet": {
        "url": "https://api.gatemcp.ai/mcp/dex",
        "headers": {
          "x-api-key": "MCP_AK_8W2N7Q",
          "Authorization": "Bearer <your_mcp_token>"
        }
      }
    }
    }
123 123
  • 回到 Tools&MCP 設定頁面,可以看到已安裝的 MCP 列表中出現了 gate-wallet(包含 27 tools、15 prompts、11 resources 可用);//可查看 MCP 連線狀態,綠色小點表示已連線,黃色和紅色為異常狀態
123

2.2首次使用 Google 授權

  • 在左側 chat 視窗輸入: auth.google_login_start/ 取得 Google 授權連結 / Get gate wallet Google authorization link; //這裡任選一個皆可,Cursor 能識別並執行,此處以 Get gate wallet Google authorization link 為例
123
  • 等待 Cursor 解析並執行命令,執行完成後會彈出 Google 授權登入並給出一個 URL 地址,若自動彈出失敗,可複製該地址並在瀏覽器中開啟
123
  • 在瀏覽器中自動喚起 Google 並完成帳號授權;
123 123
  • 完成 Google 授權後回到 Cursor,在 chat 中繼續執行命令 auth.google_login_poll,Cursor 會調用並回傳 mpc_token,mpc_token 會自動完成設定,若失敗請將 mcp_token 複製到剪貼簿
123
  • 【手動設定 mpc_token 方式】開啟 gate-wallet MCP 設定的 json 檔案;//在 Tools&MCP 中滑鼠 hover 已安裝的 gate-wallet MCP,會出現一個編輯按鈕,點擊後會開啟 gate-wallet 的 json 設定檔視窗
123
  • 【手動設定 mpc_token 方式】將設定檔中 Bearer 內文替換為上一步複製的 mcp_token 並儲存
123 123
  • 回到 Tools&MCP 中已安裝的 gate-wallet MCP 會重新載入工具,等待載入完成並變為綠色狀態,即完成 gate-wallet MCP 設定
123

3.gate-wallet MCP 功能使用

可在 Cursor 中使用 gate-wallet MCP 的功能,本文僅列舉部分,詳細功能請參閱 https://github.com/gate/gate-mcp

3.1取得錢包地址

  • 在 Cursor chat 中輸入:get wallet address(或輸入查看錢包地址等同義內容)即可顯示目前錢包的 EVM 和 SOL 地址
123

3.2取得幣種餘額

  • 在 Cursor chat 中輸入:get wallet token list(或輸入查看錢包資產等同義內容)即可顯示目前錢包持有資產的資訊
123

4.操作影片

立即註冊,最高可領 $10,000 迎新獎勵!
signup-tips