Foundry Zksync logo

Foundry Zksync

Runs zkSync-aware Foundry, Cast, and Anvil tools through MCP for contract development, testing, deployment, and debugging.

Install Foundry Zksync

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "foundry-zksync": {
      "command": "npx",
      "args": [
        "-y",
        "foundry-zksync-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio foundry-zksync -- npx -y foundry-zksync-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

npx -y foundry-zksync-mcp

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The foundry-zksync MCP server exposes Foundry-zksync CLI workflows for zkSync Era development through MCP tools. It covers Forge project operations, Cast contract interactions, deployment and verification, gas analysis, local Anvil-zksync nodes, and zkSync-specific guidance. Run it with npx or build it from source after installing Node.js 18 or newer and foundry-zksync. Reach for it when an AI assistant needs to create, compile, test, deploy, inspect, or troubleshoot a zkSync project.

Use cases

  • Initialize a zkSync Foundry project
  • Compile and test zkSync contracts
  • Deploy and verify contracts
  • Inspect contract calls, balances, and nonces
  • Investigate zkSync-specific errors

Key features

  • zkSync-aware Forge project workflows
  • Cast ABI and contract interaction tools
  • Contract deployment and verification
  • Gas reports and snapshot benchmarking
  • Local anvil-zksync node management
  • Embedded zkSync explanations and documentation lookup

Tools21

What Foundry Zksync lets your agent do. Expand a tool for its parameters.

Verified live~5.6k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

16/17 checks healthy over the last 117d

What it can do

From the 21 tools this server returned when we ran it.

Runs commands · 1Can delete or modify data · 1Handles credentials · 1Read-only tools · 19
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age235 days
Maintainers1

Observed 2026-10-17 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16d ago via OSV.dev · foundry-zksync-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
npm downloads345Package downloads in the last 30 days.
Last commit9mo agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.
Tools exposed21Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Foundry Zksync works

What foundry-zksync MCP server does

The foundry-zksync MCP server connects an MCP-compatible assistant to the foundry-zksync command-line tools used for zkSync Era projects. Its Forge-related tools can initialize a project with zkSync configuration, compile and test contracts, run scripts, deploy contracts, verify deployments, install dependencies, remove build output, and inspect foundry.toml settings.

It also exposes Cast operations for ABI encoding and decoding, calldata decoding, read-only calls, transactions, balance checks, and nonce queries. Gas reports and snapshots support usage analysis and benchmarking. The explain and get_zksync_docs tools provide lookup-oriented assistance for known zkSync issues and documentation topics. The anvil_zksync tool starts or checks a local development node.

How it works

The server receives tool requests over MCP and invokes the corresponding foundry-zksync CLI command. Forge commands use zkSync-specific flags where applicable, such as --zksync; deployment output is parsed into structured results. Testing accepts filter and verbosity options, while script execution supports broadcasting, sender selection, and slow mode. Verification supports Etherscan and the zkSync Explorer.

Signing operations include deployment, transaction sending, and script execution. They can use local private keys, named encrypted keystores, keystore files, Ledger or Trezor devices, and AWS or GCP KMS options. Private keys are visible to the assistant and may be logged, so the documented guidance limits them to local test accounts. Named keystores, hardware wallets, or cloud KMS are intended for safer production workflows.

Setup and configuration

The foundry-zksync MCP server requires Node.js 18 or newer and an installed foundry-zksync distribution through foundryup-zksync. The simplest setup runs it directly with npx:

Terminal
claude mcp add foundry-zksync -- npx -y foundry-zksync-mcp

It can also be registered in Claude Desktop configuration with npx, or installed from source with npm install followed by npm run build. Source-based Claude Code registration points to the built dist/index.js file.

Cloud KMS signing adds provider-specific configuration. AWS KMS uses AWS_KMS_KEY_ID; GCP KMS uses project, location, and related GCP settings. These variables are only relevant when using those signing methods, not for the basic server process.

Tools and capabilities

  • Initialize, compile, test, clean, and configure Forge projects for zkSync.
  • Run scripts, deploy contracts, verify contracts, and install dependencies.
  • Produce gas reports and snapshots for measurement and comparison.
  • Encode ABI values, decode ABI data, and decode calldata.
  • Call contracts without changing state or send state-changing transactions.
  • Query balances and nonces.
  • Start or inspect a local anvil-zksync node.
  • Explain recognized zkSync errors and look up embedded documentation.

Limitations and notes

The server depends on external Node.js and foundry-zksync installations; it does not replace those command-line prerequisites. Private-key parameters should not be used with accounts holding real funds because tool inputs can be exposed to the assistant or logs. The explain and documentation tools are based on embedded knowledge, so their coverage is limited to the included zkSync entries and documentation content.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Foundry Zksync

foundry-zksync is an MCP server that connects AI assistants to the foundry-zksync CLI for zkSync Era development. Its main tools cover Forge project workflows, Cast ABI and contract interactions, contract deployment and verification, gas analysis, zkSync documentation lookup, and anvil-zksync local node management.

Install it with npx using `claude mcp add foundry-zksync -- npx -y foundry-zksync-mcp`. Node.js 18 or newer and foundry-zksync installed through `foundryup-zksync` are required. You can also clone the repository, run `npm install` and `npm run build`, then register the built entry point.

It requires Node.js 18 or newer and an installed foundry-zksync toolchain. The server invokes Forge, Cast, and anvil-zksync commands, so those CLI tools must be available in the environment where the MCP process runs.

Use named encrypted keystores, keystore files, hardware wallets, or cloud KMS for accounts with real funds. Direct `privateKey` parameters are intended for local anvil-zksync test accounts because values supplied to MCP tools may be visible to the assistant or logged.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewFoundry Zksync AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/foundry-zksync?style=directory)](https://allmcps.com/mcp/foundry-zksync)
HTML Embed
<a href="https://allmcps.com/mcp/foundry-zksync"><img src="https://allmcps.com/api/badge/foundry-zksync?style=directory" alt="Foundry Zksync on AllMCPs" /></a>