Magic Component Platform (MCP)
This server (Magic Component Platform/MCP) enables developers to:
Generate UI Components: Create React components (buttons, inputs, dialogs, tables, forms, banners, cards) using natural language descriptions via
/uicommandsSearch Logos: Find and integrate company logos in JSX, TSX, or SVG formats with support for multiple queries and light/dark themes
Find Component Inspiration: Fetch data and previews from the 21st.dev library without generating new code
Seamless Integration: Generated snippets are automatically integrated into the developer's codebase in customizable, developer-friendly formats with import instructions
Integration with Discord for accessing logo assets through the logo_search tool.
Integration with GitHub for accessing logo assets through the logo_search tool.
Requires Node.js as a runtime environment for the Magic AI Agent, supporting the component generation process.
Generates modern React UI components based on natural language descriptions, supporting customization and integration into existing React codebases.
Integration with SVG technology via SVGL for accessing and utilizing logo assets and brand icons in various formats including raw SVG markup.
Full TypeScript support for type-safe component development, with ability to generate TypeScript React components.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Magic Component Platform (MCP)create a responsive login form with dark mode toggle"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Magic MCP → 21st MCP
Magic MCP is now the 21st MCP. The Magic MCP server (
@21st-dev/magic) has been replaced by the unified 21st MCP, installed via the 21st CLI — setup at 21st.dev/mcp. This package remains published as a thin compatibility proxy so old configs keep working.
Install the 21st MCP (recommended)
npx @21st-dev/cli@latest init --client cursor # or: claude | vscode | windsurf | codexOr add it manually — it is a plain HTTP MCP server:
{
"mcpServers": {
"21st": {
"url": "https://21st.dev/api/mcp",
"headers": { "x-api-key": "YOUR_21ST_API_KEY" }
}
}
}Get an API key at 21st.dev/mcp.
Old Magic API keys were reset. Keys issued by the old Magic console no longer work anywhere. Generate a fresh key at 21st.dev/mcp.
Related MCP server: 21st.dev Magic AI Agent
What this package does now (v0.2.0+)
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.
The API key is accepted in all the historical forms: positional API_KEY="...", --API_KEY=..., /API_KEY:..., -API_KEY ..., or the TWENTY_FIRST_API_KEY / API_KEY_21ST environment variables.
Old tool names → new tool names
The 21st MCP still accepts the legacy Magic tool names and translates them, so agents that remember the old names keep working. Prefer the new names:
Legacy Magic tool | 21st MCP tool |
|
|
|
|
|
|
|
|
The current server exposes much more than the old four tools: catalog search across components/themes/templates, paid code retrieval, bookmarks, team libraries, UI generation with variants, profile management, and more. Connect and call tools/list to see the full set.
Links
21st MCP setup & API keys: https://21st.dev/mcp
21st CLI on npm: https://www.npmjs.com/package/@21st-dev/cli
21st.dev — discover, publish, and generate UI components: https://21st.dev
FAQ
Why did my old Magic MCP stop working?
The Magic backend (magic.21st.dev) was superseded by the unified 21st MCP, and all old API keys were reset for security. Update to a fresh key from 21st.dev/mcp — your existing @21st-dev/magic config will then work again through this compatibility proxy, though we recommend switching to npx @21st-dev/cli@latest init.
Is /ui still a thing?
Use natural language: ask your agent to search 21st for components (search), or generate new UI (generate). The old /ui, /21 trigger phrases were a convention of the legacy tools' descriptions, not the protocol.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/21st-dev/magic-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server