Skip to main content
Connect an agent like Claude Code, Claude, Cursor, or Codex to a Magic Patterns project, and it can go roundtrip: it can read the project to build it into your codebase, and it can write to the project to bring your code, docs, and other context into Magic Patterns. One connection does both. The Magic Patterns MCP makes the connection. MCP (Model Context Protocol) is a standard way to connect AI agents to other tools. Connect it before you paste a magicpatterns.com/os/... link into your agent.

Connect from your project

The quickest way to connect is from inside the project you want your agent to work on.
1

Open the Agents tab

In your project, click Share in the top right and open the Agents tab.
2

Pick your agent

Choose Claude Code, Claude App, Cursor, Codex, or Manual for any other MCP client. The steps below the picker change to match.
3

Follow the numbered steps

Each step has what you need to copy or click: the commands to run, a one-click install link, or a config to paste. For Claude Code, that’s installing the plugin, then running /mcp to sign in.
4

Copy a prompt for the direction you want

The last step gives you an example prompt with your project’s link already filled in. Pick a direction, copy the prompt, and paste it into your agent.
Prefer to set it up by hand? Each agent has a Set it up by hand option under its steps, and the sections below cover every option in full.

Go roundtrip

Once your agent is connected, it can move work in either direction. You don’t need to reconnect or change anything to switch: just ask for the other direction. A typical loop looks like this: bring your existing screens in with Code → Magic Patterns, iterate on them in Magic Patterns, then hand the result back with Magic Patterns → Code. Repeat as often as you like.
Use the link from Share as <your project link>. If you’re sharing a single file, its link points the agent straight at that file.

Connection options

Official Claude connector

One-click install from the Claude directory

Official Cursor plugin

One-click install from the Cursor Marketplace

Official Codex plugin

One-click install from the ChatGPT and Codex plugin directory

Custom MCP setup

Configure in Cursor, Claude Code, Codex, or other MCP clients

API key authentication

Authenticate with an API key instead of OAuth

Official Claude connector

Magic Patterns is available as an official connector in the Claude directory. This is the easiest way to get started in Claude and Claude Code, and it needs no configuration.
1

Open the Claude directory listing

Go to claude.ai/directory/magic-patterns and click to add it. You can also find it from Claude’s Connectors icon or your integrations settings.
2

Find Magic Patterns

Search for “Magic Patterns” in the available connectors and click to connect.
Magic Patterns Connector in Claude.ai
3

Authorize and start using

Complete the authorization flow, and you’re ready to use Magic Patterns directly in Claude conversations.

Official Cursor plugin

Magic Patterns is available as an official plugin in the Cursor Marketplace. This is the easiest way to use Magic Patterns from Cursor. Installing the plugin wires up the MCP server for you.
Magic Patterns plugin in the Cursor Marketplace
1

Open the Cursor Marketplace

In Cursor, go to Settings → Plugins (or open the Marketplace) and search for Magic Patterns.
2

Install the plugin

Click Install. The plugin registers the Magic Patterns MCP server automatically.
3

Authenticate and start building

Complete the OAuth flow to connect your Magic Patterns account, then prompt Cursor to create, edit, or integrate a Magic Patterns design.
The plugin also includes the Integration skill, which has the agent adapt a design to your codebase’s components and conventions.

Official Codex plugin

Magic Patterns is available as an official plugin in the ChatGPT and Codex plugin directory. This is the recommended way to use Magic Patterns from Codex, and it needs no API key or custom MCP configuration. Installing the plugin connects the Magic Patterns tools.
1

Open the plugin directory

In the ChatGPT desktop app or Codex, open Plugins and search for Magic Patterns. In the Codex CLI, run /plugins to open the plugin browser.You can also open the listing directly: Magic Patterns in the plugin directory.
2

Install the plugin

Select Install plugin. Complete the connection flow to link your Magic Patterns account when prompted.
3

Start a new session and build

Start a new Codex session so the plugin’s tools load, then prompt Codex to create, edit, or integrate a Magic Patterns design:
The Codex plugin bundles no skills. Add the Integration skill to adapt designs to your codebase.

Custom MCP setup

For tools like Cursor, Claude Code, or Codex, you can configure the Magic Patterns MCP server manually. If you’re on Cursor or Codex, prefer the official plugins above. This section is for other MCP clients or for pinning a specific configuration.
If you set up the MCP yourself, also add the Integration skill. It tells the agent to treat the prototype as a spec and adapt it to your codebase’s components and conventions, rather than pasting the prototype verbatim.
1

Add to your MCP config

Create a .cursor/mcp.json in your project for project-specific tools. Cursor instructions here.
2

Verify MCP is enabled

If Cursor searches the web instead of calling Magic Patterns tools, the MCP isn’t on. Turn on magic-patterns in Cursor’s settings, and make sure it isn’t globally ignored.
Ensure MCP is enabled in Cursor settings
3

Reference your designs

Once connected, you can prompt Cursor to access a specific design. For example:

Cursor troubleshooting

Make sure all the tools are turned on in Cursor > Settings > Cursor Settings > MCP and Tools.
Cursor Settings for MCP

Read-only mode

If you want to expose Magic Patterns to an AI client without granting permission to create, modify, or publish designs, point the client at the read-only endpoint https://mcp.magicpatterns.com/mcp/readonly instead of https://mcp.magicpatterns.com/mcp. The same OAuth flow and API keys work against both URLs. Only the following tools are exposed on the read-only endpoint:
  • legacy_list_design_systems
  • legacy_get_editor_id_from_url
  • legacy_get_inspiration_document
  • legacy_get_design_status
  • legacy_read_recent_message_history
  • legacy_list_version_history
  • legacy_get_artifact
  • legacy_read_artifact_files
  • legacy_get_design_system
  • legacy_read_design_system_files
  • send_feedback_to_magic_patterns_team
Destructive tools (legacy_create_design, legacy_create_slide_deck, legacy_send_prompt, legacy_create_new_artifact, legacy_write_artifact_files, legacy_publish_artifact, legacy_create_design_system, legacy_write_design_system_files, legacy_publish_design_system) are not registered on this endpoint, so the client cannot list or call them.

API key authentication

If you prefer not to use OAuth, you can authenticate the MCP server with a Magic Patterns API key. This is useful for headless environments, CI, or any client where the interactive OAuth flow is impractical.
1

Create an API key

Open Settings → API Keys and click Create Key. Copy the key immediately, because you can only see it once.
2

Pass the key as a Bearer token

Configure the MCP server exactly as in Custom MCP Setup, but add an Authorization: Bearer <your-api-key> header. When a key is present, the OAuth flow is skipped entirely.
3

(Optional) Identify your agent

Pass the x-mp-agent-name header to tag requests with your agent or integration name. This is optional but helps with attribution in the Magic Patterns UI.