21st.dev Magic MCP

21st.dev Magic MCP is a skill for Claude Code, Codex from YousefNabil-SOC/claude-apex. It costs 27 tokens per session (853 once invoked), scanned B, original, MIT.

A component generator that turns plain-English descriptions into React, TypeScript, and Tailwind CSS interface code using a curated component library.

In plain words
What is it for?
Use it to create navigation bars, forms, cards, dashboards, chat interfaces, animated elements, and SVG brand logos.
Why use it?
It reduces the time spent building common interface pieces and looking up reusable design patterns.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths.

Good fit Use it to create navigation bars, forms, cards, dashboards, chat interfaces, animated elements, and SVG brand logos.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yousefnabil-soc/claude-apex/21st-dev-magic
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add YousefNabil-SOC/claude-apex --skill 21st-dev-magic
Clone the repo
git clone --depth 1 https://github.com/YousefNabil-SOC/claude-apex

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for 21st.dev Magic MCP

README.md
[![agentmods](https://agentmods.dev/badge/skills/yousefnabil-soc/claude-apex/21st-dev-magic/github.svg)](https://agentmods.dev/skills/yousefnabil-soc/claude-apex/21st-dev-magic)
Your own site
<a href="https://agentmods.dev/skills/yousefnabil-soc/claude-apex/21st-dev-magic"><img src="https://agentmods.dev/badge/skills/yousefnabil-soc/claude-apex/21st-dev-magic/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for 21st.dev Magic MCP

Your own site · 80×15
<a href="https://agentmods.dev/skills/yousefnabil-soc/claude-apex/21st-dev-magic"><img src="https://agentmods.dev/badge/skills/yousefnabil-soc/claude-apex/21st-dev-magic.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 853 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.00853
Opus 5 $0.00014 $0.00426
Sonnet 5 $0.00005 $0.00171
Haiku 4.5 $0.00003 $0.00085

Measured 7d ago against content hash 31b8d1228de9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

21st.dev Magic MCP scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

MCP server configured in `~/.claude/settings.json`:
skills/21st-dev-magic/SKILL.md · 97 lines

How it starts

The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.

21st.dev Magic MCP — Component Generation Skill

What It Is

21st.dev Magic is an MCP server that generates modern, production-ready UI components from natural language descriptions. It accesses 21st.dev's curated component library and outputs React + TypeScript + Tailwind CSS code directly into your project.

How to Invoke

Describe the component you need naturally. The MCP server tools will be available when the server is running. Common invocation patterns:

"Generate a hero section with animated text reveal and gradient background"
"Create a responsive navigation bar with transparent-to-solid scroll effect"
"Build a pricing card grid with hover animations"
"Design a testimonial carousel with star ratings"

Available Capabilities

Component Generation

  • Hero sections, navbars, footers
  • Cards, grids, pricing tables
  • Forms, inputs, modals, dialogs
  • Chat interfaces, AI prompt boxes
  • Animated elements, loading states
  • Dashboard layouts, sidebars

SVGL Integration

  • Professional brand logos as SVG components
  • Consistent sizing and color options
  • Search by brand name

Best Practices for Prompting

DO

  • Be specific about layout: "3-column grid on desktop, single column on mobile"
  • Mention animations: "fade in on scroll with staggered delay"
  • Specify colors: "use brand primary #C9A035 as accent, #0D1B3E for text"
  • Reference style: "luxury aesthetic, not generic SaaS"
  • Include interaction: "hover lifts card with shadow, button has magnetic effect"

DON'T

  • Don't say just "make a card" — specify what kind, what content, what style
  • Don't forget responsive behavior — always mention mobile/tablet/desktop
  • Don't skip accessibility — mention ARIA labels, keyboard navigation
  • Don't ignore RTL — specify if Arabic/RTL support is needed

Integration with Projects

Generated components land as .tsx files. To integrate:

  1. Check the component's dependencies (framer-motion, gsap, etc.)
  2. Place in your project's component directory (e.g., src/components/ui/)
  3. Update imports to match your project's alias paths
  4. Adjust Tailwind classes to match your design tokens
  5. Add RTL support if bilingual (Arabic/English)

Read the full file on GitHub · 97 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 97 lines · 27 tokens per session scan B 31b8d1228de9

Subscribe to this mod's changes

21st.dev Magic MCP is a skill published in the GitHub repository YousefNabil-SOC/claude-apex (2 stars, last pushed 3mo ago), licensed MIT. It adds 27 tokens to every session and 853 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

generic-react-design-system

Complete design system reference for React applications. Covers colors, typography, spacing, component patterns, glassmorphism effects, GPU-accelerated animations, and WCAG AA accessibility. Use when implementing UI, choosing colors, applying spacing, creating components, or ensuring brand consistency.

travisjneuman/.claude · 59 tokens

animation-patterns

Framer Motion patterns, page transitions, skeleton loading, scroll-linked animations, and gesture-based interactions for React.

vibeeval/vibecosystem · 26 tokens

tailwind-theme-builder

Set up Tailwind v4 + shadcn/ui themed UI with dark mode. Install deps, configure CSS variables via @theme inline, wire dark mode toggle, verify. Use whenever the user mentions Tailwind v4, setting up Tailwind theming, shadcn/ui colours, dark mode, or troubleshooting colours not working, tw-animate-css errors, @theme…

jezweb/claude-skills · 98 tokens

generic-react-ux-designer

Professional UI/UX design expertise for React applications. Covers design thinking, user psychology (Hick's/Fitts's/Jakob's Law), visual hierarchy, interaction patterns, accessibility, performance-driven design, and design critique. Use when designing features, improving UX, solving user problems, or conducting design…

travisjneuman/.claude · 69 tokens

frontend-enhancer

This skill should be used when enhancing the visual design and aesthetics of web applications. It provides modern UI components, design patterns, color palettes, animations, and layout templates. REQUIRES ui-research skill first. Use this skill for tasks like improving styling, creating responsive designs…

travisjneuman/.claude · 79 tokens

static-page-stack

SOTA stack recommendations for elegant, controlled, semantic static HTML pages — dashboards, post-mortems, technical-investigation reports.

terrylica/cc-skills · 30 tokens