三步驟完成設定。
需要 Node.js 20 或更新版本。您在瀏覽器中授權登入。請勿將 API key 貼到聊天中。
步驟 1
連接 Cursor
執行 npx -y @sandbaseai/cli@latest connect --client cursor。它會在 ~/.cursor/mcp.json 新增一個 sandbase 項目,並安裝 SandBase Skill,同時保留所變更檔案的備份。
- ~/.cursor/mcp.json
- 瀏覽器登入
- 寫入前先備份
重新啟動 Cursor
重新啟動 Cursor,在聊天中輸入 /,然後找 /sandbase。sandbase 工具也應該會顯示在 Cursor 的 MCP 設定中。
- 聊天中的 /sandbase
- sandbase_* 工具
請求一項任務
描述你想要的結果。Cursor 會找出相符的模型或 API,查看其價格,並在你核准後執行。
- 探索是免費的
- 只有執行才會產生費用
設定會改變什麼。
CLI 只會編輯它所擁有的項目,並保留既有、非它建立的 sandbase 項目不受影響。
- 設定項目
- 位於 ~/.cursor/mcp.json 的 sandbase 伺服器,會啟動本機 Node 橋接器。它不會保存任何 API 金鑰。
- Cursor CLI
- cursor-agent 讀取相同的 ~/.cursor/mcp.json。使用 --client cursor-cli 連接,並以 cursor-agent mcp list 檢查。
- 您的憑證
- 由 CLI 登入後另外儲存在 ~/.sandbase 下,而不是放在 mcp.json 中。
- 費用
- 連線、探索與檢查都是免費的。sandbase_run 會依 inspect 步驟顯示的價格計費,而失敗的呼叫不會收費。
- 移除它
- 執行 sandbase unregister --client cursor。它只會移除受管理的項目。
相關。
大家常問的問題。
我要如何將 MCP 伺服器加入 Cursor?
對於 SandBase,請執行 npx -y @sandbaseai/cli@latest connect --client cursor,在瀏覽器中核准登入,然後重新啟動 Cursor。CLI 會將 sandbase 項目寫入 ~/.cursor/mcp.json。
Cursor 的 MCP 設定檔在哪裡?
使用者層級的檔案是 ~/.cursor/mcp.json。Cursor CLI(cursor-agent)會讀取同一個檔案。
這會花錢嗎?
連線、探索與檢查都是免費的。只有執行模型或 API 才會計費,而失敗的呼叫不會收費。
我的 API 金鑰會寫入 mcp.json 嗎?
不會。該項目會啟動本機橋接器,並從 ~/.sandbase 下的另一個檔案讀取其憑證。
把目錄交給 Cursor。
先連接一次,然後詢問你需要的資料或媒體。
SandBase 與 Anysphere 無關。Cursor 是其所有者的商標。此行為已根據 2026-11-24(UTC)的 SandBase CLI 原始碼進行驗證,之後可能會變更。
