The short version: the “Magic UI API key” people search for is the Pro registry token — a private key that lets the shadcn CLI download paid sections and templates. You get it after purchasing Magic UI Pro ($199 one-time): log in to the Pro site with the same email you used at checkout, copy the token from your account, put it in .env.local as MAGICUI_PRO_REGISTRY_TOKEN, register the @magicui-pro registry in components.json, and run npx shadcn@latest add @magicui-pro/hero-1. The free library and the MCP server need no key at all.
Two things called “API key” — which one do you need?
- Free library / MCP server: no key. Components install with
npx shadcn@latest add @magicui/<slug>, and the MCP server works without credentials. - Magic UI Pro: yes — the registry token. It authenticates your account against the private Pro registry at
pro.magicui.design/registry/{name}so the CLI can pull sections such ashero-1,pricing-1orfaq-1.
If you have not bought Pro, there is nothing to configure yet: the pricing page explains what Pro adds (50+ sections, 9 templates, lifetime updates, one-time payment, no refunds on digital products).
Step 1 — Log in with your checkout email
- Complete the purchase on the Pro site (Stripe checkout).
- Open the Pro login page and sign in with the same email address you used at checkout — the official FAQ is explicit that access is tied to that email.
- Once logged in you have access to all components and templates; the docs also note that components are copied and pasted into your project individually rather than installed as a package.
Step 2 — Copy your registry token
Inside your Pro account, find the registry token (also labelled API key in the installation docs) and copy it. Treat it like a password: it grants download access to everything you paid for, and the License Agreement forbids sharing or redistributing Pro code.
Step 3 — Add the token to .env.local
In your project root:
# .env.local
MAGICUI_PRO_REGISTRY_TOKEN=your_token_here
Keep .env.local out of version control (it is git-ignored in Next.js projects by default). Team members each use their own token from their own licensed account.
Step 4 — Register the Pro registry in components.json
Add a registries block to the components.json created by npx shadcn@latest init:
{
"registries": {
"@magicui-pro": {
"url": "https://pro.magicui.design/registry/{name}",
"headers": {
"Authorization": "Bearer ${MAGICUI_PRO_REGISTRY_TOKEN}"
}
}
}
}
The ${MAGICUI_PRO_REGISTRY_TOKEN} placeholder is expanded by the shadcn CLI from your environment, so the token never appears in the file you commit.
Step 5 — Install sections
npx shadcn@latest add @magicui-pro/header-1
npx shadcn@latest add @magicui-pro/hero-1
npx shadcn@latest add @magicui-pro/pricing-1
Each command copies the section into your components folder exactly like a free component. Section families available in Pro include Header, Hero, Social Proof, Feature (plus Feature Scroll, Slideshow and Cards), Carousel, Pricing, Call To Action, FAQ and Footer, each in numbered variants — browse them in the component and template overview.
Troubleshooting
- 401 / unauthorized when adding a Pro item — the token is missing from the environment the CLI runs in. Confirm the variable name is exactly
MAGICUI_PRO_REGISTRY_TOKEN, that.env.localsits in the project root, and restart your terminal. - “Registry not found” — the
@magicui-prokey or the{name}placeholder in the URL is mistyped; copy the block above verbatim. - Works for me, fails for a teammate — they need their own login and token; a single Individual license does not cover a team (Magic UI lists a separate Team license).
- Looking for a GitHub download of Pro — there is none. Pro is a paid, non-open-source layer on top of the MIT library; the only legitimate source is your logged-in Pro account, and reselling or redistributing the code is prohibited.
Related: Install Magic UI (free routes) · Magic UI pricing (what Pro includes).