
How to add OpenZeppelin Contracts MCP Server to Claude Desktop
Let AI agents generate audited smart contracts using OpenZeppelin Contracts libraries. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.
Last updated June 14, 2026 ยท 292โ ยท stdio ยท no auth ยท official
Claude Desktop 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 Claude Desktop โ Settings โ Developer โ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
- 2Paste the OpenZeppelin Contracts MCP Server config below under the top-level "mcpServers" key.
- 3Fill in any placeholder secrets (API keys, paths) in the snippet.
- 4Save the file, then fully quit and reopen Claude Desktop.
- 5Open a chat and confirm OpenZeppelin Contracts MCP Server's tools appear under the ๐ tools menu.
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 Claude Desktop
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 + Claude Desktop FAQ
Where is the Claude Desktop config file?
Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_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 Claude Desktop?
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/.