
Foundry Zksync
io.github.Jrigada由 GitHub 帳號 Jrigada 發布v0.2.3更新於 Oct 24, 2026
Expose foundry-zksync (forge, cast, anvil-zksync) tools for zkSync Era development
概覽
暴露 foundry-zksync 命令列工具,讓助理能編譯、測試、部署並與 zkSync Era 智慧合約互動。
- 可以做什麼
- 把 foundry-zksync 工具鏈(forge、cast、anvil-zksync)封裝成 MCP 工具。涵蓋專案初始化、編譯、可帶篩選與詳細度選項的測試、gas 報告與快照、腳本執行、具結構化輸出的合約部署,以及在 Etherscan 與 zkSync Explorer 上驗證合約。cast 工具負責 ABI 編碼與解碼、calldata 解碼、唯讀呼叫、會改變狀態的發送、餘額與 nonce 查詢。也能讀取 foundry.toml、依 zkSync 知識庫解釋錯誤、查詢文件,並啟動或檢查本機 anvil-zksync 節點。
- 適用情境
- 適合開發或測試 zkSync Era 智慧合約,並希望助理直接操作 forge 與 cast 工作流程的情況。無論是搭配 anvil-zksync 的本機開發,或在 zkSync 網路上部署與驗證合約都適用。
- 執行需求
- 以 npm 套件(foundry-zksync-mcp)透過 stdio 在本機執行,通常使用 npx。需要 Node.js 18 以上版本,以及透過 foundryup-zksync 安裝的 foundry-zksync。簽章工具需要一種錢包方式:具名 keystore 帳戶、搭配密碼檔的 keystore 檔案、硬體錢包、雲端 KMS 或私鑰。雲端 KMS 選項會用到 AWS_KMS_KEY_ID、GCP_PROJECT_ID 等環境變數。伺服器本身未宣告驗證機制。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Foundry Zksync,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
foundry-zksync-mcp
An MCP (Model Context Protocol) server that exposes foundry-zksync CLI tools to AI assistants like Claude.
Tools
Prerequisites
- Node.js >= 18
- foundry-zksync installed (
foundryup-zksync)
Quick Start (npx)
No install needed — run directly with npx:
Or add to claude_desktop_config.json / ~/.claude.json:
Install from Source
Then register with Claude Code:
Key Management
All signing tools (deploy, cast_send, run_script) support multiple wallet methods. Choose based on your security needs:
Local Development (anvil-zksync)
For local dev with well-known test keys, use privateKey directly:
These are the default anvil-zksync test accounts — they hold no real value.
Warning: Never use
privateKeywith keys that hold real funds. MCP tool parameters are visible to the AI assistant and may be logged.
Recommended for Production: Named Keystores
Keys are encrypted on disk — only the account name travels through MCP.
Then use account: "deployer" in any signing tool. Forge will prompt for the password at runtime, or you can point to a password file with passwordFile.
Keystore Files
If you have an existing encrypted keystore JSON file (e.g. from Geth, MetaMask export):
Hardware Wallets
Cloud KMS
Signing Method Summary
Project Structure
來源:README.md,提交 0c030bc
工具
0版本歷史
1- v0.2.3最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分