Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the Magic Patterns MCP server

Vendor MCP
Open markdown

The Magic Patterns MCP connector routes your AI agent's tool calls to Magic Patterns's own MCP server through Scalekit. Each user signs in to Magic Patterns once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 50 tools.

Tools
50
What they doRead · write · destructive
14 · 29 · 714 read29 write7 destructive
Users sign in with
OAuth app
Scalekit's or your own

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Magic Patterns MCP connection

    In AgentKit > Connections, create a Magic Patterns MCP connection. The name you give it is the connection_name your code passes. See Configure connections.

    Scalekit credentials are available for Magic Patterns MCP server, so you don't need to register an OAuth app.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'magicpatternsmcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Magic Patterns MCP:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'magicpatternsmcp_list_design_systems',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • magicpatternsmcp_get_artifactGets the active artifact for a design, including its ID and list of files.Read-only

    Get Artifact

    Gets the active artifact for a design, including its ID and list of files. Always call this (or get_design_status) to get the latest active artifact before reading files or creating a new artifact branch.

    Inputs

    editorIdstringrequired
    The editor ID of the design to retrieve the active artifact for.
  • magicpatternsmcp_get_design_statusGets the current status of a design: whether AI generation is active, the active artifact ID, and available files.Read-only

    Get Design Status

    Gets the current status of a design: whether AI generation is active, the active artifact ID, and available files. Call this before starting new work on an existing design, and to poll for completion after create_design (with prompt) or send_prompt. Returns isGenerating, activeArtifactId, and availableFiles.

    Inputs

    editorIdstringrequired
    The editor ID from create_design or get_editor_id_from_url. Use this to identify which design to check status for.
  • magicpatternsmcp_get_design_systemResolves a design system's active artifact and lists its files.Read-only

    Get Design System

    Resolves a design system's active artifact and lists its files. Design systems are collaborative, so the active artifact ID can change between calls; always call this first rather than reusing a cached artifact ID. Returns the artifactId (to pass as baseArtifactId to write_design_system_files), the persisted files, and whether there are unpublished changes.

    Inputs

    designSystemIdstringrequired
    The design system ID (ds-...). Use list_design_systems to discover available design systems.
  • magicpatternsmcp_get_editor_id_from_urlResolves a Magic Patterns URL to an editor ID.Read-only

    Get Editor ID from URL

    Resolves 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. Supported formats: "magicpatterns.com/c/<id>", "https://www.magicpatterns.com/c/<id>", "project-<slug>.magicpatterns.app", "magicpatterns.com/s/<canvasId>?nodeIds=<nodeId>".

    Inputs

    urlstringrequired
    The Magic Patterns URL to resolve to an editor ID. Supported formats: magicpatterns.com/c/<id>, https://www.magicpatterns.com/c/<id>, project-<slug>.magicpatterns.app, magicpatterns.com/s/<canvasId>?nodeIds=<nodeId>.
  • magicpatternsmcp_get_inspiration_documentLoads a Magic Patterns inspiration document by its ID.Read-only

    Get Inspiration Document

    Loads 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 to check whether concepts are ready, or to fetch a concept's current html before revising it with inspiration_update_variant.

    Inputs

    inspirationIdstringrequired
    The Magic Patterns inspiration document ID (the <id> in magicpatterns.com/inspiration/<id>).
  • magicpatternsmcp_list_design_systemsLists the design systems available to the authenticated user, including built-in presets (Base, Shadcn, MUI) and any custom design systems.Read-only

    List Design Systems

    Lists the design systems available to the authenticated user, including built-in presets (Base, Shadcn, MUI) and any custom design systems. Use this to resolve a design system name to its ID before calling create_design.

    Inputs

    This tool takes no inputs.

  • magicpatternsmcp_list_filesList files on the current page.Read-only

    List Files

    List files on the current page. With no arguments, lists every OS file on this page — id, canvas name and kind — along with the shared project files at the OS root, which is the fastest way to orient yourself. The canvas names are only available here, so this is also how you turn a name the user used into the id the other tools take. Pass `osFile` to list the files inside one of them instead: every file, recursively, unless `depth` says otherwise. Returns up to 200 entries per call; if there are more, the output gives the `offset` to continue from. Prefer this over `bash ls` or `find`, which flood the context with every bundle at once.

    Inputs

    osIdstringrequired
    The id of the OS to run against.
    depthnumber
    Inside an OS file, how many levels deep to show (1 = direct children only); deeper files collapse into their directory. Default: every level.
    filterstring
    Case-insensitive regex. Inside an OS file it is applied to each file path relative to `path`, e.g. "\\.css$"; at the page level, to each OS file id and canvas name.
    offsetnumber
    Skip this many entries, to page through a long listing. Default: 0.
    osFilestring
    The id of an OS file to look inside. Omit to list the OS files themselves.
    pathstring
    A directory inside `osFile` to list, e.g. "components". Requires `osFile`. Omit to list the whole OS file.
  • magicpatternsmcp_list_magicos_threadsThe threads MagicOS has handed work to on this OS, newest first: whether each is working, queued, waiting on the user, done, failed, or stopped; what it last said or its recap; the question it is waiting on; and the files it changed, with links.Read-only

    List Magicos Threads

    The threads MagicOS has handed work to on this OS, newest first: whether each is working, queued, waiting on the user, done, failed, or stopped; what it last said or its recap; the question it is waiting on; and the files it changed, with links. Use it to follow work you gave MagicOS with ask_magicos. Check about once a minute, not in a tight loop. Costs nothing — it touches no sandbox.

    Inputs

    osIdstringrequired
    The id of the OS to run against.