mcpField
C
Chainweb API

Chainweb API

Local
github.comFinance0Updated 4w ago

About Chainweb API

Chainweb API is an MCP server for querying and submitting transactions to Kadena Chainweb nodes. It supports local simulation, table reads, SPV proofs, and module deployment, while write operations require externally signed transactions and public network profiles are read-only.

Key features

  1. 01Simulate transactions on `/local`
  2. 02Submit pre-signed transactions
  3. 03Poll transaction status
  4. 04Read Chainweb tables
  5. 05Retrieve SPV proofs
  6. 06Deploy modules

Use cases

  1. 01Query block and table data from Chainweb
  2. 02Test transactions against a local node
  3. 03Submit externally signed transactions
  4. 04Deploy Pact modules to a compatible node

MCP support

Exposes Chainweb API operations as tools for MCP clients, including simulation, transaction submission and polling, table reads, SPV proofs, and module deployment. Write operations use pre-signed transactions; testnet06 and mainnet profiles are read-only.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"pact-community-organization-chainweb": {
"command": "npx",
"args": [
"-y",
"@pact-community/mcp-chainweb"
],
"env": {
"PACT_COMMUNITY_WORKSPACE_ROOT": "<PACT_COMMUNITY_WORKSPACE_ROOT>",
"PACT_COMMUNITY_CHAINWEB_MODE": "<PACT_COMMUNITY_CHAINWEB_MODE>",
"PACT_COMMUNITY_CHAINWEB_PROFILE": "<PACT_COMMUNITY_CHAINWEB_PROFILE>",
"PACT_COMMUNITY_CHAINWEB_BASE_URL": "<PACT_COMMUNITY_CHAINWEB_BASE_URL>",
"PACT_COMMUNITY_CHAINWEB_NETWORK_ID": "<PACT_COMMUNITY_CHAINWEB_NETWORK_ID>"
}
}
}
}
Run commandnpx -y @pact-community/mcp-chainweb
Environment variables to set
PACT_COMMUNITY_WORKSPACE_ROOTWorkspace root directory; all file access is confined inside it.
PACT_COMMUNITY_CHAINWEB_MODENetwork mode; must be set and match PACT_COMMUNITY_CHAINWEB_PROFILE (devnet, testnet06, or mainnet).
PACT_COMMUNITY_CHAINWEB_PROFILENetwork profile: devnet (default, read/write), testnet06, or mainnet (both read-only).
PACT_COMMUNITY_CHAINWEB_BASE_URLChainweb node base URL (default per profile).
PACT_COMMUNITY_CHAINWEB_NETWORK_IDNetwork id, e.g. development, testnet06, mainnet01 (default per profile).

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@pact-community/mcp-chainweb0.2.3

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project 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.

{
  "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-pactnpm6REPL test runs, critical-trap scanning, gas estimation, interface diff, format checks
Chainweb API — @pact-community/mcp-chainwebnpm11/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:

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
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:

{
  "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

git clone https://github.com/Pact-Community-Organization/pact-mcp.git
cd pact-mcp
pnpm install
pnpm build
pnpm 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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.