
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
- 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
- 2Paste the OpenZeppelin Contracts MCP Server config below.
- 3Fill in placeholder secrets, then save.
- 4Click Refresh in the MCP panel.
- 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-erc20Generate a Solidity ERC-20 fungible token contract using OpenZeppelin Contracts.
solidity-erc721Generate a Solidity ERC-721 non-fungible token (NFT) contract using OpenZeppelin Contracts.
solidity-erc1155Generate a Solidity ERC-1155 multi-token contract using OpenZeppelin Contracts.
solidity-stablecoinGenerate a Solidity stablecoin contract using OpenZeppelin Contracts.
solidity-rwaGenerate a Solidity real-world asset (RWA) contract using OpenZeppelin Contracts.
solidity-accountGenerate a Solidity account (smart account) contract using OpenZeppelin Contracts.
solidity-governorGenerate a Solidity governor (on-chain governance) contract using OpenZeppelin Contracts.
solidity-customGenerate 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/.