21st MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with 21st MCP or direct API to search components, fetch templates, manage bookmarks, and update published items through natural language.

21st MCP logo21st MCP
Dcr Oauth

21st MCP is a hosted design resource service for React/shadcn components, themes, templates, and SVG logos. It gives teams a fast way to discover, organize, and reuse polished interface assets.

51 Tools

Try 21st MCP now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
21st MCP
Try asking
TOOLS

Supported Tools

Every 21st MCP action and event your agent gets out of the box.

Add to list

Add (or with remove:true, remove) a component/theme/template to one of the caller's bookmark lists.

Bookmark

Add (or with remove:true, delete) a bookmark - the 'heart'/save - for a component, theme, or template on the signed-in account.

Create bookmark list

Create a new personal named bookmark list on the signed-in account.

Delete component

Remove YOUR OWN component from the 21st.dev marketplace (sets visibility to private).

Delete template

Permanently delete a template YOU published to 21st.dev.

Delete theme

Remove YOUR OWN theme from the 21st.dev community listing (unpublishes it).

Edit component

Update visibility, description, or tags on a component YOU published to 21st.dev.

Edit profile

Replace the caller's own 21st.dev public profile board (the bento layout at 21st.dev/@you).

Edit take

Apply free deterministic edits to an owned Sketch or Code take using stable target IDs from get_take.structure.

Edit template

Update listing fields (name, description, price, preview/video/payment urls, tags) on a template YOU published to 21st.dev.

Edit theme

Update the name, tags, or visibility of a theme YOU published to 21st.dev.

Get bookmark list

List the items (components, themes, templates) inside one of the caller's bookmark lists, as the uniform search metadata shape.

Get changes

Read saved edits, notes and a change plan since a 1-based version, or since:'pulled' for the last actual retrieval.

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.

Get generation

List the takes of a 21st AI Sketch or Code generation you own.

Get generation job

Poll a background job returned by `iterate_generation`.

Get inspiration

Search 21st for metadata-only components, themes, and templates, then rerank them against a project's Design Context.

Get notes

Read user-sent notes and the change plan for an owned take.

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.

Get take

Fetch one owned Sketch or Code take, optionally an exact version, for integration into your project.

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.

Get usage

Check the caller's component retrieval tier/quota and aiGenerationEnabled.

List bookmark lists

List the signed-in user's personal named bookmark lists (id, name, item count).

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.

List team components

List the components in a team's library, as the uniform search metadata shape.

List team libraries

List the LIBRARIES (registries / UI kits) inside one team, with component counts.

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

List teams

List the teams (workspaces) the signed-in user belongs to, each with how many libraries and shared lists it has.

Record inspiration feedback

Record whether the user accepted or rejected a get_inspiration result.

Record take outcome

Record what happened to a 21st AI take the caller retrieved with get_take: landed (built and kept close to the draft), adapted (kept parts), or abandoned (not used; give a reason).

Remove component from catalog

Remove a Featured component from the catalog while keeping it Published on its profile and direct URL.

Resubmit component

Resubmit a Published component after requested changes.

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

Search logo

Search brand and UI SVG logos by name (e.g.

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.

Send feedback

Send the user's own feedback about 21st.

Submit component

Submit a Published component for catalog review.

Update note

Set the status of note ids from get_notes: in_progress, done, or wont_do.

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.

Video apply ops

Edit a video through the same operations as the editor.

Video create project

Create an editable video.

Video export

Export the saved video at rev through the existing renderer and plan quota.

Video export status

Get the authorized project's exports and progress.

Video finalize asset

Verify a completed PUT and add the owned asset to the project through CAS at baseRev.

Video get doc

Read the compact video document, rev and the user's current editor selection/frame.

Video list blocks

List video blocks by job, visual language, energy, screenshot needs, kind and size, including defaults, props schema, timing and poster URLs.

Video propose variants

Propose against baseRev without changing the video.

Video search blocks

Search video blocks by name, tags, job, visual language and category.

Video snapshot

Render a real PNG of frame N at the given project rev and size.

Video upload asset

Request a presigned PUT for a local logo, screenshot, video or audio.

Withdraw component

Withdraw a component that is currently In review.

SETUP GUIDE

Connect 21st MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["21st_mcp"],
  mcp: true,
});
Create a session scoped to 21st MCP and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Search 21st.dev for a dark shadcn dashboard template with a sidebar and analytics cards",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a 21st MCP request
SETUP GUIDE

Connect 21st MCP API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["21st_mcp"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to 21st MCP
3

Run 21st MCP tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Search 21st.dev for a dark shadcn dashboard template with a sidebar and analytics cards" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the 21st MCP tool calls through the session, and print the final answer

Why Use Composio?

AI Native 21st MCP Integration

  • Supports both 21st MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for searching, fetching, organizing, and editing 21st MCP resources

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke 21st MCP access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access 21st MCP
  • Scoped, least privilege access to 21st MCP resources
  • Full audit trail of agent actions to support review and compliance
FRAMEWORKS

Use 21st MCP with any AI Agent Framework

Choose a Framework you want to connect 21st MCP with

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

Start with 21st MCP.It takes 30 seconds.

Managed auth, hosted MCP servers, and every 21st MCP tool your agent needs.Free to start.

Start building