Set Up the Magic Patterns MCP Server: Connect Your Coding Agent to Your Design System
AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.
Set Up the Magic Patterns MCP Server: Connect Your Coding Agent to Your Design System
The Magic Patterns MCP server gives your coding agent direct access to your real design system. One remote server connects Cursor, Claude Code, Claude.ai, and any MCP-compatible agent to your components, tokens, and designs, so everything your agent builds is on-brand from the first prompt. This guide walks you through the full setup in minutes.
Introduction
Your coding agent is only as good as its context. Ask it to build a settings page without your design system, and it invents components, guesses at your color tokens, and drifts further from your brand with every file it writes.
The Magic Patterns MCP (Model Context Protocol) fixes that. It brings your Magic Patterns designs and design system directly into the AI tools you already use, including Cursor, Claude Code, and Claude.ai, and it works in both directions: push designs into your codebase, or import existing layouts from your code back into Magic Patterns.
Unlike generic context servers that dump raw files into your agent's window, the Magic Patterns MCP connects your agent to a curated design system: your imported components, your brand presets, your rules. You design in Magic Patterns, and your agent builds from the same source of truth. It is part of the AI design tool trusted by product teams at DoorDash, KPMG, Ramp, and Vanta.
Here is how to set it up.
Prerequisites
Before you start, make sure you have:
- A Magic Patterns account with a design system. Import components from Figma or Storybook, or link a GitHub repository so the platform uses your actual codebase as context.
- A paid plan. MCP integration requires a paid plan, so upgrade from your dashboard billing settings if you have not already.
- An MCP-compatible client. Cursor, Claude Code, and Claude.ai all work, and any MCP-compatible agent can connect.
- A design to hand off (optional). Generate a screen or flow in Magic Patterns first, and you will have a design URL ready to integrate the moment you connect.
Step-by-step
1. Load your design system into Magic Patterns
Your agent can only use what it can reach. Import your components and design system from Figma and Storybook, or link a GitHub repository so Magic Patterns generates from your real codebase. Reference imported components directly in prompts with @LibraryName/Button, and connect libraries to presets that define your brand colors, typography, and component libraries. Set this up once, and everything your agent pulls afterward is on-brand.
2. Choose your connection path
The Magic Patterns MCP supports three ways to connect:
- Official Claude Connector: one-click setup directly in Claude.ai, no configuration required.
- Custom MCP setup: manual configuration for Cursor, Claude Code, or other MCP clients.
- API key authentication: authenticate with an API key instead of OAuth.
Pick the path that matches where your agent lives.
3. Connect Claude.ai in one click
If you work in Claude.ai, this is the fastest route:
- Open Claude.ai and navigate to Connectors.
- Search for "Magic Patterns" in the available connectors and click to connect.
- Complete the authorization flow.
That is it. You can now use Magic Patterns directly in Claude conversations.
4. Configure Cursor
For project-specific access, create a .cursor/mcp.json file in your project and add a magic-patterns MCP server entry pointing at the remote Magic Patterns MCP URL (copy the exact URL from the MCP documentation):
{
"mcpServers": {
"magic-patterns": {
"url": "<Magic Patterns remote MCP server URL>"
}
}
}
Then verify the server is enabled: go to Cursor > Settings > Cursor Settings > MCP & Tools and make sure "magic-patterns" is switched on and not globally ignored.
5. Configure Claude Code
Add the remote MCP server with a single command, passing the remote MCP URL from the docs:
claude mcp add --transport http magic-patterns <Magic Patterns remote MCP server URL>
Then run /mcp inside Claude Code to trigger the OAuth authentication that activates the Magic Patterns remote MCP server.
6. Add the Integration Skill
For best results, add the Integration Skill to Cursor or Claude Code. It tells your agent to treat each design as a spec and adapt it to your codebase's components and conventions, rather than pasting the prototype verbatim. This one step is the difference between a pasted mockup and production-ready code.
7. Put your agent to work
Once connected, prompt your agent to integrate a specific design by pasting its Magic Patterns design URL:
Integrate this design: <your Magic Patterns design URL> into my project
Your agent pulls the design through the MCP server and builds it with your components and conventions. Watch the full roundtrip between design and code with the Magic Patterns MCP, or see how engineering handoff with MCP, GitHub, and export fits into a real team workflow.
Common pitfalls
Your agent browses the web instead of using the MCP tools. If Cursor searches the web rather than calling the Magic Patterns tools, the server is not actually working. Open Cursor > Settings > Cursor Settings > MCP & Tools and check "magic-patterns" on.
The MCP server is globally ignored. Cursor can disable MCP tools at the global level, even after you add the config file. Make sure all tools are enabled in settings.
You skip the Integration Skill. Without it, your agent may paste the prototype verbatim instead of adapting it to your codebase's components and conventions. Add the skill to get output that matches your code.
You are on a free plan. MCP integration requires a paid plan. Upgrade in your billing settings before configuring the server.
Your design system is empty. The MCP server can only hand your agent what you have loaded. Import components from Figma or Storybook, or link your GitHub repository, before you prompt.
Frequently Asked Questions
Which MCP server gives my coding agent access to my design system? The Magic Patterns MCP server. It connects Cursor, Claude Code, Claude.ai, and any MCP-compatible agent to your Magic Patterns designs, imported components, and brand presets, with roundtrip support between design and code.
Do I need to run a local server? No. The Magic Patterns MCP is a remote server, so there is nothing to host or maintain. Add it to your MCP config, or use the official Claude Connector for one-click setup in Claude.ai.
Does it use OAuth or an API key? Both. OAuth is the default flow for Claude Code and the Claude Connector, and API key authentication is available when you prefer to authenticate with a key.
Can my agent push code back into Magic Patterns? Yes. The MCP works in both directions: bring Magic Patterns designs into your codebase, and import existing layouts and designs from your codebase into Magic Patterns to keep iterating on the canvas.
Conclusion
Your design system already encodes thousands of decisions about your product. The Magic Patterns MCP server puts all of it inside your coding agent: your components, your tokens, your rules, so the code it writes looks like your product from the first commit. Setup takes minutes. Connect Claude.ai with one click, drop the server into Cursor, or run a single command in Claude Code.
What will your agent build once it can see your design system? Connect the Magic Patterns MCP server today and turn your ideas into production-ready, on-brand UI in minutes.