shadcn/ui in JetBrains AI Assistant
Add an HTTP server in AI Assistant's settings and Chat, Junie or Claude Agent can find components and install them in the project you have open. It's included with Pro.
- Kind
- Editor
- Goes in
Settings → Tools → AI Assistant → MCP- Connects
- Over HTTP
- Team config
- No
Add it in AI Assistant's settings
AI Assistant takes a JSON snippet on the HTTP tab of its MCP settings. Signed in with Pro, the snippet beside these steps already holds your URL.
Copy the JSON
It's an
mcpServersentry namedshadcnio, holding your MCP URL with the token in it. No token yet? Create one on your account page.Open the MCP settings
Go to Settings | Tools | AI Assistant | Model Context Protocol (MCP), or type
/in AI Chat and pick Add Command. Then click Add.Paste it on the HTTP tab
In New MCP Server, choose HTTP, not STDIO: shadcn.io is a remote server. Paste the JSON, pick the global level so every project gets it, and click OK.
Apply, then read Status
Apply starts the connection, and the Status column shows how it went. There's no IDE restart.
Hand it to the agents
Chat mode sees the server at once. For Junie, Claude Agent, Codex or GitHub Copilot, turn on Pass custom MCP servers in Settings | Tools | AI Assistant | Agents.
How it reads, with YOUR_TOKEN where your token goes:
{ "mcpServers": { "shadcnio": { "url": "https://www.shadcn.io/api/mcp?token=YOUR_TOKEN" } } }
At the global level, AI Assistant keeps shadcnio in the IDE's own settings, outside your repositories. The token rides in the URL: if anyone else sees it, make a new one.
| Where you ask | It reaches shadcnio when | Instructions from |
|---|---|---|
| Chat mode | The row is checked and connected | Project rules in .aiassistant/rules |
| Junie or Codex in AI Chat | Pass custom MCP servers is on | AGENTS.md at the project root |
| Claude Agent in AI Chat | Pass custom MCP servers is on | CLAUDE.md at the project root |
| GitHub Copilot in AI Chat | Pass custom MCP servers is on | AGENTS.md and CLAUDE.md |
| The Junie plugin's own window | It's in ~/.junie/mcp/mcp.json or .junie/mcp/mcp.json | .junie/AGENTS.md, else AGENTS.md |
See it connected
Settings | Tools | AI Assistant | Model Context Protocol (MCP) lists every server with its checkbox, its level and its status.
- Open Settings | Tools | AI Assistant | Model Context Protocol (MCP) and find the
shadcniorow, its checkbox on. - Click the icon in its Status column: the list shows the 22 tools.
- Working with an agent? Check Pass custom MCP servers is on in Tools | AI Assistant | Agents.
- Send the prompt below in AI Chat: it calls
whoamiand replies with your account and the calls left this minute.
Three tasks, three JetBrains IDEs
A Laravel app in PhpStorm, a React form in WebStorm, a Spring Boot frontend in IntelliJ IDEA: the prompt, the calls, and what lands. Turn the MCP off to compare with the guess you'd get.
- shadcn.io MCP connected · 22 tools
Agent step: Read package.jsonReturns: Vue 3, @inertiajs/vue3, laravel-vite-plugin, npmMCP call: get_install_plan({ names: ["table", "pagination"], framework: "vue" })Returns: Both .vue files for resources/js, and the npm packages they importAgent step: Wrote the files, ran npm install (you chose Yes)Returns: Table and Pagination in resources/js/components/uiAgent step: Edited resources/js/Pages/Users/Index.vueReturns: Rows from the Inertia props, a page link per page
In your project
Table
- Two Vue components, in your ui folder
- Page links from Laravel's paginator
1 prompt → 1 MCP calls
Prompts for AI Chat
Paste one into Chat mode or an agent. @thisFile and @selection aim it at the code in your editor; naming the server keeps it on the registry.
What helps inside a JetBrains IDE
Agents, rules, trimming and models: the AI Assistant settings that decide how well the registry works for you.
Pass the server to agents
Junie, Claude Agent, Codex and GitHub Copilot see MCP servers only with Pass custom MCP servers on. Their
/menu won't list the tools either, so nameshadcnioin the prompt.A rule for Chat, AGENTS.md for agents
Chat mode follows project rules in
.aiassistant/rules: make one with the Always type. Junie and Codex readAGENTS.mdand Claude AgentCLAUDE.md, so put the same line there.For UI work, use the shadcnio MCP: look for a component or block before writing one, and install it with the command it returns.
Mind the trimming threshold
AI Assistant trims tool results past a share of the model's context window, which can cut a component's source short. Raise Trim message if it exceeds % of a model context window in Settings | Tools | AI Assistant, or ask for fewer
includesections.Allow the reads, approve the installs
Every shadcnio tool only reads, so Always allow on Junie's first request for one is safe. With Brave mode on Safe, the
npx shadcn addthat follows still waits for your Yes.Pick a model that calls tools
With a model from Ollama or LM Studio, AI Assistant can't call MCP tools, and agents don't take local models. For an OpenAI-compatible endpoint, turn on Tool calling in Providers & API keys.
Slash commands in Chat mode
In Chat mode, type
/: a connected server adds its tools to the list beside/explainand/web, to call one by hand. Add@thisFileto the same message to aim it at the open file.
When shadcnio won't answer
What the Status column or AI Chat shows, and the fix for each. Errors that come from the server rather than the IDE are covered in the troubleshooting guide.
- The Status column shows an error for
shadcnio. - Open Help | Show Log in Finder (Show Log in Explorer on Windows) and read the server's log in the
mcpfolder. A URL cut off while pasting is the usual cause: select the row, Edit, paste the JSON again, Apply. - Calls fail with 401.
- The URL holds an old token, or none: regenerating it on your account ends the previous one. Copy the JSON from this page again, Edit the
shadcniorow, paste and Apply. - Calls fail with 403.
- shadcn.io knows the token but finds no Pro plan running on that account. Renew it on your account page, then click Reconnect on the
shadcniorow; the JSON stays as it is. - Chat mode uses shadcnio, but Junie or Claude Agent says it has no such tools.
- Agents get configured servers only with Pass custom MCP servers on, in Settings | Tools | AI Assistant | Agents. Turn it on, click OK, and start a new chat.
- The MCP settings won't let you add a server.
- Your organization manages AI through JetBrains IDE Services or JetBrains Central, and its admin controls which MCP servers you can connect. Ask them to allow servers of your own.
- AI Assistant never calls the tools, and shows no error.
- Look at the model picker: with a local model from Ollama or LM Studio, AI Assistant can't call MCP tools. Pick a cloud model, then name the server in the prompt (
use shadcnio…).
Get the MCP for JetBrains with Pro
The MCP comes with every Pro plan, with every block and premium template, for you or your whole team. Monthly, yearly or lifetime.
4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.
- Secure checkout via Stripe
- Code lives in your repo
- Keep what you've shipped if you cancel
- License terms
Frequently asked questions
The shadcn MCP in JetBrains: setup, limits, and the rest.
Every JetBrains IDE that runs AI Assistant, IntelliJ IDEA and WebStorm included. The MCP page is in the same place in each of them, under Settings, Tools, AI Assistant, Model Context Protocol (MCP).
Choose HTTP, not STDIO. shadcn.io is a remote server, so the New MCP Server dialog's HTTP tab takes the mcpServers JSON with your URL, and Apply starts the connection. The Status column shows how it went, and no IDE restart is needed.
Global, in most cases: one server for every project you open in that IDE. Project level keeps it to the project that's open, which suits you if only one of your repositories has a web frontend.
No. With a local model from Ollama or LM Studio, AI Assistant can't call MCP tools, and agents don't take local models. Pick a cloud model that calls tools instead.
Yes. The tools answer for the framework in the frontend's package.json, so tell the agent which folder holds it, src/main/frontend for example, and it runs the install there. The Kotlin or Java side of the project is left as it is.
AI Assistant trims tool results past a share of the model's context window, which can cut a component's source short. Raise the trim threshold in Settings, Tools, AI Assistant, or ask the agent for fewer sections of the component.
Yes, once Pass custom MCP servers is on in Settings, Tools, AI Assistant, Agents. That one setting covers Junie, Claude Agent, Codex and GitHub Copilot. With it off, only Chat mode can call shadcnio.
In Junie's own mcp.json. Settings, Tools, Junie, MCP Settings writes ~/.junie/mcp/mcp.json, read in every project, and a .junie/mcp/mcp.json inside a project holds servers for that project alone. The same shadcnio entry goes in it.
Chat mode follows project rules in .aiassistant/rules, so make a rule of the Always type. Junie and Codex read AGENTS.md at the project root and Claude Agent reads CLAUDE.md, so put the same one-line instruction there.
The server itself is covered by your shadcn.io Pro plan, not by anything on the JetBrains side. Its answers do land in the model's context, so asking for only the sections you need keeps them light.
Not through AI Assistant's settings: each person adds the server with their own URL, because the token in it is theirs. A Team or Organization plan gives every member Pro access and a token of their own. Where a company runs JetBrains IDE Services or JetBrains Central, the admin decides whether people can add servers at all.
At the global level it stays in your IDE settings, out of your repositories, but it's still a key: keep the URL out of rule files, AGENTS.md and chat messages. If it does leak, regenerate it on your account page, where the old one stops working within a few minutes, and paste the new URL into the row with Edit.
Only the tool calls: their names and inputs, like a component's name, a framework or a search for a date picker. Your files and project tree stay in the IDE. Every shadcnio tool only reads the registry, so the server cannot change your project.
A 401 means the URL holds an old token or none: copy the JSON again, Edit the shadcnio row and Apply. A 403 means the account has no active Pro plan; renew it, then use Reconnect on the row. A 429 means past 600 calls a minute on the token, and Retry-After says how long.
Agents get configured servers only with Pass custom MCP servers switched on, in Settings, Tools, AI Assistant, Agents. Turn it on, click OK and start a new chat; Chat mode sees the server without it.
Open Help, then Show Log in Finder (Show Log in Explorer on Windows) and read the server's log in the mcp folder. A URL cut off while pasting is the usual cause: select the row, Edit, paste the JSON again and Apply.
Using another agent too?
The same URL works in every MCP client: use it beside JetBrains, in your editor, your terminal or your chat app.
4.9 out of 5 from 150+ developers
Put the registry in AI Chat
Components, 6,231 blocks and 294k icons for Chat mode, Junie and Claude Agent, in IntelliJ IDEA, WebStorm and the rest, with any Pro plan.
Get Pro