---
title: "OpenZeppelin Cairo MCP server: Starknet contracts for AI agents"
description: "Install the OpenZeppelin Cairo MCP server in an Aldena project, with no account, and agents generate Starknet contracts from OpenZeppelin's Cairo library."
url: "https://aldena.ai/mcp-servers/openzeppelin-cairo"
---

# OpenZeppelin Cairo hands agents Starknet contract code built on its library

OpenZeppelin Cairo MCP server. Install the OpenZeppelin Cairo MCP server in an Aldena project, with no account, and agents generate Starknet contracts from OpenZeppelin's Cairo library.

- **Sign-in**: None
- **Installs as**: `openzeppelin-cairo`
- **Transport**: Streamable HTTP
- **Last verified**: 2026-11-28

OpenZeppelin publishes the contract libraries most smart contract teams build on, and its Cairo MCP server generates contracts for Starknet from the OpenZeppelin Contracts for Cairo library. Nine tools cover fungible and non-fungible tokens, the ERC-6909 multi-token, account contracts, multisigs, governors, vesting and custom contracts. Each returns Cairo source as Markdown, and none needs an account or key.

For an Aldena project working on Starknet, the server replaces hand-copied boilerplate with code built from OpenZeppelin library components. An agent asked for a team token vesting schedule calls `cairo-vesting`, saves the result in the repository inside its conversation's sandbox, compiles it, and writes tests for the cliff and the release curve. It opens the pull request through the [GitHub connector](https://aldena.ai/integrations/github) with notes on which library components the contract uses, so the reviewer reads intent and not just generated code.

The generators are not marked read-only, so they start on ask in the project's [permissions](https://aldena.ai/features/human-in-the-loop) until you decide otherwise. Teams that ship on both Starknet and EVM chains add the [OpenZeppelin Solidity MCP server](https://aldena.ai/mcp-servers/openzeppelin-solidity) alongside it, and the [Semgrep MCP server](https://aldena.ai/mcp-servers/semgrep) for a security scan before review.

## With OpenZeppelin Cairo, your agents can

- Generate Cairo token contracts for ERC-20, ERC-721, ERC-1155 and ERC-6909
- Create Starknet account contracts that can carry custom logic
- Build multisig contracts that need a quorum of signers to act
- Set up vesting contracts that release ERC-20 tokens on a schedule
- Generate governor contracts for DAO-style voting on Starknet

## Try asking

- “Use OpenZeppelin Cairo to generate an ERC-20 token for Starknet called Pebble with a fixed supply, and add it to the contracts folder with a test.”
- “Generate a Cairo multisig contract that needs 3 of 5 signers, then write tests in the sandbox that cover a rejected and an executed transaction.”
- “Create a Cairo vesting contract for our team tokens with a one-year cliff and explain each storage variable it uses.”

## OpenZeppelin Cairo MCP tools

| Tool | What it does | Access |
| --- | --- | --- |
| `cairo-erc20` | Generates a fungible ERC-20 token contract in Cairo | Read |
| `cairo-erc721` | Generates an ERC-721 non-fungible token contract in Cairo | Read |
| `cairo-erc1155` | Generates an ERC-1155 multi-token contract in Cairo | Read |
| `cairo-erc6909` | Generates a minimal ERC-6909 multi-token contract in Cairo | Read |
| `cairo-account` | Generates a Starknet account contract that can be extended with custom logic | Read |
| `cairo-multisig` | Generates a multisig contract that needs a quorum of signers to execute | Read |
| `cairo-governor` | Generates a governance contract, such as for a DAO | Read |
| `cairo-vesting` | Generates a contract that releases ERC-20 tokens to a beneficiary on a schedule | Read |
| `cairo-custom` | Generates a custom Cairo smart contract | Read |

## Server

- **Server URL**: `https://mcp.openzeppelin.com/contracts/cairo/mcp`
- **Website**: [openzeppelin.com](https://www.openzeppelin.com)
- **MCP docs**: [OpenZeppelin Cairo MCP docs](https://mcp.openzeppelin.com)

## How to connect OpenZeppelin Cairo

1. **Open Marketplace.** In a project, open Settings → Connectors → MCP servers and press Marketplace.
2. **Install OpenZeppelin Cairo.** Search for OpenZeppelin Cairo and press Install. Aldena adds it as `openzeppelin-cairo`.
3. **Nothing to sign in to.** Aldena installs OpenZeppelin Cairo with no sign-in or key, so its tool calls carry no credentials.
4. **Let agents use it.** Agents find its tools with `mcp_search` and call them with `mcp_call`. Each tool gets its own row in the project's permissions.

## Related MCP servers

- [OpenZeppelin Solidity MCP server](https://aldena.ai/mcp-servers/openzeppelin-solidity): Generate and review Solidity smart contracts.
- [PagerDuty MCP server](https://aldena.ai/mcp-servers/pagerduty): Read incidents, on-call schedules, and services.
- [Parallel Search MCP server](https://aldena.ai/mcp-servers/parallel-search): Run web searches built for agent research.
- [Parallel Task MCP server](https://aldena.ai/mcp-servers/parallel-task): Run deep research tasks that return structured output.
- [All MCP servers](https://aldena.ai/mcp-servers)

## FAQ

### Does the OpenZeppelin Cairo server write files or deploy contracts?

Neither. Each tool returns the generated contract's source as a Markdown code block and writes nothing to disk. The agent saves the code into the repository in its own sandbox, compiles and tests it there, and any deployment to Starknet stays a separate step you run.

### Why do the Cairo tools start on ask in Aldena?

Aldena starts a tool on allow only when the server marks it read-only, and none of the nine Cairo generators carries that mark. They only return source code, so you can switch them to allow in the project's permissions once you have seen what they produce.

### When should I use the Cairo server instead of the Solidity one?

When the contract targets Starknet. Cairo is Starknet's language and has its own OpenZeppelin library, with account contracts at its core. For Ethereum and other EVM chains, install the OpenZeppelin Solidity MCP server, which generates Solidity from the EVM library instead.
