MCP Directory

How to add OpenZeppelin Contracts MCP Server to Windsurf

Let AI agents generate audited smart contracts using OpenZeppelin Contracts libraries. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.

Last updated June 14, 2026 · 292 · stdio · no auth · official

Windsurf config for OpenZeppelin Contracts MCP Server

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

Setup steps

  1. 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
  2. 2Paste the OpenZeppelin Contracts MCP Server config below.
  3. 3Fill in placeholder secrets, then save.
  4. 4Click Refresh in the MCP panel.
  5. 5OpenZeppelin Contracts MCP Server's tools become available to Cascade.

Before you start

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

What OpenZeppelin Contracts MCP Server can do in Windsurf

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.

Security

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 + Windsurf FAQ

Where is the Windsurf config file?

Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the OpenZeppelin Contracts MCP Server config there under the "mcpServers" key and restart the client.

Is OpenZeppelin Contracts MCP Server safe to use with Windsurf?

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.

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/.

View repo Full OpenZeppelin Contracts MCP Server page