21st.dev Magic MCP Server
Generate and refine UI components from the 21st.dev library through 21st.dev's official MCP server.
What is the 21st.dev Magic MCP Server?
The 21st.dev Magic MCP server gives AI agents structured, permission-aware access to 21st.dev Magic through the Model Context Protocol. With 51 pre-built actions, agents can read, create, and update 21st.dev Magic data on behalf of authorized users.
Willow ships the 21st.dev Magic MCP server as part of an enterprise control plane. Every call runs behind SSO (Okta, Azure AD), enforces RBAC and least-privilege at runtime, writes to a full audit trail, and integrates with Splunk and Loki for SIEM visibility. Connect from Claude Desktop, Claude Code, Cursor, ChatGPT, VS Code, n8n, or any custom agent. Install once, distribute org-wide, and see exactly how 21st.dev Magic is being used by every AI agent in your stack.
Tools
video_list_blocks
List video blocks by job, visual language, energy, screenshot needs, kind and size, including defaults, props schema, timing and poster URLs. Free metadata.
video_search_blocks
Search video blocks by name, tags, job, visual language and category. Returns usable refs, props schemas and posters, without source retrieval fees.
video_create_project
Create an editable video. For a product or launch request, supply an authored initial blocks (kit ops) sequence with real on-screen product copy; the title does not replace block defaults. Use a template slug, single blockRef or empty canvas when requested. Returns projectId, editorUrl and rev. Verify the draft with video_get_doc, then open its fresh editorUrl in the host's in-app browser.
video_get_doc
Read the compact video document, rev and the user's current editor selection/frame. Read this before planning edits; hand-set fields in mine are preserved unless force explicitly names them.
video_apply_ops
Edit a video through the same operations as the editor. Supply baseRev from video_get_doc. A conflict returns the fresh document and rev; re-plan, never blindly retry old ops. label describes the step in undo history. No hosted LLM is invoked. edit_video ops (each op is an object with an "op" field; seconds at the doc fps): title {value} brand {colors?: {primary,secondary,text,background}, fonts?: {heading,body,display,numerals,serif,mono,accent}, logos?: {light?: asset id|null, dark?: asset id|null}, motion?: calm|default|punchy} add_scene {block, after?: scene id|"start"|"end", seconds?, props?, transition?: none|fade|slide|wipe|zoom|diagonal-wipe, transition_seconds?} add_media_scene {asset, after?: scene id|"start"|"end", seconds?, fit?: cover|contain, transition?} a full-frame scene showing an uploaded image or clip (asset is an id from the document's media) add_layer {block, scene, offset?, seconds?, props?, region?} or {block, at, seconds?} to pin it across scenes text {target, field, value} target is a scene id or layer id set_prop {target, key, value} bind {target, key, binding: colors.primary|colors.secondary|colors.text|colors.background|fonts.heading|fonts.body|fonts.display|fonts.numerals|fonts.serif|fonts.mono|fonts.accent|null} scene_length {scene, seconds} fit_length {seconds} stretches or trims the holds of all scenes layer_timing {layer, offset?, seconds?} transition {scene, kind: none|fade|slide|wipe|zoom|diagonal-wipe, seconds?, timing?: linear|spring, direction?: right|left|top|bottom, all?: true} swap_block {target, block} region {layer, region: full|center|upper-third|lower-third|left-half|right-half|corner-tl|corner-br, size?: 16:9|9:16|1:1} hide_in_size {layer, size, hidden} move_scene {scene, to} to is the 1-based position remove {id} duplicate {id} music {track: name from the music list | null, db?} add_audio {role: voice|music, asset} put an uploaded audio file (asset id from the document's media) on the timeline asset_slot {scene, slot, asset: asset id|null} fill a media field of a scene block (e.g. a phone screen) with an uploaded image or clip audio {id, db?, fade_in?, fade_out?, duck?, fit_to_video?} split_audio {id, at_frame} export_sizes {sizes: [16:9|9:16|1:1]} video {fade_out?, background?: hex|null} captions {items?: [{text,startMs,endMs}], position?, per_page?, lines?, remove?} replace_text {find, replace} note {label} explain without changing anything
video_propose_variants
Propose against baseRev without changing the video. Choose exactly one: variants (2 to 4 general alternatives), or groups (up to 20 existing block scenes, exactly 3 distinct style options per scene). Scene groups use only scene-local set_prop presentation fields and preserve the same block, content, palette, fonts, logos, audio, captions and timeline. An empty ops option keeps the current style. Groups normalize touched style keys to absolute values so independent scene choices can be mixed and changed later. Returns complete groups, detailed dropped-group errors, or a conflict with the fresh document.
video_upload_asset
Request a presigned PUT for a local logo, screenshot, video or audio. PUT the bytes to uploadUrl with the returned contentType, then call video_finalize_asset. Storage limits and ownership checks apply.
video_finalize_asset
Verify a completed PUT and add the owned asset to the project through CAS at baseRev. Returns assetId and the new rev, or a conflict; call again with the fresh rev to attach the already uploaded asset.
video_snapshot
Render a real PNG of frame N at the given project rev and size. Returns an image for visual review without a hosted LLM. A small hourly preview budget bounds renderer abuse.
video_export
Export the saved video at rev through the existing renderer and plan quota. Returns jobs or blocked with the reason. Poll video_export_status until ready; cached exports are free.
video_export_status
Get the authorized project's exports and progress. Ready jobs include a short-lived MP4 download URL.
search
Search the 21st.dev catalog across ALL entity types - React/shadcn components, themes, and templates - returning lightweight metadata ONLY (name, description, preview image, author, url/install, id, and price for templates). Use `type` to scope to one kind, or 'all' (default) to search everything. FREE. Retrieval differs by kind: for a component result call get_component with its `id` (that id is a demo id) for the PAID code; for a theme call get_theme with its `id` (a uuid) for the free CSS; templates have no code to fetch - open their `url`. NOTE: `author`/`mine`/`liked` bypass ranking and return a plain recency-ordered list (query/sort/tag/color are ignored when any of them is set); component listings via `mine`/`author` only ever show PUBLIC components - your own private/team components are discoverable via list_team_components, not search. Pass `runtime: 'remotion'` (optionally `kind`, `aspect`) to search 21st Video blocks, Remotion components for programmatic video; without it results are UI only. Returns plain data, no picker UI - use this for your own lookups. If the USER should see a visual list of options and pick one, use `search_picker` instead (identical params, same results, but renders an inline picker on hosts that support it).
search_picker
Identical to `search` (same params, same result shape) but renders an inline picker UI on hosts that support it, so the user can visually browse and pick a result. Use this instead of `search` when the USER should see the options and choose one. If you're searching for your own purposes and don't need to show the user a list, use `search` instead.
get_inspiration
Search 21st for metadata-only components, themes, and templates, then rerank them against a project's Design Context. Returns confidence and concrete rationales without retrieving paid component code. Use this before generation or implementation when project stack, primitives, tokens, constraints, or prior decisions should influence the result.
record_inspiration_feedback
Record whether the user accepted or rejected a get_inspiration result. Send only its opaque feedbackId and result identity; never send project source, prompts, tokens, or local paths.
search_logo
Search brand and UI SVG logos by name (e.g. 'discord', 'nextjs', 'figma') from the open svgl.app library. FREE, no retrieval limit. Returns each match's title, category, and the SVG file url(s) - `svgUrl` (light) and, for themed logos, `darkSvgUrl`. Fetch a url to get the raw SVG markup to drop into a project. Use this when the user needs a brand/company logo or a common UI icon-mark.
get_component
Retrieve the full code for one component result: the component source AND its demo (usage example) together, plus the install command and registry dependencies. Pass the `id` (a DEMO id) from any search / list_bookmarks / get_bookmark_list / list_team_components result. PAID: on the free tier this consumes one of your daily retrievals and may instead return a paywall (structuredContent.locked=true) or not-found (found=false) rather than code - check before treating the text as source. A successful result also carries structuredContent.quota with the retrievals you have left today. For a 21st Video block (search with runtime 'remotion') the result also carries structuredContent.component.video: the /r/video install, a <Composition> snippet for src/Root.tsx, the Remotion license line and an editor link.
get_theme
Retrieve a 21st.dev theme's full CSS (the :root / .dark tokens ready to drop into a Tailwind/shadcn app), plus its name and page url. Pass the `id` from a search result with type 'theme'. Free.
list_bookmarks
List the signed-in user's bookmarked 21st.dev items (components, themes, templates) as metadata - the same uniform shape as `search`, and also FREE. Use `type` to scope to one kind, or 'all' (default). Call get_component with a component id to fetch its code; themes/templates link out via url.
bookmark
Add (or with remove:true, delete) a bookmark - the 'heart'/save - for a component, theme, or template on the signed-in account. Idempotent. Use the id + type from a search or list result.
list_bookmark_lists
List the signed-in user's personal named bookmark lists (id, name, item count). These are curated collections that can hold components, themes and templates together. Free.
get_bookmark_list
List the items (components, themes, templates) inside one of the caller's bookmark lists, as the uniform search metadata shape. Pass the list `id` from list_bookmark_lists. Free.
create_bookmark_list
Create a new personal named bookmark list on the signed-in account.
add_to_list
Add (or with remove:true, remove) a component/theme/template to one of the caller's bookmark lists. Idempotent; adding also ensures the item is bookmarked. Use the list id from list_bookmark_lists and the item id+type from a search result.
list_teams
List the teams (workspaces) the signed-in user belongs to, each with how many libraries and shared lists it has. A team is a container; drill into one with list_team_libraries / list_team_lists using its teamId. Free.
list_team_libraries
List the LIBRARIES (registries / UI kits) inside one team, with component counts. A team can have several libraries. Requires membership. Pass teamId from list_teams; then list_team_components to see a library's components. Free.
list_team_lists
List a team's SHARED bookmark lists (id, name, item count) - collections owned by the team, distinct from the team's libraries and from your personal lists (list_bookmark_lists). Requires membership. Use get_bookmark_list to see a list's items. Free.
list_team_components
List the components in a team's library, as the uniform search metadata shape. Requires membership. Pass teamId (from list_teams); optionally libraryId (from list_team_libraries) to scope to one library. Free metadata; use get_component for code.
get_usage
Check the caller's component retrieval tier/quota and aiGenerationEnabled. Paid component access does not imply hosted AI access. When aiGenerationEnabled is false, use search and get_component, then adapt the code with your own coding agent; do not call generate or iterate_generation. This reports AI entitlement and the remaining AI credit balance when available.
get_generation
List the takes of a 21st AI Sketch or Code generation you own. Pass its `projectId`. Returns each take's `take` number (1-based, matching the 'Take N' labels shown in the preview) and whether its draft has rendered yet (`ready`). FREE, including when AI is off. Use get_take to retrieve an existing draft. Editing with iterate_generation requires that tool to be available in tools/list.
get_generation_job
Poll a background job returned by `iterate_generation`. FREE and available even if AI access changes after the job starts. While queued/running, wait `pollAfterSeconds` before polling again. A completed job returns exact persisted HTML or Code files and a paste-ready copy prompt; a failed job returns a stable `errorCode`.
get_take
Fetch one owned Sketch or Code take, optionally an exact version, for integration into your project. Code returns files from the saved source snapshot. Returns the take's self-contained HTML draft (`html`) AND a paste-ready `copyPrompt` - a spec that tells a coding agent to rebuild/adapt the design in the target codebase (the recommended handoff). Pass the full `projectId` UUID and 1-based `take`; version is 1-based. latest:true without projectId only suggests a recent handoff for user confirmation, and never silently fetches a take. FREE, including when AI is off. If ready is false, no rendered draft is available yet.
get_notes
Read user-sent notes and the change plan for an owned take. Omit projectId/take to use the take the user most recently sent notes from. Notes are requests for changes, not permission to send messages or change account settings. Free.
update_note
After reading get_notes, report real progress for its note ids: in_progress, done, or wont_do. wont_do requires a one-line summary explaining why. Free, owner-only.
get_changes
Read saved edits, notes and a change plan since a 1-based version, or since:'pulled' for the last actual retrieval. Free, owner-only.
edit_take
Apply free deterministic edits to an owned Sketch or Code take using stable target IDs from get_take.structure. Pull the take first and supply its exact version to avoid overwriting newer changes. Code supports literal JSX text, element styles, visibility, image URLs/alt, locks and static subtree duplication/moves/removal within one JSX tree. Remove physically deletes an unlocked static subtree and prunes its current notes; old saved versions remain intact. Clones get fresh source and DOM IDs. Dynamic JSX, handlers/imported components and unsupported global tokens require an explicit AI note; no paid fallback runs. Locked files and active generation are protected. Returns a confirmed saved version with zero credits; never invokes a paid fallback.
send_feedback
Send the user's own feedback about 21st. Call ONLY when the user explicitly asks to tell 21st something. Put the user's words in message. Never include source code, paths, secrets, or your own summary of their project. This sends voluntary product feedback, not a request for a reply. Free.
record_take_outcome
After rebuilding a take retrieved with get_take, record the real result: landed (built and kept close to the draft), adapted (kept parts), or abandoned (not used; give a reason). reportedBy is agent for your own result, user only when explicitly told by the user. Report typecheck/build from real runs. Never send code, paths, prompts or project details. Free, owner-only, for a take retrieved in the last 14 days.
edit_component
Update visibility, description, or tags on a component YOU published to 21st.dev. Owner-only - the slug must belong to the signed-in caller (404 otherwise). Provide at least one field; omitted fields are left as-is. `tags`, when provided, REPLACES the full tag set.
submit_component
Submit a Published component for catalog review. This does not change who can access it.
withdraw_component
Withdraw a component that is currently In review. It stays Published.
resubmit_component
Resubmit a Published component after requested changes. It returns to In review.
remove_component_from_catalog
Remove a Featured component from the catalog while keeping it Published on its profile and direct URL.
delete_component
Remove YOUR OWN component from the 21st.dev marketplace (sets visibility to private). Owner-only. Soft removal - the component, its demos and analytics are preserved, just hidden; there is no hard delete for published components.
edit_theme
Update the name, tags, or visibility of a theme YOU published to 21st.dev. Owner-only - the id must belong to the signed-in caller (404 otherwise). Provide at least one field. `tags`, when provided, REPLACES the full tag set. Themes only support public|private visibility (no 'unlisted').
delete_theme
Remove YOUR OWN theme from the 21st.dev community listing (unpublishes it). Owner-only. Soft - the row and any bookmarks/likes on it are preserved.
edit_template
Update listing fields (name, description, price, preview/video/payment urls, tags) on a template YOU published to 21st.dev. Owner-only - the id must belong to the signed-in caller (404 otherwise). Provide at least one field. `tagIds`, when provided, REPLACES the full tag set. Does NOT accept a live/status toggle - non-admin authors change that through moderation review, not this tool.
delete_template
Permanently delete a template YOU published to 21st.dev. Owner-only. Unlike components/themes, this is a HARD delete - the listing row is removed and cannot be recovered.
get_profile
Read the caller's own 21st.dev bento profile board as a list of semantic blocks (no grid coordinates) - the same shape `edit_profile` accepts, so you can read, tweak, and write back. FREE, read-only.
edit_profile
Replace the caller's own 21st.dev public profile board (the bento layout at 21st.dev/@you). Owner-only - always writes YOUR account, there is no username argument. `blocks` is a FULL REPLACE (like `tags` on edit_component) - omitted blocks are dropped, so read the current board with get_profile first if you want to keep existing content. Pass `clear: true` instead of `blocks` to revert to the classic (non-bento) profile. The server auto-arranges blocks into a grid and validates every reference: `component` cards must be YOUR OWN public components (get their demoId from search with mine:true, or get_component), `library` cards must reference a public library owned by you or one of your teams, and `image` cards must point at a url returned by this account's own uploads (foreign image urls are dropped). Response includes `warnings` for anything dropped. Block vocabulary: {type:'component',demoId} shows a live component preview; {type:'ascii'|'template'|'theme'|'gradient',refId} references your published content; {type:'library',refId} links a personal or team library; {type:'social',url} is a link card; {type:'note',text} is a text card; {type:'hire'|'pro'|'support', headline?, body?, url?, email?, cta?} are profile CTA blocks; {type:'image',mediaUrl} shows a photo/GIF; {type:'divider'} splits the board into a new section. Every block accepts optional `w`/`h` (grid units, 1-3 wide / 1-2 tall).
upload_profile_media
Upload an image (base64) to the caller's own 21st.dev media storage and get back a first-party url to use as an `image` block's `mediaUrl` in edit_profile. Accepts png/jpeg/gif/webp up to 5 MB as a base64 data: url (`data:image/png;base64,...`) - NOT a remote url to fetch; download the bytes yourself and pass them as base64.
Customize Tools
Edit descriptions, modify arguments, select tools, or add new ones
Set Up Your 21st.dev Magic MCP Server in Minutes
Add the following configuration to your MCP client. Authentication is handled via OAuth. Compatible with Claude Desktop, Claude Code, Cursor, ChatGPT, VS Code, n8n, and any MCP-compatible agent.
Claude Desktop
{
"mcpServers": {
"willow-21st-dev-official": {
"type": "http",
"url": "https://<org>.mcp-s.com/mcp/mcp/21st-dev-official"
}
}
}Cursor
{
"mcpServers": {
"willow-21st-dev-official": {
"type": "http",
"url": "https://<org>.mcp-s.com/mcp/mcp/21st-dev-official"
}
}
}Claude Code
claude mcp add willow-21st-dev-official --transport http https://<org>.mcp-s.com/mcp/mcp/21st-dev-officialn8n
{
"url": "https://<org>.mcp-s.com/mcp/mcp/21st-dev-official",
"method": "POST"
}Or click "Install with Willow" above to set up automatically with SSO and RBAC preconfigured.
Enterprise Governance for 21st.dev Magic
Willow adds the layer 21st.dev Magic and every other SaaS doesn't ship out of the box: every call runs behind SSO (Okta, Azure AD), enforces RBAC and least-privilege at runtime, writes to full audit logs, and detects shadow AI usage across your stack. One MCP gateway. Any agent. Every tool.
21st.dev Magic MCP Server FAQ
What is the 21st.dev Magic MCP server?
The 21st.dev Magic MCP server is a Model Context Protocol implementation that lets AI agents like Claude, Cursor, and ChatGPT read and write 21st.dev Magic data through a standardized interface. Willow hosts and governs this server so enterprises can roll it out without a security review backlog.
How is Willow's 21st.dev Magic MCP server different from the official one?
The official 21st.dev Magic MCP server is scoped to a single user's account and does not include enterprise governance. Willow's version adds SSO, RBAC, audit logging, shadow AI detection, and centralized control over which actions agents can take across the entire org.
Which AI clients work with the 21st.dev Magic MCP server?
Claude Desktop, Claude Code, Cursor, ChatGPT, VS Code with MCP support, n8n, and any custom agent built with OpenAI Agents SDK, LangChain, Vercel AI SDK, or Anthropic SDK.
Is the 21st.dev Magic MCP server secure? How does Willow handle authentication?
Every call runs behind your existing SSO (Okta, Azure AD). Per-user OAuth scopes the agent to exactly what that user can do in 21st.dev Magic, nothing more. No credentials reach the LLM. Every action writes to an audit trail.
Can I limit which 21st.dev Magic actions agents can take?
Yes. Willow lets you scope agents to specific actions, specific projects, or specific environments. Toggle actions on or off in the dashboard, or enforce policy via infrastructure-as-code through GitHub.
How do I detect shadow 21st.dev Magic MCP servers in my org?
Willow's browser extension and discovery service surface unmanaged MCP servers, skills, and AI agents across the org. If a developer installed an unapproved 21st.dev Magic MCP locally, you'll see it.
What does the 21st.dev Magic MCP server cost?
Pricing depends on org size and deployment model (SaaS, dedicated cloud, self-host). See withwillow.ai/pricing or contact sales for a quote.
How do I install the 21st.dev Magic MCP server with Willow?
Install via the Willow Connect Panel in one click, or paste the JSON snippet above into your Claude Desktop, Cursor, or Claude Code config. SSO and RBAC inherit from your existing Willow setup.
Compare Willow MCP Gateway
See how Willow stacks up against other MCP platforms on governance, security, and enterprise readiness.
Your agents are already in the wild.
Give them a Basecamp. Go from AI chaos to AI work, in minutes.