21st.Dev Magic MCP Server

Create crafted UI components inspired by the best 21st.dev design engineers.

Local serverstdio

What is the 21st.Dev Magic MCP server?

21st.dev magic mcp server connects 21st.Dev Magic to AI assistants that speak the Model Context Protocol. Create crafted UI components inspired by the best 21st.dev design engineers.

What 21st.Dev Magic does

npx -y @21st-dev/magic@latest API_KEY="..." still works: since v0.2.0 it is a small stdio proxy that forwards every MCP message to the 21st MCP server. Existing mcp.json entries that reference @21st-dev/magic keep functioning — but they now speak to the same server as the 21st CLI, with the full current toolset.

Tools it exposes

Once connected, the assistant can call this tool directly:

  • logo_search — search_logo (one query per call)

Installing the 21st.dev magic mcp server

The server is distributed via npm as @21st-dev/cli, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.

Configuration

Before the server will start you need to supply 2 environment variables: YOUR_21ST_API_KEY, TWENTY_FIRST_API_KEY. Keep credentials in your client's env block or a secrets manager rather than committing them.

Where it fits

Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. 21st.Dev Magic sits in that group, and the shape of its toolset — logo_search — tells you what it is really for. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • It will not start until its required credentials are present, so set those before wondering why the tools never appear.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the 21st.dev magic mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
logo_searchsearch_logo (one query per call)

How to install the 21st.Dev Magic MCP server

{
  "mcpServers": {
    "magic": {
      "command": "npx",
      "args": ["-y", "@21st-dev/cli"],
      "env": {
        "YOUR_21ST_API_KEY": "your-value",
        "TWENTY_FIRST_API_KEY": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
YOUR_21ST_API_KEYCredential the server authenticates with.Yes
TWENTY_FIRST_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use 21st.Dev Magic to logo search.

Frequently asked questions

It connects 21st.Dev Magic to MCP-compatible AI assistants such as Claude and Cursor, exposing 1 tool (logo_search) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with 21st.Dev Magic directly.