Magic Patterns MCP

Magic Patterns MCP lets agents create and iterate on interface designs, inspect design status and history, read or modify artifact files, and publish authorized design artifacts.

Tools

This is a reference catalogue. Tools cannot be configured or run from this page.

  • Create design

    Creates 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.

  • Create design system

    Creates 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.

  • Create inspiration document

    Creates 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.

  • Create new artifact

    Creates 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.

  • Create slide deck

    Creates 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.