MCP Directory

How to add OpenZeppelin Contracts MCP Server to Cursor

Let AI agents generate audited smart contracts using OpenZeppelin Contracts libraries. Paste the config into ~/.cursor/mcp.json and restart Cursor.

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

Cursor 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 Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the OpenZeppelin Contracts MCP Server config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of OpenZeppelin Contracts MCP Server's tools to confirm it's connected.

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 Cursor

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

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.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 Cursor?

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