
Pact Tooling
io.github.Pact-Community-Organization由 GitHub 帳號 Pact-Community-Organization 發布v0.2.2更新於 Oct 24, 2026
Pact 5 tooling: REPL test runs, trap scanning, gas estimation, interface diff, format checks.
概覽
針對 Kadena 上 Pact 5 智慧合約開發的在地 MCP 伺服器:執行 REPL 測試、掃描語言陷阱、估算 gas、比對介面並檢查格式。
- 可以做什麼
- 以真實 Pact 解譯器執行 REPL 測試檔並彙整失敗項目
- 掃描 Pact 模組中的 Pact 5 關鍵陷阱,例如非二元 +、enforce 內的資料庫讀取、內建名稱遮蔽
- 估算 Pact 程式的 gas
- 比對兩個模組的公開介面,回報新增、移除、變更的函式以及是否為破壞性變更
- 檢查模組格式
- 適用情境
- 適合在助理協助撰寫、測試或審查 Kadena 上的 Pact 5 合約時使用,讓它在編輯器內直接執行 REPL 測試、找出語言陷阱、比較模組介面或檢查格式。
- 執行需求
- 透過 npx 從 npm 套件 @pact-community/mcp-pact 以 stdio 在本機執行。需要安裝 Pact CLI 並放在 PATH,或以 PACT_COMMUNITY_PACT_BIN 指定路徑。必須設定 PACT_COMMUNITY_WORKSPACE_ROOT,所有檔案存取都限制在該目錄內。不需要節點或帳號,未宣告驗證。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Pact Tooling,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
pact-mcp — MCP servers for Pact & Chainweb
[CI] [npm] [License: Apache-2.0] [Node >= 20.11]
Model Context Protocol servers that give your AI agent safe, auditable access to the Pact 5 development loop on Kadena Chainweb.
Run REPL tests, scan modules for critical language traps, estimate gas, and query or submit to Chainweb nodes — from Claude, Cursor, VS Code, or any MCP-compatible client. Every tool runs behind a strict, tested security baseline, and no tool ever touches a private key.
Servers
Both are listed in the official
MCP registry as
io.github.Pact-Community-Organization/pact and
io.github.Pact-Community-Organization/chainweb.
Install
VS Code (one click)
Using VS Code with GitHub Copilot? Install with a single click:
[Install Pact Tooling in VS Code] [Install Chainweb API in VS Code]
The button opens VS Code and pre-fills the configuration. You can also search the MCP Servers view, or add from the command line:
On VS Code Insiders, use
vscode-insiders:in the links orcode-insiderson the command line.
Claude Code
Any MCP client
Add both servers to your client configuration:
Each server's README documents its full tool list and environment variables: Pact Tooling · Chainweb API.
Your first 10 minutes
- Install the Pact CLI — Pact Tooling uses it for REPL runs and gas
estimation. Download a release from
kadena-io/pact-5, put
pacton yourPATH, and verify withpact --version. - Add the servers to your client with the config above, pointing
PACT_COMMUNITY_WORKSPACE_ROOTat your contract project. - Ask your agent:
- "Scan
contracts/token.pactfor critical Pact 5 traps" — flags non-binary+, DB reads insideenforce, built-in shadowing, and more. - "Run
tests/token.repland summarize the failures" — executes the file with the real Pact interpreter and parses the results. - "Diff the public interface of
token.pactagainsttoken-v2.pact" — reports added/removed/changed functions and whether the change is breaking. - "What's the current block height on chain 0?" — queries a Chainweb node.
- "Scan
Everything in Pact Tooling works with just the CLI — no node required. Chainweb
API works against any Chainweb-compatible node: point
PACT_COMMUNITY_CHAINWEB_BASE_URL at your devnet, or use the read-only
testnet06 / mainnet profiles to query public networks.
Security
Both servers enforce the same tested baseline (details in SECURITY.md):
- No private keys, ever.
chainweb_send,chainweb_deploy_module, andchainweb_continue_pactrequire transactions to be signed externally (Ledger,@kadena/client, …) and passed in pre-signed. - Read-only public networks. The
testnet06andmainnetprofiles block every write tool withPROFILE_WRITE_BLOCKED. - Audit logging of every tool call with SHA-256 input hashes (never raw inputs).
- Prompt-injection stripping on all tool output before it reaches the model.
- Tool-schema locking — a server refuses to start if its tool schemas drift.
- Network and filesystem allowlists, no shell execution, and refusal to run as root.
Compatibility
Contributing
Requires Node.js >= 20.11 and pnpm >= 9. See CONTRIBUTING.md for workflow, coding standards, and how to add or change a tool.
License
來源:README.md,提交 80e2e60
工具
0版本歷史
1- v0.2.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
