shadcn/ui for LM Studio's local models
Add an entry to mcp.json and the model on your own machine can check shadcn components, blocks and icons instead of guessing from its training data. LM Studio is free; the server needs Pro.
- Kind
- App
- Goes in
mcp.json- Connects
- Through mcp-remote
- Team config
- No
Add it to LM Studio's mcp.json
LM Studio reads its MCP servers from one mcp.json, edited in its own editor. Signed in with Pro, the entry beside these steps already holds your URL.
Copy the entry
It starts
mcp-remotewithnpx, pointed at your MCP URL with the token in it. No token yet? Create one on your account.Open mcp.json in LM Studio
In the right sidebar, open the hammer tab (Program in LM Studio's docs (opens in a new tab), headed Integrations), then Install → Edit mcp.json. The file opens in the in-app editor.
Paste it and save
If the file already lists servers, paste only the
shadcnioentry insidemcpServers, after a comma. LM Studio loads the servers when you save;npxneeds Node.js installed and on your PATH.Load a model that calls tools
Pick one with the tool-use badge (a hammer) in the model picker, then switch on
mcp/shadcnioin Integrations for the chat.
How it reads, with YOUR_TOKEN where your token goes:
{ "mcpServers": { "shadcnio": { "args": [ "-y", "mcp-remote", "https://www.shadcn.io/api/mcp?token=YOUR_TOKEN" ], "command": "npx" } } }
mcp.json sits in ~/.lmstudio (%USERPROFILE%\.lmstudio on Windows), on your machine only. Its URL holds your token: regenerate it if the file ever leaks.
| Entry | How it connects | Needs |
|---|---|---|
command: npx and mcp-remote (the config here) | A bridge on your machine, over stdio, passes each call on | Node.js, with npx on your PATH |
url: your MCP URL, nothing else | LM Studio talks to the server over HTTP itself | LM Studio 0.3.17 (build 10) or later |
integrations in /api/v1/chat | Your scripts reuse the saved server as mcp/shadcnio | LM Studio 0.4.0, with calling servers from mcp.json allowed |
Make sure the model sees it
The Integrations panel lists each mcp.json server as mcp/<name>, with a switch and, expanded, its tools.
- Open the hammer tab in the right sidebar and find
mcp/shadcniowith its switch on. - Expand it: you want 22 tools under Tools. The refresh icon beside it reloads the list.
- Load a model with the tool-use badge and send the prompt below. Allow the
whoamicall when LM Studio asks: the reply names your account and the calls left this minute.
Three chats with a local model
Three chats with a model running in LM Studio: the prompt, the tool calls you confirm, and the answer. Switch the MCP off to see the same model guessing.
- shadcn.io MCP connected · 22 tools
MCP call: plan_page({ brief: "inventory admin: stock levels, products and restock orders", kind: "app" })Returns: Seven sections, from sidebar-inventory-manager to empty-state-no-inventoryMCP call: get_block({ names: ["sidebar-inventory-manager", "dashboard-inventory-levels", "tables-inventory"], include: ["install"] })Returns: One npx shadcn add command for the three blocksAgent step: You ran it in your project's terminalReturns: The sidebar, the stock levels and the table, installed
In your project
Inventory admin
- Three real blocks, picked from the plan
- One command for the whole shell
1 prompt → 2 MCP calls
Prompts for your local model
Paste one into a chat with a tool-calling model. Naming the server (use shadcnio…) helps a local model pick its tools over what it remembers.
What helps in LM Studio
The parts of LM Studio that decide how well a local model uses the server: confirmations, context, presets and logs.
Approve once, or fix the arguments
LM Studio stops before each tool call and shows its arguments, which you can edit: switch
frameworktosveltethere if a small model guessedreact. Every shadcnio tool only reads, so you can always allow them, or set the server to Allow all in its Integrations row.Trim the tools for a small context
LM Studio counts tool definitions against the model's context. Expand
mcp/shadcnioin Integrations and untick the tools you won't use, like designs and templates, or load the model with a longer context.A preset that names the server
LM Studio has no rules file: a system prompt does that job. Save this one in a preset and pick the preset for UI chats, so you can stop naming the server.
For UI work, call the shadcnio tools before writing any component, and give me the install command they return.
Connect without Node.js
The same URL works as a remote entry, so LM Studio connects without
mcp-remoteor Node.js. Use the URL from your dashboard, token included.{ "mcpServers": { "shadcnio": { "url": "YOUR_MCP_URL" } } }
See what the model received
lms log streamprints the exact input LM Studio sends the model. If no shadcnio tool definitions are in it, the integration is off for this chat.$ lms log stream --source model --filter inputFrom LM Studio's own API
With Allow calling servers from mcp.json on in the server settings,
/api/v1/chatcan use the server too, limited to the tools you list.$ curl http://localhost:1234/api/v1/chat \ -H "Authorization: Bearer $LM_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{"model": "qwen/qwen3-8b", "input": "use shadcnio to find a date picker for Vue", "integrations": [{"type": "plugin", "id": "mcp/shadcnio", "allowed_tools": ["search_components", "get_component"]}]}'
When mcp/shadcnio misbehaves
What LM Studio shows, and what fixes it. Startup errors land in the Developer tab's logs; the troubleshooting guide covers every client.
mcp/shadcnionever finishes starting, or shows an error.- LM Studio runs
npxfrom your system PATH, so Node.js has to be installed there. Install it, then use Force Restart in the server's ••• menu, or switch to theurlentry, which needs neither. - A tool call comes back with 401.
- The token in your
mcp.jsonURL is old or cut off, usually because you regenerated it. Copy the entry from this page again, replace the old one, and save. - A tool call comes back with 403.
- LM Studio reached shadcn.io and the token checks out, but the Pro plan on its account has lapsed. Renew it on pricing, and the next tool call goes through on the same
mcp.json. - The model answers without calling a single tool.
- Check the loaded model has the tool-use badge and that
mcp/shadcniois switched on in this chat's Integrations. Smaller models call tools less reliably: name the server in the prompt, or load a larger one. - Every message fails with a duplicate tool name error.
- LM Studio passes every enabled server's tools to the model under their own names, so two servers with a same-named tool clash, often shadcnio added twice. Keep one entry, or switch the other server off in Integrations.
- Replies cut off, or the chat runs out of context after a few calls.
- Tool definitions and results fill a local model's context quickly. Load the model with a longer context, untick the tools you don't use, and ask for less at a time: the install and usage, not the whole source.
Get the MCP for LM Studio 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 LM Studio: setup, limits, and the rest.
The entry on this page starts mcp-remote with npx: a small bridge that runs on your machine and forwards each call to your MCP URL, and npx comes with Node.js. LM Studio 0.3.17 build 10 and later can also reach a remote server by its url, which skips the bridge and Node.js.
In the right sidebar, open the hammer tab (headed Integrations), then Install and Edit mcp.json. The file opens in LM Studio's own editor. Paste the shadcnio entry inside mcpServers, after a comma if other servers are listed, and save: LM Studio loads the servers on save.
Through tools: ask in words. For example, use shadcnio to get Stripe's DESIGN.md calls get_design and puts the same file in the chat, and a guide such as forms comes through get_guide.
The model hands you the npx shadcn add command, with your token in it, to run in your terminal. For Vue, Svelte and Solid it can list every file with its path and the packages to add instead.
Yes. LM Studio stops before a tool call and shows its arguments, which you can edit, for instance to switch the framework to svelte if a small model guessed react. Every shadcnio tool only reads, so you can allow them, or set the server to Allow all in its Integrations row.
Yes, from LM Studio 0.4.0. Turn on Allow calling servers from mcp.json in the server settings, then pass mcp/shadcnio in the integrations of a /api/v1/chat request, with allowed_tools to keep the list short.
Any model LM Studio marks with the tool-use badge can call it, but larger ones choose the right tool and fill in its arguments more reliably. If a small model skips the tools or sends odd arguments, load a bigger one or one trained for tool calling, and keep only the tools you need switched on.
LM Studio counts tool definitions against the model's context. Expand mcp/shadcnio in Integrations and untick the tools you won't use, such as designs and templates, or load the model with a longer context. Asking for the install and usage rather than whole source files helps too.
No. The model fetches the docs, props and install for the exact component, framework and primitives you name, so nothing is out of date, and the context holds only what the task needs. Pasting whole docs pages fills a local model's context long before the work starts.
Yes. LM Studio stays free, and the server needs a shadcn.io Pro plan on the account behind your token. If shadcnio won't connect on a work machine, check the network: behind a proxy or firewall, the client needs HTTPS access to this site.
Yes, the MCP is part of every Pro plan, while LM Studio itself stays free. Without an active plan the server answers 403. An Individual license is one seat for personal use, and Team and Organization plans give each member their own token.
No. The model runs on your machine and the conversation stays in LM Studio. Only the tool calls go out: the arguments the model fills in, like a search query or a component name, along with your token.
LM Studio and your model do, but the tools don't: each call fetches from shadcn.io, so it needs a connection. Offline, the calls fail and the model falls back on what it remembers.
Inside mcp.json, as part of the URL: ~/.lmstudio/mcp.json on macOS and Linux, %USERPROFILE%\.lmstudio\mcp.json on Windows. It's plain text on your own disk, so don't share the file, and regenerate the token on your account page if it ever gets out.
LM Studio runs npx from your system PATH, so Node.js has to be installed there. Install it, then use Force Restart in the server's menu, or switch to the url entry, which needs neither Node.js nor the bridge.
A 401 means the token in your mcp.json URL is old or cut off, usually because you regenerated it: copy the entry again and save. A 403 means the token is fine but the Pro plan on that account has lapsed. Past 600 calls a minute you get a 429 instead.
LM Studio passes every enabled server's tools to the model under their own names, so two servers with a same-named tool clash, often shadcnio added twice. Keep one entry, or switch the other server off in Integrations.
Check that the loaded model has the tool-use badge and that mcp/shadcnio is switched on for this chat in Integrations. Smaller models call tools less reliably, so name the server in the prompt or load a larger model.
Using another agent too?
The same URL works in every MCP client: use it beside LM Studio, in your editor, your terminal or your chat app.
4.9 out of 5 from 150+ developers
Point your local model at real components
LM Studio stays free, and the server comes with any shadcn.io Pro plan: monthly, yearly or lifetime.
Get Pro