What it is
@21st-dev/magic by 21st.dev is a UI component builder for coding agents. As of the README, it has been replaced by the unified 21st MCP, set up with the 21st CLI.
- Maintainer
- Official (vendor)21st-dev on GitHub (organisation account, project of the same name)
- Source
- 21st-dev/magic-mcp6,853 GitHub stars · ISC licence
- Transport
- Streamable HTTP (hosted), stdio (legacy proxy)Hosted endpoint: https://21st.dev/api/mcp
- Packages
- @21st-dev/magic npm · latest 0.2.3 · 58,990 downloads last month
- Latest release
- 21st MCP compatibility proxy 0.2.3 2026-09-09
- Public advisories
- 0GitHub and OSV, as of December 5, 2026
What it can do
Read from the public tool definitions in the source, not from a live run. A capability marked "yes" means at least one tool can do it.
- Reads: yes
- Writes: yes
- Deletes: no
- Runs code: no
- Network: yes
- Sends: no
Prompts and project context you send go to 21st.dev's service.
| Tool | What it can do | Notes |
|---|---|---|
generate | Network | Generates a UI component from a prompt. |
get_inspiration | Reads, Network | |
search_logo | Reads, Network | |
Catalog, bookmark and team library tools | Reads, Writes, Network | The README says the current server exposes much more than the old four tools, including paid code retrieval and team libraries. |
README tool-name table. The full tool list lives on the hosted server, so snapshot it.
Credentials and least privilege
One API key to a hosted service.
| Credential | What it is for | Least privilege |
|---|---|---|
21st API key (x-api-key header or TWENTY_FIRST_API_KEY) | Authenticates to 21st.dev. | Generate a new key at 21st.dev/mcp (old Magic keys were reset), and keep it out of shared config files. |
Public security advisories
No published security advisory was listed for this project on GitHub or OSV as of December 5, 2026. That only means none had been published. It does not mean the code has been audited.
What stands out
- The README says old Magic keys were reset and no longer work.
- The old package now forwards every MCP message to the hosted server, so the code you run is a proxy and the tools come from the remote end.
- The README mentions paid code retrieval, so tool calls may cost money.
Safe-install checklist
Install command from the project's docs: npx @21st-dev/cli@latest init --client cursor.
- Pin the version. Use an exact version, not
latest:npx -y @21st-dev/magic@0.2.3. The legacy package is a proxy. The hosted tool list can change. - Scope the credential. Generate a new key at 21st.dev/mcp (old Magic keys were reset), and keep it out of shared config files.
- Snapshot the tool list on each connect and compare it with the PTS diff tool.
- Use a dedicated key and check what billing is attached to it.
- Deny the tools you do not need. In Claude Code, deny rules in
.claude/settings.jsonuse the formmcp__<server name>__<tool>, where the server name is whatever you called it in your config. Example, if you named itmagic-mcp:{ "permissions": { "deny": [ "mcp__magic-mcp__Catalog, bookmark and team library tools" ] } } - Snapshot the tool list. Save the
tools/listoutput right after you install, then compare it before every upgrade with the free PTS MCP tool diff checker. It runs in your browser and flags new tools and changed descriptions or schemas. - Watch for fixes. Watch the project's security advisories and upgrade on purpose, after the diff.
For the general version of this list, see the MCP server security checklist. Not sure about a server that is not listed here? Read Is an MCP server safe to install?
Quick follow-ups
What can Magic MCP (21st.dev) do on my machine or accounts?
Based on its public tool definitions, it can: reads local files or data; creates or changes files, records or settings; reaches the open web or a third-party service beyond the account you connect it to. Prompts and project context you send go to 21st.dev's service.
Does Magic MCP (21st.dev) need a token or API key?
Yes, depending on setup: 21st API key (x-api-key header or TWENTY_FIRST_API_KEY). One API key to a hosted service.
Has Magic MCP (21st.dev) had public security advisories?
No published advisory was listed for it on GitHub or OSV as of December 5, 2026. That is not proof it has no issues, only that none had been published.
How do I keep Magic MCP (21st.dev) from changing under me?
Pin the version, for example npx -y @21st-dev/magic@0.2.3. Then save its tool list (name, description, input schema) with the free PTS MCP tool diff checker and compare it before each upgrade.
Sources
This page is a factual summary of public information about the software. It is not a verdict on the maintainers and not an audit. Check the project's own docs for your version before you rely on it. Educational, not legal or security advice.
