MCP Directory

OpenZeppelin Contracts MCP Server

Official

Let AI agents generate audited smart contracts using OpenZeppelin Contracts libraries.

Unverified
stdio (local)
No auth
TypeScript

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
claude mcp add OpenZeppelinContracts -- npx -y @openzeppelin/contracts-mcp

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "openzeppelin-contracts-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@openzeppelin/contracts-mcp"
      ]
    }
  }
}

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

Before you start

  • Node.js
  • An MCP-compatible client (Cursor, Windsurf, Claude Desktop, Claude Code, or VS Code)

About OpenZeppelin Contracts MCP Server

A Model Context Protocol server from OpenZeppelin that lets AI agents generate smart contract source code from OpenZeppelin Contracts libraries. Tools are named in the format <language>-<contract> and cover Solidity (erc20, erc721, erc1155, stablecoin, rwa, account, governor, custom), Cairo (erc20, erc721, erc1155, account, multisig, governor, vesting, custom), Confidential (erc7984), Stellar (fungible, stablecoin, non-fungible), Stylus (erc20, erc721, erc1155), and Uniswap Hooks. The server runs locally over stdio via npx and integrates with Cursor, Windsurf, Claude Desktop, Claude Code, and VS Code. A hosted version is available at mcp.openzeppelin.com.

Tools & capabilities (24)

solidity-erc20

Generate a Solidity ERC-20 fungible token contract using OpenZeppelin Contracts.

solidity-erc721

Generate a Solidity ERC-721 non-fungible token (NFT) contract using OpenZeppelin Contracts.

solidity-erc1155

Generate a Solidity ERC-1155 multi-token contract using OpenZeppelin Contracts.

solidity-stablecoin

Generate a Solidity stablecoin contract using OpenZeppelin Contracts.

solidity-rwa

Generate a Solidity real-world asset (RWA) contract using OpenZeppelin Contracts.

solidity-account

Generate a Solidity account (smart account) contract using OpenZeppelin Contracts.

solidity-governor

Generate a Solidity governor (on-chain governance) contract using OpenZeppelin Contracts.

solidity-custom

Generate a custom Solidity contract scaffold using OpenZeppelin Contracts.

cairo-erc20

Generate a Cairo ERC-20 fungible token contract using OpenZeppelin Contracts for Cairo.

cairo-erc721

Generate a Cairo ERC-721 non-fungible token contract using OpenZeppelin Contracts for Cairo.

cairo-erc1155

Generate a Cairo ERC-1155 multi-token contract using OpenZeppelin Contracts for Cairo.

cairo-account

Generate a Cairo account contract using OpenZeppelin Contracts for Cairo.

cairo-multisig

Generate a Cairo multisig contract using OpenZeppelin Contracts for Cairo.

cairo-governor

Generate a Cairo governor contract using OpenZeppelin Contracts for Cairo.

cairo-vesting

Generate a Cairo vesting contract using OpenZeppelin Contracts for Cairo.

cairo-custom

Generate a custom Cairo contract scaffold using OpenZeppelin Contracts for Cairo.

confidential-erc7984

Generate a confidential ERC-7984 contract.

stellar-fungible

Generate a Stellar fungible token contract using OpenZeppelin Contracts for Stellar.

stellar-stablecoin

Generate a Stellar stablecoin contract using OpenZeppelin Contracts for Stellar.

stellar-non-fungible

Generate a Stellar non-fungible token contract using OpenZeppelin Contracts for Stellar.

stylus-erc20

Generate a Stylus ERC-20 contract using OpenZeppelin Contracts for Stylus.

stylus-erc721

Generate a Stylus ERC-721 contract using OpenZeppelin Contracts for Stylus.

stylus-erc1155

Generate a Stylus ERC-1155 contract using OpenZeppelin Contracts for Stylus.

uniswap-hooks

Generate a Uniswap v4 hooks contract using OpenZeppelin Uniswap Hooks.

When to use it

  • Ask an AI coding agent to scaffold an audited ERC-20, ERC-721, or ERC-1155 token directly in your IDE.
  • Generate governance, stablecoin, RWA, or smart-account contracts as a starting point for further customization.
  • Produce Cairo, Stellar, or Stylus contracts for Starknet, Stellar, and Arbitrum Stylus ecosystems via natural-language prompts.
  • Bootstrap Uniswap v4 hooks contracts using OpenZeppelin's Uniswap Hooks library.

Security notes

Runs locally via npx and requires Node.js; no API key or credentials are needed. AI agents decide when and how to call the generation tools and may produce inaccurate results, so always review generated smart contract code before compiling or deploying.

OpenZeppelin Contracts MCP Server FAQ

Does the server require an API key?

No. It runs locally via npx and only requires Node.js; no API key or credentials are configured.

How are the tools named?

Tools are named in the format `<language>-<contract>`, for example `solidity-erc20` or `cairo-governor`. The Uniswap Hooks tool is named just `uniswap-hooks`.

Is there a hosted version?

Yes. In addition to this local server, OpenZeppelin offers a hosted version at https://mcp.openzeppelin.com/.

Are the generated contracts safe to deploy as-is?

AI agents may produce inaccurate results. OpenZeppelin recommends always reviewing generated contracts to ensure they are accurate and suit your purposes before compiling or deploying.

Alternatives to OpenZeppelin Contracts MCP Server

Compare all alternatives →

Microsoft's official browser-automation MCP using Playwright's accessibility tree (no vision model).

Featured
Verified
stdio (local)
No auth
TypeScript
12 tools
Updated 13 days agoRepo

Up-to-date, version-specific library documentation injected into your coding agent.

Verified
stdio (local)
API key
TypeScript
2 tools
Updated 17 days agoRepo

LSP-powered coding agent toolkit: semantic symbol search, references and structural edits.

Verified
stdio (local)
No auth
Python
11 tools
Updated 15 days agoRepo

Compare OpenZeppelin Contracts MCP Server with: