分三步設定。
需要 Node.js 20 或更新版本。您會在瀏覽器中核准登入。請勿將 API key 貼到對話中。
連接 Claude Code
執行 npx -y @sandbaseai/cli@latest connect --client claude-code。它會開啟瀏覽器供您登入,接著將 SandBase 項目加入 Claude Code 設定。
- Node.js 20+
- 瀏覽器登入
- 保留變更後設定的備份
啟動新工作階段並檢查
重新啟動 Claude Code,讓 sandbase 工具載入。claude mcp list 應顯示 sandbase 已連線,而 sandbase doctor 會實際往返一次。
- claude mcp list
- sandbase doctor
提出任務
描述您想要的結果,例如比較兩位創作者。agent 會找到對應的 API,檢查價格,然後執行它。
- 探索是免費的
- 只有執行才會收費
這六個工具。
這些是 SandBase server 提供給 Claude Code 的 MCP 工具。只有 sandbase_run 會從您的餘額扣款。
- sandbase_discover
- 依查詢、類型與供應商搜尋模型與 API。唯讀且免費。
- sandbase_inspect
- 取得單一工具的輸入 schema、價格與可直接執行的範本。唯讀且免費。
- sandbase_run
- 執行模型或 API。這是唯一會計費的工具,失敗的呼叫不收費。
- sandbase_run_get
- 透過 run ID 檢查非同步執行,例如圖片或影片工作。
- sandbase_runs 和 sandbase_account
- 列出近期呼叫的狀態與費用,並讀取您的 USD 餘額。
- 大型結果
- 在測試執行中,太大而無法放入 context 的結果會改存到檔案中。請請 agent 儲存大型輸出,並用 script 讀取。
相關內容。
大家常問的問題。
如何在 Claude Code 中新增 MCP server?
對 SandBase 而言,執行 npx -y @sandbaseai/cli@latest connect --client claude-code,在瀏覽器中核准登入,然後重新啟動一個 Claude Code 工作階段。可用 claude mcp list 驗證。
連接需要費用嗎?
不需要。連接、探索與檢視都是免費的。只有 sandbase_run 會依 inspect 步驟顯示的價格計費,而且失敗的呼叫不收費。
我的 key 存放在哪裡?
Claude Code 項目本身不保存 key。bridge 會從 ~/.sandbase 底下另一個本機檔案讀取憑證,在測試設定中該檔案以僅限擁有者權限寫入。
我要如何移除它?
針對該 client 執行 CLI 的 unregister 指令:sandbase unregister --client claude-code。
把型錄交給 Claude Code。
先連接一次,之後直接要求您需要的資料或媒體。
SandBase 與 Anthropic 無隸屬關係。Claude 是其擁有者的商標。這些指令已於 2026-11-24(UTC)依 SandBase CLI 驗證,可能會變動。
