Skip to content

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.

  1. Copy the entry

    It starts mcp-remote with npx, pointed at your MCP URL with the token in it. No token yet? Create one on your account.

  2. 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.

  3. Paste it and save

    If the file already lists servers, paste only the shadcnio entry inside mcpServers, after a comma. LM Studio loads the servers when you save; npx needs Node.js installed and on your PATH.

  4. Load a model that calls tools

    Pick one with the tool-use badge (a hammer) in the model picker, then switch on mcp/shadcnio in Integrations for the chat.

mcp.json
Sign in to get your config
Sign in with a Pro account, and this holds your MCP URL, ready to paste.

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.

Ways LM Studio can reach the server
EntryHow it connectsNeeds
command: npx and mcp-remote (the config here)A bridge on your machine, over stdio, passes each call onNode.js, with npx on your PATH
url: your MCP URL, nothing elseLM Studio talks to the server over HTTP itselfLM Studio 0.3.17 (build 10) or later
integrations in /api/v1/chatYour scripts reuse the saved server as mcp/shadcnioLM 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.

  1. Open the hammer tab in the right sidebar and find mcp/shadcnio with its switch on.
  2. Expand it: you want 22 tools under Tools. The refresh icon beside it reloads the list.
  3. Load a model with the tool-use badge and send the prompt below. Allow the whoami call when LM Studio asks: the reply names your account and the calls left this minute.
Prompt
use shadcnio to check which account I'm connected with

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.

Your agent
  1. shadcn.io MCP connected · 22 tools
  2. You: Plan the screens for an inventory admin: stock levels, products and restock orders.
  3. 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-inventory
  4. MCP call: get_block({ names: ["sidebar-inventory-manager", "dashboard-inventory-levels", "tables-inventory"], include: ["install"] })Returns: One npx shadcn add command for the three blocks
  5. Agent step: You ran it in your project's terminalReturns: The sidebar, the stock levels and the table, installed
  6. Your agent: The plan starts with the inventory sidebar, the stock-level dashboard and the inventory table, and one command adds all three.

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.

01
use shadcnio to plan the screens of an inventory admin and give me one install command for them
02
use shadcnio to find a command palette for my React app on Radix and show me how to open it with Cmd+K
03
use shadcnio to get the Svelte files for a dialog, with the packages I need to add
04
use shadcnio to explain which props the Popover takes before I build a filter menu
05
use shadcnio to find matching Tabler icons for upload, download and sync in Vue
06
use shadcnio to pull Vercel's DESIGN.md and turn its colors into theme tokens
07
use shadcnio to tell me how to set up a new Vite app for its components
08
use shadcnio to build a login form with React Hook Form and Zod

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 framework to svelte there if a small model guessed react. 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/shadcnio in 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-remote or Node.js. Use the URL from your dashboard, token included.

    {
      "mcpServers": {
        "shadcnio": { "url": "YOUR_MCP_URL" }
      }
    }
  • See what the model received

    lms log stream prints 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 input
  • From LM Studio's own API

    With Allow calling servers from mcp.json on in the server settings, /api/v1/chat can 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/shadcnio never finishes starting, or shows an error.
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.
A tool call comes back with 401.
The token in your mcp.json URL 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/shadcnio is 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.

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