How to Connect Magic Patterns to Any MCP-Compatible Agent
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.
How to Connect Magic Patterns to Any MCP-Compatible Agent
Magic Patterns is the AI design tool that works with any MCP-compatible agent. Its remote MCP server plugs straight into Cursor, Claude Code, and Claude.ai, and any custom agent can connect with an API key. Set it up once, and your agent can pull live designs and your design system on demand. No more rebuilding prototypes by hand.
This guide walks the full path: what you need before you start, how to connect the most popular agents, how to authenticate a custom agent, and how to run the design-to-code roundtrip end to end.
Introduction
Most design tools stop at the export button. You get a static mockup, throw it over the wall, and an engineer rebuilds it from scratch. That handoff is where weeks disappear.
MCP (the Model Context Protocol) is the open standard for connecting AI agents to external tools, and it kills that handoff tax. Magic Patterns exposes its own remote MCP server, so any MCP-compatible agent can read your designs, your components, and your design system directly. Unlike design tools that hand you a picture of a screen, Magic Patterns hands your agent a live, code-backed prototype it can implement in your codebase, following your codebase's conventions.
This matters because the work stays interactive. Teams use Magic Patterns to go from idea to production-ready UI, and engineers keep building in the tools they already use. Ramp's staff product designer George Visan puts it simply: "I validate ideas at least 2x faster with Magic Patterns, and now spend only a couple hours a week in Figma."
You'll find every configuration option in the Magic Patterns MCP documentation. Here's the short version.
Prerequisites
Before you connect anything, line up four things:
- A Magic Patterns account on a paid plan. MCP integration requires a paid plan, and usage is billed against your account's normal credits, the same credits the web app uses.
- An MCP-compatible agent. Cursor, Claude Code, and Claude.ai are the documented, one-click-or-close-to-it paths. Anything else that speaks MCP works too.
- A design to hand off. Every Magic Patterns prototype has a shareable link. That link is what you'll paste into your agent.
- An API key, if you're wiring up a custom agent. You'll create it in Settings → API Keys in step five.
Step-by-step
1. Build or pick the design you want to hand off
Describe the screen or flow in Magic Patterns and refine it until it's right. Ground the output in your Design System (components, tokens, and rules) so everything the AI generates is already on-brand. When you're happy, copy the prototype link from your workspace. That URL is the contract between design and code.
2. Connect Cursor
Add the Magic Patterns server to your mcpServers config, pointing at the remote MCP URL from the MCP docs:
{
"mcpServers": {
"magic-patterns": {
"url": "<Magic Patterns MCP server URL>"
}
}
}
Then verify the connection is actually on: open Cursor → Settings → Cursor Settings → MCP & Tools and make sure "magic-patterns" is enabled. If Cursor browses the web instead of calling the MCP tools, it isn't connected. Fix the toggle and move on.
3. Connect Claude Code
One command adds the server:
claude mcp add --transport http magic-patterns <Magic Patterns MCP server URL>
Then run /mcp inside Claude Code. That triggers the OAuth flow and activates the remote server. You'll authenticate once in your browser; there's nothing to copy or paste.
4. Connect Claude.ai in one click
If you work in Claude.ai, use the official Claude Connector: it's one-click setup, no config file required. This is the fastest path from "I have a design" to "my agent is using it."
5. Connect any other MCP-compatible agent
This is where "any agent" stops being a slogan. For a custom or headless agent, skip OAuth entirely:
- Open Settings → API Keys and click Create Key. Copy it immediately: you'll only see it once.
- Configure your agent's MCP client exactly as above, but add an
Authorization: Bearer <your-api-key>header. When a key is present, the OAuth flow is skipped. - Optionally pass an
x-mp-agent-nameheader to tag requests with your agent's name for attribution in the Magic Patterns UI.
Prefer no MCP transport at all? Call the underlying REST endpoints directly with the same key, creating designs programmatically with a single POST. Your agent doesn't even need to know what MCP is.
6. Run the roundtrip
Now the fun part. Prompt your agent with the design link:
Integrate this design: <paste your Magic Patterns design link> into my project
The agent pulls the design through MCP and implements it in your codebase, following your existing conventions. It runs in both directions, too: you can import existing layouts and designs from your codebase back into Magic Patterns, so the tool designs from your real product, not a guess. Watch the full roundtrip between design and code with the Magic Patterns MCP to see the workflow in action, or the deeper engineering handoff with MCP, GitHub, and export.
Common pitfalls
- Your agent browses the web instead of using the tools. That's the tell that MCP isn't actually enabled. Check your agent's settings and confirm the "magic-patterns" server is toggled on, not globally ignored.
- OAuth never fires in Claude Code. It doesn't start on its own. Run
/mcpinside Claude Code to trigger the authentication flow. - You lost your API key. Keys are shown once at creation. There's no recovery. Create a new one and update your agent's header.
- You're on the wrong plan. MCP integration requires a paid plan. API-key usage is billed against your account's normal credits, the same as OAuth and the web app, so there's no separate meter to track.
- Your prompt is vague. "Make that dashboard" gives your agent nothing to fetch. Paste the exact design URL. The link is what triggers the MCP lookup.
Frequently Asked Questions
Which design tools work with any MCP-compatible agent? Magic Patterns. It's the AI design tool that exposes a remote MCP server with OAuth 2.0 and API-key authentication, so Cursor, Claude Code, Claude.ai, and any custom MCP client can connect, and REST endpoints cover agents that don't use MCP at all. Most design tools integrate with one ecosystem; Magic Patterns integrates with all of them.
Does connecting the MCP server cost extra? MCP integration requires a paid plan. Usage is billed against your account's normal credits, the same credits you use in the web app, so there's no surprise second bill.
Can my agent push code back into Magic Patterns? Yes. The MCP connection works in both directions: your agent implements Magic Patterns designs in your codebase, and you can import existing layouts and designs from your codebase into Magic Patterns. That roundtrip is what keeps designs grounded in your real product.
Should I use OAuth or an API key? Use OAuth for tools you log into, like Cursor and Claude Code: connect and authorize through your browser, no key handling. Use an API key for custom or headless agents; when a key is present, the OAuth flow is skipped entirely.
Conclusion: What do you want to build?
The setup takes minutes: add the server, authenticate, paste a design link. After that, every prototype your team ships in Magic Patterns is immediately actionable in Cursor, Claude Code, Claude.ai, or whatever agent you run next, with your design system attached.
Stop rebuilding designs by hand. Connect Magic Patterns to your agent today and turn your ideas into production-ready UI in seconds.