Skip to main content
Glama
Brilliant MCP

Brilliant MCP

Official

Brilliant Design: a design canvas for coding agents (MCP server)

Design canvas for coding agents: real editable vectors, auto layout, components, export to code.

npx -y @brilliant-hq/mcp install <client>

Your coding agent designs with you on a real vector canvas. This is the local MCP server for Brilliant, the design tool whose canvas you and your agent both edit: the agent lays out the screen, you drag, retype and restyle it, and the agent sees your changes and keeps going.

@brilliant-hq/mcp is a small local router. It connects any MCP client over stdio to a Brilliant tab in your browser or to the Brilliant desktop app, entirely on 127.0.0.1. Zero bytes of MCP or design data touch Brilliant's servers.

Install

Client

One line

Claude Code

claude mcp add brilliant -- npx -y @brilliant-hq/mcp

Cursor

npx -y @brilliant-hq/mcp install cursor

VS Code

code --add-mcp '{"name":"brilliant","command":"npx","args":["-y","@brilliant-hq/mcp"]}'

Codex

codex mcp add brilliant -- npx -y @brilliant-hq/mcp

Gemini CLI

gemini mcp add brilliant -- npx -y @brilliant-hq/mcp

Anything else

npx -y @brilliant-hq/mcp install <client>

Add to Cursor Install in VS Code

install <client> knows claude-code, cursor, vscode, codex, gemini, antigravity, windsurf, zed, opencode, amp and claude-desktop. Any other MCP client takes the standard stdio entry:

{ "mcpServers": { "brilliant": { "command": "npx", "args": ["-y", "@brilliant-hq/mcp"] } } }

Requires Node 20 or newer. No API key.

Related MCP server: Canvas AIGC

Codex plugin

This repository is also a Codex plugin marketplace. The plugin lives in codex-plugin/brilliant and adds a design skill, the hosted Brilliant tools (https://brilliant.design/mcp, no account) and this local server:

codex plugin marketplace add brilliant-hq/brilliant-mcp
codex plugin add brilliant@brilliant

Gemini CLI extension

This repository is also a Gemini CLI extension (gemini-extension.json at the root). It adds this local server and a context file, GEMINI.md, that tells Gemini when to design on the canvas and which call to make first:

gemini extensions install https://github.com/brilliant-hq/brilliant-mcp

Kiro power

kiro-power is a Kiro power in the Agent Plugins format: a manifest with the keywords that activate it (design, mockup, wireframe and more), a design skill and this local server. In Kiro, open the Powers panel, choose Add Custom Power, then Import power from GitHub, and give it https://github.com/brilliant-hq/brilliant-mcp/tree/main/kiro-power.

First run

Ask your agent for a design: "design a pricing page for this app". With no Brilliant open, the first tool call opens brilliant.design in your browser (Chrome, Edge or Firefox) and pairs it with your agent session; allow the one-time local network prompt. If the Brilliant desktop app is running, the server connects to it instead and opens nothing. Listing the tools never opens anything.

What your agent can do

The tools are Brilliant's own, served by the tab or the app; this package relays them unchanged. The main doors:

  • init: start a session and receive Brilliant's documentation for its tools.

  • edit: write designs, as HTML with inline CSS or as Blueprint, Brilliant's plain-text design format. Everything lands as editable vector layers.

  • read, get_selection: read canvases, design systems and what you selected.

  • export: PNG, JPEG, WebP, SVG, PDF, HTML and React.

  • get_knowledge: load design and format guidance on demand.

  • generate_image, generate_svg, vectorize_image, remove_background: image and vector generation inside a design.

Every tool carries MCP annotations (a title, read-only and destructive hints), so your client can tell a read from a write before it calls.

How it works

  • The server is a relay: MCP JSON-RPC crosses it verbatim. MCP semantics live in the Brilliant tab or desktop app, never here.

  • The first instance on a machine becomes the leader (one tab socket, one permission grant); every other MCP client's instance is a follower that forwards over loopback. Leadership reassigns when the leader exits.

  • The Brilliant desktop app is detected on 127.0.0.1:3333 to 3335 and covered by the same entry.

The full wire contract is in PROTOCOL.md.

Privacy

This package makes no network calls of its own: no telemetry, no analytics, no update checks. It talks only to a brilliant.design tab you approve or to the Brilliant desktop app on your machine, over 127.0.0.1.

One thing does reach Brilliant's website: when the server opens the pairing tab, the link carries three attribution params, utm_source=mcp-helper, your MCP client's name (utm_medium, for example claude-code) and, if the install snippet set one, a door tag (utm_content, from --src <tag> or BRILLIANT_MCP_SRC). They tell us which install path people use. They say nothing about you, your machine or your designs, and the pairing token stays in the URL fragment, which a browser never sends to a server.

It keeps a small state directory at ~/.config/brilliant/mcp-helper (its ports, the pairings you approved and the last tool list), readable only by you.

Brilliant itself, like any app, has its own data handling: the image tools run on Brilliant's servers when your agent calls them, and a cloud project syncs when you choose one. See the privacy policy.

Security

  • Every listener binds the literal 127.0.0.1: never 0.0.0.0, never a scan of private ranges.

  • The tab socket validates Origin: https://brilliant.design, a loopback Host (against DNS rebinding), and a pairing token or an association you approved.

  • The pairing token is never served from any local endpoint; the state files are mode 0600, and the web side never reads them.

To report a vulnerability, see SECURITY.md.

CLI

npx @brilliant-hq/mcp                              # run the stdio MCP server (default)
npx @brilliant-hq/mcp --src <tag>                  # run it, tagging the pairing link with an install door
npx @brilliant-hq/mcp --version
npx @brilliant-hq/mcp install <client>             # add the server to <client>'s MCP config
npx @brilliant-hq/mcp install <client> --dry-run   # preview the change, write nothing
npx @brilliant-hq/mcp install <client> --remove    # remove it again

install merges into the client's config without touching other servers, keeps JSONC comments, and --remove is its exact inverse.

Development

npm install
npm test

Docker

The Dockerfile builds the same stdio server for registries that build and inspect it (initialize, tools/list):

docker build -t brilliant-mcp .
docker run -i --rm brilliant-mcp

To design, run the server on your own machine with the commands under Install: it pairs with a Brilliant tab or the desktop app over 127.0.0.1, which a container cannot reach.

Pricing

Canvas work by your own agents over MCP is unlimited on every Brilliant plan, the free plan included. Generated images and background removal draw on your Brilliant AI usage. Details: https://brilliant.design/pricing

Licence

The code in this repository is licensed under Apache-2.0. The licence covers this local server only: the Brilliant editor, engine and services are not open source, and the Brilliant name and logo are not licensed (see NOTICE).

Docs: https://brilliant.design/docs/agents/overview

Available Tools

25 tools
add_cutout_outlineA

Add an outline around the subject of an image whose background was removed (remove_background first): the cutout's visible edge is traced into a new vector element placed directly above the image, aligned with its crop, rotation, flip and scale; stroke only, no fill, outside stroke, round joins (the sticker look). The outline is an ordinary element afterwards (restyle, move or delete it). ids: the image element ids (or #refs; a frame, group or instance id reaches the cut images inside it). color: optional #RRGGBB stroke color (default plain white). width: optional stroke width in px (default 2 percent of the image's short edge). Answers the new outline id per image, or the honest refusal (no removed background, nothing visible to trace, a tiled image). Runs locally: no Brilliant AI usage.

Inputs: ids (required), canvasId (required), color, width, +1 more.

capture_uiA

Screenshot a part of Brilliant's own UI (a toolbar, the palette / color picker, a panel) to an image file. Optionally stage commands to drive the UI into a state first, and draw highlight boxes over sub-targets. target is a capture-registry id such as "full-ui", "top-toolbar", "left-toolbar", "right-toolbar", "bottom-toolbar", "command-palette", or "ai-chat-panel". Chrome only by default on every host (the canvas area is left empty); pass includeCanvas:true (full-ui only) to composite the GPU canvas underneath. Writes lossless WebP by default. Desktop-only: it writes an image file, so it is not available in the web editor.

Inputs: target (required), outputPath (required), cropTo, format, +7 more.

convert_htmlA
Read-onlyIdempotent

Convert HTML with inline CSS to Brilliant blueprint lines WITHOUT creating anything: the exact lines edit (html) would write, per input string, plus the converter's notes. Batch many strings (the frames of a composition) in one call as frames. With layout: true each frame is also built into a throwaway world and the answer adds every element's laid-out box (x, y, w, h in canvas px, the unrotated box), its rotation, opacity, first solid fill, name, type and text, so the layout is the app's auto layout, never a guess. A data-id or data-key attribute is the element's NAME (stable identity across frames, the handle a motion patch line leads with as #name); id="x" is a #x ref as in edit (html). Give the outermost element an explicit px width and height so percentage sizes and offsets resolve. Same CSS support as edit (html), plus transform translate()/scale()/rotate() (fractional degrees) folded into p()/s()/rot().

Inputs: html, frames, layout, tokens, +2 more.

create_htmlC
Read-onlyIdempotent

Retired. A call answers the one line that names the door: edit({ text }) to write, read({ paths }) to read.

Inputs: html, paths, query, scope, +5 more.

create_modify_elementsA
Read-onlyIdempotent

Retired. A call answers the one line that names the door: edit({ text }) to write, read({ paths }) to read.

Inputs: html, paths, query, scope, +5 more.

editA
Destructive

Edit the project's documents. text holds one or more fences, applied in order: bl (a canvas, blueprint rows: omit ids for new elements, lead with an id or #ref to modify, delete(#ref) to remove, preview(#a, #b) as a row for a screenshot), html (a canvas, HTML with inline CSS converted to elements), ds (a design system, statements spliced), bm (a film, the whole document replaced). The first row of every fence is file(path): file("Projects/Launch"), file("Styles/default.ds"), file("Motion/Launch.bm"). A call holds fences on any number of documents, canvases included, applied in order, one result entry per fence; a #ref and a // label checkpoint belong to the canvas of their fence. A bl fence's rows apply as they go and the first bad row halts with one line. The answer is the block result: the canvas fact, what changed, the refs, the diagnostics, the notes and a screenshot of the preview row. Pass your sessionId from init. (External MCP clients: call init first for usage docs. Hosted-CLI and sub-agents have docs pre-loaded.)

Inputs: text, project, textFile, requestId, +4 more.

execute_commandsA
Destructive

Execute one or more commands by ID. Accepts an array of commands that share a single canvasId. Commands run sequentially, stopping on first error. Use command IDs from the skill docs. Pass previewIds + previewScale: 2 for inline PNG verification. Visually inspect every preview, describe what you see, fix issues. (External MCP clients: call init first for usage docs. Hosted-CLI and sub-agents have docs pre-loaded.)

Inputs: commands (required), ids, project, canvasId, +3 more.

exportA
Idempotent

Export elements in the specified format and return the data. Raster formats (png, jpeg, webp) return an inline image. SVG returns raw SVG markup as text. HTML returns an HTML/CSS snippet as text. PDF returns base64-encoded data as text. Video formats (mp4, mov) write a file (large binary is never inlined) and return its path; use duration (seconds, max 30) and fps to control length. MOV supports a transparent background; MP4 does not. With motion (mp4/mov) it renders a FILM, Motion/<film>.bm beside the canvas or at the project root: STATE frames tweened by element name, per-frame blueprint patch lines for the procedural rest (knowledge motion/core and motion/grammar, runner tool/motion/render.mjs). "replay" (animated reveal) needs an interactive recording session and is not available headlessly: it returns a clear error. When outputPath is provided, writes to that file path instead and returns a confirmation. In the web editor there is no local filesystem: outputPath is not available (omit it and the data returns inline), and video export (mp4/mov) is not available at all (use png/jpeg/webp/svg/pdf/html, or export from the desktop app). (External MCP clients: call init first for usage docs. Hosted-CLI and sub-agents have docs pre-loaded.)

Inputs: fps, ids, pages, scale, +19 more.

generate_imageA

Generate an AI image and apply it as a fill on targetElementId. Target element must already exist — create it first (top-level hosted-CLI agents: emit an <edit> block; sub-agents and external MCP clients: call edit), then call generate_image with that element's id or #ref. Call get_knowledge(["images/prompts","images/integration","images/references"]) for prompt engineering, quality presets, and parallel-generation guidance. Runs on your own Google key when one is set (Settings > Your own AI > Google), otherwise on Brilliant AI for a signed-in account.

Inputs: canvasId (required), prompt, targets, imageSize, +4 more.

generate_svgA

Generate editable vector graphics (SVG) from a text prompt and place them on the canvas as native editable shapes. Use for icons, logos, illustrations, diagrams — anything that should stay crisp and remain editable. For photos / realistic images use generate_image instead. Optional referenceElementIds (up to 4) export to PNG and steer style. Use n (1–4) for parallel variations of a single prompt, or targets to fan out distinct prompts in parallel. Call get_knowledge(["svg/prompts","svg/integration"]) for prompt patterns and decision rules. Requires Quiver API key.

Inputs: canvasId (required), n, intent, prompt, +4 more.

get_knowledgeA
Read-onlyIdempotent

Load design knowledge by key. Blueprint DSL work loads it first; an html fence needs none. Pass keys from the available keys list returned by init (e.g. "blueprint/core", "design/colors", "effects/glass"). By default a key also pulls in its prerequisite docs (its assumes: deps); the response names them under "Also auto-loaded" so you can see what was bundled. Pass includeDependencies: false to load ONLY the keys you name (the skipped prerequisites are listed so you can request them deliberately).

Inputs: keys, sessionId, includeDependencies.

get_selectionA
Read-onlyIdempotent

Get the IDs and blueprint of currently selected elements on a specific canvas. Returns selected element IDs and their blueprint representation including descendants. A selection past 1,000 elements (descendants included) is summarized: counts by type (countsByType), union bounds (worldBounds), the first 100 ids and a note, beside the true count. Use read with a scope of ids or #refs for full subtrees. (External MCP clients: call init first for usage docs. Hosted-CLI and sub-agents have docs pre-loaded.)

Inputs: canvasId (required), project.

initA

Bootstrap a design session. Returns a unique session ID, session context (canvas ID, repo path), and documentation. Call this first. Pass the returned session ID as the sessionId argument on every subsequent edit / read call: this scopes your refs/design-system state AND gives you your own distinct labelled cursor on the canvas (concurrent agents that echo their IDs never share one cursor). Optionally pass a short agentName (2-3 words) to label that cursor. Pass project (a name or key from list_projects) to bind this session to a project OTHER than the one on screen — including a project that is not open, which the agent reaches headlessly, or the absolute path of a project folder Brilliant has not seen yet (a new Git worktree), which it opens and lists. If you CANNOT read images, pass vision: false: preview requests then return a textual render summary instead of an inline PNG. Then write with edit: an html fence for most tasks (no knowledge loading needed), a bl fence (Blueprint DSL) for advanced features and edits, with its knowledge loaded first via get_knowledge.

Inputs: vision, project, agentName.

list_capture_targetsA
Read-onlyIdempotent

List the capture-registry ids currently mounted in Brilliant's UI (the valid "target"/"cropTo"/highlight ids for capture_ui). Takes no arguments. Returns a sorted JSON array; each entry is {id, mounted, rect: [x, y, w, h] in logical global pixels, children: [nested ids]}.

Inputs: no named parameters.

list_projectsA
Read-onlyIdempotent

List every project this user owns, each with its display name, key (a folder path or brilliant-cloud:// key), backing (local/synced/cloud), open state (active tab / background tab / closed), canvas count when known, and whether it is published, with its url, visibility, audience and your role where known. Pass a name or key from this list as the project argument on init or any canvas tool to work in a project other than the one on screen, including a closed one.

Inputs: no named parameters.

list_stagersA
Read-onlyIdempotent

List the UI Stage components render_ui can render, with each component's default logical size and its declarative state schema. Takes no arguments. Returns a JSON array; each entry is {component, defaultSize: [w, h], stateSchema}.

Inputs: no named parameters.

lookupC
Read-onlyIdempotent

Retired. A call answers the one line that names the door: edit({ text }) to write, read({ paths }) to read.

Inputs: html, paths, query, scope, +5 more.

objects_resultB
Read-onlyIdempotent

Retired. A call answers the one line that names the door: edit({ text }) to write, read({ paths }) to read.

Inputs: html, paths, query, scope, +5 more.

readA
Read-onlyIdempotent

Read the project's documents, each answered as the fence you would send back through edit: a canvas as bl with file(path) first and its rows (ids bound), a film as bm, a design system as ```ds. A canvas answer lists the films that name it above its fence (films: Motion/Launch.bm). Pass paths (canvas paths such as "Projects/Dashboard", "Motion/Launch.bm", "Styles/default.ds"), ids (element ids or #refs, with their canvas in paths) and/or the filters (query, textContent, type, fillColor, componentName) to find elements across canvases. format is "blueprint" (default), "summary" (compact metadata) or "skeleton" (summary plus the tokenRefs, no geometry), the fence the carrier. (External MCP clients: call init first for usage docs. Hosted-CLI and sub-agents have docs pre-loaded.)

Inputs: ids, disk, full, type, +15 more.

read_objects_resultB
Read-onlyIdempotent

Retired. A call answers the one line that names the door: edit({ text }) to write, read({ paths }) to read.

Inputs: html, paths, query, scope, +5 more.

remove_backgroundA

Remove the background from real photos on the canvas: the subject keeps its exact pixels (the real face, the real product) and the background becomes transparent, in place, in the same image fill (crop, scale mode and opacity kept). Use it instead of generate_image whenever the image is a real photo and the user wants it cut out: "a real photo, keep the pixels, cut the background". generate_image regenerates the picture and invents new pixels. ids: the element ids (or #refs) whose image fills to cut (a frame, group or instance id reaches every image inside it); one request per distinct image. A cut fill reads back as img(, ..., src()); execute_commands restore_background puts the original back. Answers the new asset path per element, or the named failure (no subject, allowance used, lane unavailable, image missing). add_cutout_outline then traces an outline around the cut subject. Runs on Brilliant AI: a signed-in account's Brilliant AI usage; in the built-in chat, a signed-out user gets the free daily cutouts of the /remove-background page with no account, and is told when they are used up.

Inputs: ids (required), canvasId (required), sessionId.

render_uiA

Render a Brilliant UI component into an EXACT declarative state and capture it to an image file, offscreen, without touching the live app. component is a stager id (call list_stagers to enumerate them and their state schemas); state is the component-specific declarative state. Optionally draw highlight boxes over sub-targets (the scene registers "ui-stage.*" ids) and override the stage size. Writes lossless WebP by default. Desktop-only: it writes an image file, so it is not available in the web editor.

Inputs: state (required), component (required), outputPath (required), width, +5 more.

send_feedbackA

Open the Brilliant feedback card for the user to review and send. This does NOT send: the card opens, the user presses Send, and you tell them it is open and waiting (never claim it was sent). message is OPTIONAL (pre-fill a draft or open empty); attachments is tolerated but ignored (nothing about the user's world is ever attached). Feedback is a routing decision, not one surface, and consent scales with what leaves the machine: the user's words move by the user's act, the user's context moves only per-item opt-in, and your own observations ride telemetry, never GitHub or email. Offer it proactively, once and calmly (at most once per session AND once per class), when you hit a wall or a missing capability, when the user asks for something the product cannot do, or when the user is frustrated. Before running the routing flow (card vs GitHub issue vs email vs Discord), load the full playbook with get_knowledge(["reference/feedback"]).

Inputs: message, attachments.

vectorize_imageA

Convert a raster image element on the canvas into editable vector paths. The new vector elements are placed on the canvas; the original raster element is left untouched (delete it manually if no longer needed). Use for: importing PNG/JPEG content the user wants to edit as vectors, cleaning up screenshots into icons, or converting AI-generated raster images into editable shapes. Requires Quiver API key.

Inputs: canvasId (required), sourceElementId (required), autoCrop, sessionId.

waitA
Read-onlyIdempotent

Wait for a long call to end, instead of sleeping and checking. job is the id from a background: true call of edit, export or render_ui, or the requestId (or job: line) of an edit, also one whose call timed out on your side. Blocks until the job is done or failed and answers its result, the answer the call itself would have given. running means your timeout ran out and the job goes on: call wait again. superseded means the job ended with an earlier app run or its answer aged out: read the canvas. If this call cannot reach the app at all, the app is down: run scripts/mcp-wait-up.sh.

Inputs: job (required), timeout, sessionId.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 25 tools

    Disambiguation3/5

    The active tools mostly target distinct operations, but five retired aliases (read_objects_result, objects_result, create_modify_elements, create_html, lookup) still appear alongside the tools they redirect to. There is also potential overlap between edit and execute_commands, and multiple export/capture/render image tools require careful reading to distinguish.

    Naming Consistency3/5

    Names are consistently snake_case, but verb conventions are mixed: single verbs (read, edit, export, wait, init), verb_noun patterns, noun_result names, and compound verbs like create_modify_elements. The names remain readable, but the set does not follow one predictable pattern.

    Tool Count3/5

    At 25 tools the surface is heavy, and the count is inflated by five retired tools that do not earn their place. The remaining active tools span a broad design-editor domain, so the count is not extreme, but it is borderline for the scope.

    Completeness4/5

    The set covers the core design lifecycle well: session init, project listing/binding, document read/edit, selection, export, knowledge loading, image generation/processing, and UI capture. Minor gaps remain around project creation/deletion/publishing and explicit document lifecycle management.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server that enables AI coding agents to read and write to a local-first HTML/CSS design canvas, bridging visual design and code generation.
      1
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to read and write Figma designs through a local WebSocket relay, turning Figma selections into framework-aware code and building/editing designs directly on the canvas. Provides 112 MCP tools for bidirectional design-code workflows with support for any MCP client.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Open-source multiplayer design canvas (alternative to Paper.design) with a built-in MCP server. Agents create and stream HTML artboards live next to human collaborators, review them via screenshots, comment on elements, search icons/images/logos and follow shared design guidelines.
      2,440
      AGPL 3.0