Skip to main content
Magic Patterns MCP logo
  • Category: model context protocol
  • Auth: DCR_OAUTH
  • Composio-managed OAuth available? No
  • Tools: 23
  • Triggers: 0
  • Slug: MAGIC_PATTERNS_MCP
  • Version: 20261018_00

Tools

Slug: MAGIC_PATTERNS_MCP_CREATE_DESIGNCreates a new Magic Patterns design. This is the starting point for both prompt-based and code-first workflows.BEHAVIOR:
  • With prompt: Creates a design and kicks off AI generation (long-running, especially when design-system setup is involved). Do not wait synchronously; poll get_design_status to track progress.
  • Without prompt: Creates a blank design with scaffold files (App.tsx, index.tsx, index.css, tailwind.config.js) — returns immediately.
  • With templateId: Forks an existing design first, then optionally applies the prompt to the fork. The templateId is an editor ID — you can get it from a design URL (the ID in magicpatterns.com/c/<id>) or via get_editor_id_from_url.
You can optionally specify a design system. If the user mentions one, call list_design_systems first.NEXT STEPS:
  • With prompt: Call get_design_status(editorId) to poll until generation completes. This often takes a while, so the caller should keep polling instead of assuming the design is ready immediately.
  • Without prompt: Call get_design_status(editorId) to get the active artifact, then create_new_artifact to start editing.

Input Parameters

string
Optional name for the design. Defaults to “Untitled”.
string
Optional natural language prompt for AI generation. If omitted, a blank design with scaffold files is created instantly.
array
Optional image URLs as visual references (only used with prompt).
string
Optional editor ID of an existing design to use as a template. The design will be forked first, then any prompt is applied to the fork. Get the ID from the design URL (magicpatterns.com/c/<id>) or via get_editor_id_from_url.
string
Optional design system name (e.g. “Shadcn”, “MUI”). Resolved case-insensitively. designSystemId takes precedence if both provided.
string
Optional design system ID. Use list_design_systems to discover IDs.

Output

string
required
The editor ID — pass to get_design_status, send_prompt, and other editor-scoped tools.
string
required
URL of the design editor.
string
URL of the live preview, if available.
array
required
File names in the active artifact.
string
required
The active artifact ID, or null if none yet.
Slug: MAGIC_PATTERNS_MCP_CREATE_DESIGN_SYSTEMCreates a new, blank design system owned by you and returns its ID + editor URL. Seeds an empty initial version so you can immediately write files into it.NEXT STEPS:
  • write_design_system_files(designSystemId, files) to add components, styling, and rules
  • publish_design_system(designSystemId) to publish a version
Note: this creates a BLANK design system. Forking from an existing design system is not supported here.

Input Parameters

Optional logo URL. Defaults to a placeholder.
string
required
The name of the new design system.

Output

string
required
The design system name.
string
required
URL of the design system editor.
string
required
The new design system ID (ds-…).
Slug: MAGIC_PATTERNS_MCP_CREATE_INSPIRATION_DOCUMENTCreates a Magic Patterns inspiration document and returns a shareable magicpatterns.com/inspiration/<id> link that renders the concepts side by side.Preferred flow: create a PLACEHOLDER here by declaring each concept’s { name, description } WITHOUT html, then fill each one in with a separate inspiration_add_variant call (passing the html directly). This lets you publish the link immediately and stream each concept in without ever holding all the HTML at once. The page shows a loading tile per declared concept until its html arrives.You may also pass html inline for any/all concepts to publish them fully in one call (the document is only marked ready once every concept has html).INPUT:
  • title: short label for what the concepts explore (e.g. “Projects list empty state”).
  • files: 1-8 concepts, each { name, description, html? }. Omit html to declare a placeholder concept to fill later via inspiration_add_variant.
  • repositoryUrl: optional GitHub repo the concepts came from (kept for context).
  • baseline: optional { html, focus, sharedCopy, baselineStyle } — the baseline the variants diverge from (html is the faithful recreation of the current UI).
RESPONSE: { id, url, variants: [{ id, name }] }. Pass each variant id (with the inspiration id) to inspiration_add_variant to fill it in. Return the url to the user; it may require login.

Input Parameters

array
required
The concepts to publish or declare (1-8).
string
Short label for what the concepts explore.
object
Optional baseline the variants diverge from (recreation of the current UI + pinned invariants).
string
Optional GitHub repo URL the concepts were generated from.

Output

string
required
The inspiration document id.
string
required
The shareable magicpatterns.com/inspiration/<id> URL to return to the user.
array
required
The declared concepts, in order.
Slug: MAGIC_PATTERNS_MCP_CREATE_NEW_ARTIFACTCreates a new artifact by cloning an existing artifact. The new artifact becomes the active artifact for the design. This gives you a safe “branch” to write code to before publishing.BEFORE CALLING: Always call get_design_status or get_artifact first to get the CURRENT active artifact ID. The user may have changed the active artifact in the UI since you last checked.WHEN TO USE: Call this BEFORE making file changes (write_artifact_files) so the user can revert to the previous artifact if needed.The new artifact is set as active and a version entry is added to the design timeline with the provided name.NEXT STEPS:
  • Call read_artifact_files(artifactId, fileNames) to understand existing code.
  • Call write_artifact_files(artifactId, files) to make changes.
  • Call publish_artifact(artifactId, editorId) when done.

Input Parameters

string
required
A short title for this version, phrased as the change you are about to make (e.g. “Swap hero CTA to solid variant”). Shown in the design timeline and the versions dropdown, so keep it to a few words.
string
required
The artifact ID to clone from (typically the active artifact from get_artifact or get_design_status).
string
Optional longer note on what you are about to change and why, shown above the version in chat. Prefer describing what actually shipped via publish_artifact instead — use this for a session that may not reach publish.

Output

array
required
File names in the new artifact.
string
required
The new artifact ID.
Slug: MAGIC_PATTERNS_MCP_CREATE_SLIDE_DECKCreates a new Magic Patterns slide deck and kicks off AI generation. A slide deck is a 16:9, full-bleed, one-slide-at-a-time React presentation where each slide maps to a screen in the canvas.BEHAVIOR:
  • A prompt is REQUIRED — the deck is generated from it (unlike create_design, there is no blank-deck path).
  • Generation is long-running (especially with design-system setup). Do not wait synchronously; poll get_design_status to track progress.
You can optionally specify a design system. If the user mentions one, call list_design_systems first.NEXT STEPS:
  • Call get_design_status(editorId) to poll until generation completes. This often takes a while, so keep polling instead of assuming the deck is ready immediately.

Input Parameters

string
Optional name for the slide deck. Defaults to “Untitled”.
string
required
Natural language description of the slide deck to generate (e.g. “A 10-slide startup pitch deck for a fintech company”).
array
Optional image URLs as visual references.
string
Optional design system name (e.g. “Shadcn”, “MUI”). Resolved case-insensitively. designSystemId takes precedence if both provided.
string
Optional design system ID. Use list_design_systems to discover IDs.

Output

string
required
The editor ID — pass to get_design_status, send_prompt, and other editor-scoped tools.
string
required
URL of the deck editor.
string
URL of the live preview, if available.
array
required
File names in the active artifact.
string
required
The active artifact ID, or null if none yet.
Slug: MAGIC_PATTERNS_MCP_GET_ARTIFACTGets the active artifact for a design, including its ID and list of files.Use this to discover the current artifact before reading files or creating a new artifact branch. Because the editor is collaborative, always call this (or get_design_status) to get the LATEST active artifact — do not rely on a previously cached artifact ID.NEXT STEPS:
  • Call read_artifact_files(artifactId, fileNames) to read code.
  • Call create_new_artifact(artifactId, name) to create a working copy before making changes.

Input Parameters

string
required
The editor ID of the design.

Output

array
required
File names in the active artifact.
string
required
The active artifact ID.
Slug: MAGIC_PATTERNS_MCP_GET_DESIGN_STATUSGets the current status of a design: whether AI generation is active, the active artifact ID, and available files.ALWAYS call this before starting new work on an existing design. The user or other agents may have changed the active artifact, sent prompts, or made edits in the UI since you last checked. This is your source of truth for the current state.Also use this to poll for completion after create_design (with prompt) or send_prompt.RESPONSE:
  • isGenerating: true if AI is still working
  • activeArtifactId: the current active artifact ID (use for create_new_artifact, read_artifact_files, etc.)
  • availableFiles: list of file names in the active artifact
NEXT STEPS:
  • If isGenerating=true: Wait at least 60 seconds before polling again. Generation can take up to 10 minutes.
  • If isGenerating=false: Use activeArtifactId with create_new_artifact (for code-first edits) or read_artifact_files (to inspect generated code).

Input Parameters

string
required
The editor ID from create_design or get_editor_id_from_url.

Output

boolean
required
True if AI generation is still in progress — wait 60 seconds and poll again.
array
required
File names in the active artifact.
string
required
The current active artifact ID, or null if none.
Slug: MAGIC_PATTERNS_MCP_GET_DESIGN_SYSTEMResolves a design system’s active artifact and lists its files. ALWAYS call this first — design systems are collaborative, so the active artifact id can change between calls; never reuse a cached artifactId.Returns:
  • artifactId: the current active artifact (pass as baseArtifactId to write_design_system_files to detect drift)
  • files: the persisted files (e.g. components/<Name>/, index.css, tailwind.config.js, rules/)
  • hasUnpublishedChanges: whether the active artifact differs from the latest published version
  • guide: pointer to the design_system_authoring_guide prompt — load it before writing files
NEXT STEPS:
  • read_design_system_files(designSystemId, fileNames) to read file contents
  • write_design_system_files(designSystemId, files) to create or update files
  • publish_design_system(designSystemId) to publish a new version

Input Parameters

string
required
The design system ID (ds-…). Use list_design_systems to discover available design systems.

Output

string
required
The design system name.
array
required
The persisted file names.
string
required
Pointer to the design_system_authoring_guide prompt.
string
required
The current active artifact. Pass as baseArtifactId to write_design_system_files to detect drift.
string
required
The design system ID (ds-…).
boolean
required
Whether the active artifact differs from the latest published version.
Slug: MAGIC_PATTERNS_MCP_GET_EDITOR_ID_FROM_URLResolves a Magic Patterns URL to an editor ID. Use this when the user shares a Magic Patterns link and you need the editorId for subsequent operations like send_prompt or get_design_status.NEXT STEPS: Use the returned editorId with send_prompt, get_design_status, get_artifact, or other editor-scoped tools.

Input Parameters

string
required
The Magic Patterns URL. Supported formats: - Design: “magicpatterns.com/c/<id>” or “https://www.magicpatterns.com/c/&lt;id>” - Published: “project-<slug>.magicpatterns.app” - Canvas: “magicpatterns.com/s/<canvasId>?nodeIds=<nodeId>“

Output

string
required
The resolved editor ID for use with editor-scoped tools.
Slug: MAGIC_PATTERNS_MCP_GET_INSPIRATION_DOCUMENTLoads a Magic Patterns inspiration document by its id. An inspiration document is a set of design “concepts” (variants) — each a self-contained HTML sketch of a UI direction.Use this when the user asks to implement/build a specific concept from a Magic Patterns inspiration (e.g. “Implement Concept B from Magic Patterns inspiration <id>”). Pass the inspiration id as inspirationId.RESPONSE:
  • title, userPrompt: the original request the concepts explore
  • viewport: the canvas the concepts were authored against (absent = 1280x800 desktop). Any concept you regenerate must be authored at these exact dimensions.
  • status: ‘generating’ while concepts are still being produced, else ‘ready’/‘error’.
  • variants: the concepts, in order. Concept A = variants[0], Concept B = variants[1], etc. Each has { id, name, description, implementationPrompt, html, status }. A variant is only usable once its status is ‘ready’; a non-ready one has empty/partial html and must NOT be recreated (retry after generation finishes).
NEXT STEPS: Pick the referenced concept (by letter/name), confirm its status is ‘ready’, then recreate its html as a React + TypeScript component in the user’s project, keeping the styling 1:1 (same layout, colors, spacing, typography; copy SVGs verbatim).

Input Parameters

string
required
The Magic Patterns inspiration document id (the <id> in magicpatterns.com/inspiration/<id>).

Output

string
required
The inspiration document id.
string
required
Short label for what the concepts explore.
string ("generating" | "ready" | "error")
required
‘generating’ while concepts are still being produced, else ‘ready’/‘error’.
object
The baseline the variants diverge from, if provided.
array
required
The concepts, in order (Concept A = variants[0]).
object
The canvas the concepts were authored against (absent = 1280x800 desktop). Regenerate concepts at these exact dimensions.
string
required
The original request the concepts explore.
Slug: MAGIC_PATTERNS_MCP_INSPIRATION_ADD_VARIANTFills in one concept of an existing Magic Patterns inspiration document with its self-contained HTML.Use this after create_inspiration_document to stream concepts in one at a time: pass the html directly here instead of holding it all for a single create call. The concept renders live on the shared page as soon as its html arrives, and the document flips to “ready” once every concept is filled.INPUT:
  • inspirationId: the inspiration document id returned by create_inspiration_document.
  • variantId: the concept id returned by create_inspiration_document (targets that specific placeholder). If omitted, the first still-empty concept is filled.
  • name / description: optional; updates the concept’s label/direction.
  • html: the full, self-contained HTML document (non-empty).
RESPONSE: { ok, variantId, url }.

Input Parameters

string
required
The full, self-contained HTML document (non-empty).
string
Optional update to the concept’s name.
string
The concept id to fill (from create_inspiration_document). Omit to fill the first still-empty concept.
string
Optional update to the concept’s design direction.
string
required
The inspiration document id returned by create_inspiration_document.

Output

boolean
required
Whether the concept was filled in.
string
required
The shareable inspiration document URL.
string
required
The id of the concept that was filled in.
Slug: MAGIC_PATTERNS_MCP_INSPIRATION_CLEAR_VARIANTSResets every concept of an existing Magic Patterns inspiration document back to an empty placeholder — dropping each concept’s html and its pre-created “Iterate” room.Use this to REPLACE all concepts: clear the document, then invent a fresh set of directions and stream each one’s html back in with inspiration_add_variant (targeting the returned concept ids). The document shows loading tiles again until the new concepts arrive.INPUT:
  • inspirationId: the inspiration document id returned by create_inspiration_document.
RESPONSE: { ok, url, variants: [{ id, name }] }. Each concept keeps its id and name; pass them to inspiration_add_variant (with a new name/description/html) to fill the fresh concepts in.

Input Parameters

string
required
The inspiration document id returned by create_inspiration_document.

Output

boolean
required
Whether the concepts were cleared.
string
required
The shareable inspiration document URL.
array
required
The now-empty concepts, in order.
Slug: MAGIC_PATTERNS_MCP_INSPIRATION_UPDATE_VARIANTRevises a single already-filled concept of a Magic Patterns inspiration document in place, replacing its html (and optionally its name/description).Use this to UPDATE a subset of concepts (e.g. “focus more on the messaging”, “update Concept C”) without touching the others: read the current concepts with get_inspiration_document, regenerate the targeted concept FROM ITS PREVIOUS html, then push the revised html here. The concept’s “Iterate in Magic Patterns” room is refreshed so it builds from the new html.INPUT:
  • inspirationId: the inspiration document id.
  • variantId: the concept id to revise (from get_inspiration_document). Required — this targets an existing filled concept, unlike inspiration_add_variant which fills empty placeholders.
  • name / description: optional; updates the concept’s label/direction.
  • html: the full, self-contained HTML document (non-empty).
RESPONSE: { ok, variantId, url }.

Input Parameters

string
required
The full, self-contained HTML document (non-empty).
string
Optional update to the concept’s name.
string
required
The concept id to revise (from get_inspiration_document). Targets an existing filled concept.
string
Optional update to the concept’s design direction.
string
required
The inspiration document id.

Output

boolean
required
Whether the concept was updated.
string
required
The shareable inspiration document URL.
string
required
The id of the concept that was revised.
Slug: MAGIC_PATTERNS_MCP_LIST_DESIGN_SYSTEMSLists the design systems available to the authenticated user. Returns both built-in (reserved) design systems and any custom design systems the user has created or has access to.Use this when the user mentions a specific design system (e.g. “use Shadcn”, “with my company design system”) so you can resolve the correct ID to pass to create_design.Each result includes:
  • id: The unique design system ID to pass to create_design
  • name: The human-readable name
  • isReserved: Whether it is a built-in preset (e.g. Base, Shadcn, MUI)
  • isActive: Whether this is the user’s currently active design system

Output

array
required
The design systems available to the authenticated user.
Slug: MAGIC_PATTERNS_MCP_LIST_VERSION_HISTORYLists the artifact version history for a design. Returns the most recent 20 versions with their artifact IDs, version labels, and titles. Use the skip parameter to paginate backwards.Because the editor is collaborative, new versions may have been created by the user or AI since you last checked. Use this alongside get_design_status to understand the full picture.Each version corresponds to a snapshot of the design’s code at a point in time. Use the artifactId from a version entry to read_artifact_files for that version, or create_new_artifact to branch from it.

Input Parameters

number
Number of recent versions to skip (for pagination). Defaults to 0 (most recent).
string
required
The editor ID of the design.

Output

boolean
required
Whether older versions exist (paginate with skip).
array
required
The most recent versions, newest first.
Slug: MAGIC_PATTERNS_MCP_PUBLISH_ARTIFACTCompiles an artifact’s source files and sets it as the active artifact for the design. This is the final step in the code-first workflow (Workflow B).This tool:
  1. Compiles all source files in an existing artifact version (bundling for preview).
  2. Sets that artifact as the design’s active artifact (so it appears in the editor and preview).
  3. Does NOT create a version entry. Call create_new_artifact first and publish the artifactId it returns.
  4. Records your description on the version, above the file changes already logged from write_artifact_files.
ALWAYS pass a description. The people who open this design did not watch you work, and the version is otherwise an unexplained code change.NEXT STEPS: The design preview will update. Share the editor URL with the user.

Input Parameters

string
required
The editor ID of the design this artifact belongs to.
string
required
The artifact ID to compile and publish.
string
A summary of what changed in this version, written like a commit message — a sentence or two, in the past tense, describing what actually shipped (e.g. “Swapped the hero CTA to the solid Button variant and dropped the legacy grid”). Always provide this: collaborators open the design without having seen your session, and this is the only prose explaining what you did.

Output

string
required
The new published artifact ID.
array
required
The file names that were compiled.
Slug: MAGIC_PATTERNS_MCP_PUBLISH_DESIGN_SYSTEMPublishes the design system’s active artifact as a new immutable version. STRICT: refuses if the active artifact has validation errors — run write_design_system_files and clear all validationErrors first.Returns the new version (major.minor) and whether it is backwards-compatible with the previously published version (a breaking change — e.g. a removed component or prop — bumps the major version).

Input Parameters

string
required
The design system ID (ds-…).

Output

string
Explanation when the change is breaking.
object
required
The newly published version.
boolean
required
Whether the new version is backwards-compatible with the previously published version.
Slug: MAGIC_PATTERNS_MCP_READ_ARTIFACT_FILESReads the contents of one or more files from an artifact.IMPORTANT: Always read files BEFORE making changes with write_artifact_files so you understand the current state.This code is meant as a starting point or inspiration. It is NOT production-ready. You should adapt this code to match the user’s project style, frameworks, libraries, and conventions.

Input Parameters

array
required
Array of file names/paths to read.
string
required
The artifact ID to read files from.

Output

array
required
The requested files with their contents.
Slug: MAGIC_PATTERNS_MCP_READ_DESIGN_SYSTEM_FILESReads the contents of one or more files from a design system’s active artifact.Design system file structure:
  • components/<Name>/index.tsx — component source (named exports only)
  • components/<Name>/<Name>.previews.tsx — preview definitions; default-export a ComponentPreviewModule with componentName, importPath, and previews
  • components/<Name>/Context.md — AI/usage documentation
  • index.css — design system styles / Tailwind imports
  • tailwind.config.js — Tailwind configuration
  • rules/<slug>.md — design rules
Call get_design_system first to discover available file names. Always read before editing.

Input Parameters

array
required
Array of file names/paths to read (as listed by get_design_system).
string
required
The design system ID (ds-…).

Output

array
required
The requested files with their contents.
Slug: MAGIC_PATTERNS_MCP_READ_RECENT_MESSAGE_HISTORYReads the recent chat item history for a design. Returns the last 10 chat items (user prompts, AI responses, artifact versions, edits). Use the skip parameter to paginate backwards through older items.Because the editor is collaborative, the user may have sent prompts or made changes in the UI between your tool calls. Use this to catch up on what happened and understand the current context before acting.Note: Code contents are omitted from the response to keep it concise. Use read_artifact_files to read full file contents.

Input Parameters

number
Number of recent items to skip (for pagination). Defaults to 0 (most recent).
string
required
The editor ID of the design.

Output

array
required
The recent chat items.
boolean
required
Whether older items exist (paginate with skip).
Slug: MAGIC_PATTERNS_MCP_SEND_PROMPTSends a natural language prompt to the Magic Patterns AI for an existing design. The AI will interpret the prompt and generate/update code. Returns immediately with a requestId.BEFORE CALLING: Call get_design_status(editorId) to make sure the design is not already generating (isGenerating=false) and to understand the current state. The user may have sent prompts or made changes in the UI.Use this for prompt-based updates to existing designs (Workflow A with existing design).⚠️ IMPORTANT: This kicks off a LONG-RUNNING generation that typically takes 2–10 minutes. Do NOT poll more often than every 60 seconds. Call get_design_status(editorId) once every 60 seconds until isGenerating=false. Do NOT treat slow generation as an error — it is expected.

Input Parameters

string
required
A natural language description of what to create or change.
string
required
The editor ID of the design to update.

Output

string
required
The ID of the kicked-off generation request.
Slug: MAGIC_PATTERNS_MCP_WRITE_ARTIFACT_FILESCreates or overwrites one or more files in an artifact. If a file exists, it will be replaced. If it doesn’t exist, it will be created.IMPORTANT: This only saves source files — it does NOT compile or publish. Call publish_artifact after you have finished all file changes.Each file you write is logged onto the version in the design’s chat, with a diff the user can open — so the design records what you changed, not just the end result.NEXT STEPS:
  • Call write_artifact_files again for additional files.
  • When done with all changes, call publish_artifact(artifactId, editorId) to compile and activate.

Input Parameters

array
required
Array of files to write
string
required
The artifact ID to write files to.

Output

array
required
All file names now in the artifact.
Slug: MAGIC_PATTERNS_MCP_WRITE_DESIGN_SYSTEM_FILESCreates or overwrites files in a design system. Incoming files are validated, merged onto the existing artifact (existing files are preserved), compiled, and activated immediately.COMPONENT FORMAT (required):
  • Use a PascalCase folder and write the complete trio for every code component: components/<Name>/index.tsx components/<Name>/<Name>.previews.tsx components/<Name>/Context.md
  • Export the component from index.tsx as a named export. Default exports reject the entire write; fix the file and retry.
  • Default-export the previews object from <Name>.previews.tsx. It must include componentName, importPath, and previews; every preview needs a render function returning JSX.
  • Do not write flat component files such as components/Button.tsx or components/Button/Button.tsx.
IMPORTANT:
  • Call get_design_system first and pass its artifactId as baseArtifactId. A 409 means someone else changed the design system — re-read and retry.
  • Magic Patterns does not post-process MCP writes. Non-canonical paths, syntax errors, source-format violations, and shell/auto-generated files reject the entire write so you can fix them and retry.
  • validationErrors for incomplete component trios remain non-blocking — fix them before publish_design_system, which is strict.
Load the design_system_authoring_guide prompt for the full file contract.

Input Parameters

array
required
Array of files to create or overwrite.
string
The artifactId from get_design_system. If the active artifact has since changed, the write is rejected (409) so you can re-read.
string
required
The design system ID (ds-…).

Output

array
required
All file names now in the design system.
string
required
The new active artifact ID after the write.
array
Non-blocking validation errors — fix before publish_design_system.