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.

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

針對 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,所有檔案存取都限制在該目錄內。不需要節點或帳號,未宣告驗證。
安裝前請注意
此伺服器會以真實解譯器執行 Pact REPL 檔案,並讀取工作區根目錄內的檔案,請將工作區指向可信任的專案。README 聲稱它從不接觸私鑰、會移除工具輸出中的提示注入、以 SHA-256 雜湊記錄呼叫、不執行 shell 且拒絕以 root 執行,但這些都是提供者自行陳述。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Pact Tooling,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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.

json
{  "mcpServers": {    "pact": {      "command": "npx",      "args": ["-y", "@pact-community/mcp-pact"],      "env": { "PACT_COMMUNITY_WORKSPACE_ROOT": "/path/to/your/project" }    }  }}

Servers

ServerInstallToolsWhat it does
Pact Tooling — @pact-community/mcp-pact[npm]6REPL test runs, critical-trap scanning, gas estimation, interface diff, format checks
Chainweb API — @pact-community/mcp-chainweb[npm]11/local simulation, pre-signed /send, poll, table reads, SPV proofs, module deploys

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:

bash
code --add-mcp '{"name":"pact","command":"npx","args":["-y","@pact-community/mcp-pact"],"env":{"PACT_COMMUNITY_WORKSPACE_ROOT":"${workspaceFolder}","PACT_COMMUNITY_PACT_BIN":"pact"}}'

On VS Code Insiders, use vscode-insiders: in the links or code-insiders on the command line.

Claude Code

bash
claude mcp add pact -e PACT_COMMUNITY_WORKSPACE_ROOT=/path/to/your/project \  -- npx -y @pact-community/mcp-pact

Any MCP client

Add both servers to your client configuration:

json
{  "mcpServers": {    "pact": {      "command": "npx",      "args": ["-y", "@pact-community/mcp-pact"],      "env": {        "PACT_COMMUNITY_WORKSPACE_ROOT": "/path/to/your/project",        "PACT_COMMUNITY_PACT_BIN": "pact"      }    },    "chainweb": {      "command": "npx",      "args": ["-y", "@pact-community/mcp-chainweb"],      "env": {        "PACT_COMMUNITY_WORKSPACE_ROOT": "/path/to/your/project",        "PACT_COMMUNITY_CHAINWEB_MODE": "devnet",        "PACT_COMMUNITY_CHAINWEB_PROFILE": "devnet",        "PACT_COMMUNITY_CHAINWEB_BASE_URL": "http://localhost:8081",        "PACT_COMMUNITY_CHAINWEB_NETWORK_ID": "development"      }    }  }}

Each server's README documents its full tool list and environment variables: Pact Tooling · Chainweb API.

Your first 10 minutes

  1. Install the Pact CLI — Pact Tooling uses it for REPL runs and gas estimation. Download a release from kadena-io/pact-5, put pact on your PATH, and verify with pact --version.
  2. Add the servers to your client with the config above, pointing PACT_COMMUNITY_WORKSPACE_ROOT at your contract project.
  3. Ask your agent:
    • "Scan contracts/token.pact for critical Pact 5 traps" — flags non-binary +, DB reads inside enforce, built-in shadowing, and more.
    • "Run tests/token.repl and summarize the failures" — executes the file with the real Pact interpreter and parses the results.
    • "Diff the public interface of token.pact against token-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.

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, and chainweb_continue_pact require transactions to be signed externally (Ledger, @kadena/client, …) and passed in pre-signed.
  • Read-only public networks. The testnet06 and mainnet profiles block every write tool with PROFILE_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

ServerLocal devnetTestnetMainnet
Pact Tooling✅——
Chainweb API✅✅ read-only✅ read-only

Contributing

bash
git clone https://github.com/Pact-Community-Organization/pact-mcp.gitcd pact-mcppnpm installpnpm buildpnpm test

Requires Node.js >= 20.11 and pnpm >= 9. See CONTRIBUTING.md for workflow, coding standards, and how to add or change a tool.

License

Apache-2.0

來源:README.md,提交 80e2e60

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分