shadcn/ui in Amazon Q Developer CLI
Add one entry to ~/.aws/amazonq/mcp.json and q chat can look up shadcn components, blocks and icons, then install them in your project. It needs shadcn.io Pro.
- Kind
- Terminal agent
- Goes in
~/.aws/amazonq/mcp.json- Connects
- Through mcp-remote
- Team config
- Yes
Add it to ~/.aws/amazonq/mcp.json
Amazon Q starts each MCP server as a local command, so the entry runs mcp-remote with npx to reach shadcn.io over HTTP. Once you're signed in with Pro, the config next to these steps has your own URL in it.
Copy the entry
It runs
npx -y mcp-remotewith your MCP URL, token included, as the last argument. If you don't have a token yet, generate one on your account page first.Merge it into mcp.json
Open
~/.aws/amazonq/mcp.json, or create it if it isn't there. PutshadcnioinsidemcpServers, next to any servers you already have, and save.Or let q mcp add write it
q mcp add --name shadcnio --command npxwith--argsset to a JSON array of-y,mcp-remoteand your URL writes the same entry to the global file.--scope workspacewrites.amazonq/mcp.jsoninstead.Start a new q chat
Amazon Q reads
mcp.jsonwhen a session starts, so leave any open one with/quitand runq chatagain. This machine needs Node.js, sincenpxfetchesmcp-remoteon the first run.
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" } } }
~/.aws/amazonq/mcp.json lives in your home folder, outside every repo, and its args hold your token. Amazon Q in VS Code and JetBrains reads the same file while useLegacyMcpJson is on, as it is by default.
| File | Applies to | Good to know |
|---|---|---|
~/.aws/amazonq/mcp.json | Every project on this machine, in the CLI and the IDE | Holds your token, so it stays out of git |
.amazonq/mcp.json at the repo root | This workspace only | Wins over the global file when both define shadcnio |
mcpServers in an agent file under ~/.aws/amazonq/cli-agents/ | Sessions started with q chat --agent and that agent's name | Set useLegacyMcpJson to keep the mcp.json servers as well |
Commit .amazonq/mcp.json for the team
Commit .amazonq/mcp.json at the repo root with the entry below. Where the token would go, it names SHADCNIO_TOKEN, so the repo never holds anyone's key: each teammate exports that variable in the shell they start q chat from. On a shadcn.io Team or Organization plan, each member's own token carries Pro.
{ "mcpServers": { "shadcnio": { "args": [ "-y", "mcp-remote", "https://www.shadcn.io/api/mcp?token=${SHADCNIO_TOKEN}" ], "command": "npx" } } }
Each teammate sets SHADCNIO_TOKEN to their own token (from their MCP URL), so no token is committed.
Check it with /mcp and /tools
/mcp in a q chat session prints each server with its load messages, and lists any still loading. /tools shows what Amazon Q can call, with shadcnio's 22 tools under its name.
- Run
q chatin a project. Servers load in the background, so you can type whileshadcniostarts. - Type
/mcpand findshadcniowith its load messages, or under Still loading if it hasn't finished. - Type
/toolsto see its 22 tools. Outside a session,q mcp status --name shadcnioprints its scope, command and timeout. - Send the prompt below and press
ywhen Amazon Q asks to runwhoami: it answers with your account, your plan and this minute's remaining calls.
What it looks like in q chat
An S3 upload, a Lambda card and a Vue region picker: the prompt, the calls Amazon Q makes and what ends up in the repo. Flip the MCP off and the same prompt runs on Amazon Q's memory alone.
- shadcn.io MCP connected · 22 tools
Agent step: Read src/app/api/upload-url/route.ts (fs_read)Returns: A route that signs S3 PUT URLs with the AWS SDKMCP call: search_blocks({ query: "upload to s3 with a presigned url", category: "file-upload" })Returns: file-upload-presigned-url ranked firstMCP call: get_block({ name: "file-upload-presigned-url", include: ["install"] })Returns: One npx shadcn add command, your token in its URLAgent step: Ran npx shadcn add with execute_bash (you pressed y)Returns: The block, plus the progress and button parts it uses
In your project
Presigned upload
- Drop zone, progress and retry from a real block
- Wired to the signing route you already had
1 prompt → 2 MCP calls
Prompts to try in q chat
Paste one at the q chat prompt, or type /editor to write a longer one. Naming shadcnio keeps Amazon Q on the registry instead of its memory.
Amazon Q specifics
What's particular to Amazon Q: its approval prompt, rules files, agents, the wait at start-up, scripted runs and the IDE plugin.
Trust the shadcnio tools
The default agent trusts only
fs_read, so Amazon Q stops before eachshadcniocall and asks[y/n/t]. Presstto trust that tool for the session, or launch with all of the server's tools trusted.$ q chat --trust-tools=fs_read,@shadcnio
A rule in .amazonq/rules
The default agent loads
AmazonQ.md,README.mdand every Markdown file under.amazonq/rules/into each session. Put one line there and you can stop naming the server in prompts.For any UI change, ask the shadcnio MCP for the component, block or icon first, and install it with the command it returns.
An agent for UI work
Save this as
~/.aws/amazonq/cli-agents/ui.jsonand start it withq chat --agent ui.useLegacyMcpJsonkeeps yourmcp.jsonservers, andallowedToolstrustsshadcnioin every session.{ "description": "UI work with the shadcn registry", "tools": ["*"], "allowedTools": ["fs_read", "@shadcnio"], "useLegacyMcpJson": true }
Give it time to load
Servers load in the background, and
mcp.initTimeoutsets how many milliseconds Amazon Q waits for them before your first prompt. The firstnpxrun downloadsmcp-remote, so a slow network may need longer.$ q settings mcp.initTimeout 20000
Scripted runs
q chat --no-interactivetakes the prompt as an argument and can't stop to ask, so trust what the job needs up front: the server, file writes and the shell.$ q chat --no-interactive \ --trust-tools=fs_read,fs_write,execute_bash,@shadcnio \ "use shadcnio to add a skeleton to the invoices list"
The same server in your IDE
Amazon Q in VS Code and JetBrains picks up the same
mcp.json. In the Chat panel, the tools icon listsshadcnio, and each of its tools can be set to Ask, Always allow or Deny.
When shadcnio won't load
What Amazon Q shows when shadcnio fails, and what to do about it. Problems common to every client are in the troubleshooting guide.
/mcpdoesn't list shadcnio at all.- Either
q chatwas already running when you saved, orshadcnioisn't insidemcpServers. Check the file parses as JSON, then/quitand runq chatagain. In a custom agent, check thatuseLegacyMcpJsonistrue. - shadcnio fails to load and prints an error.
- Read what
mcp-remoteprints asq chatstarts. An old token is the usual cause: copy the entry again from this page or your dashboard. A403there means the account has no active Pro plan; renew it on pricing. - shadcnio never comes up, with no error from mcp-remote.
npxcomes with Node.js. Runnode --versionin the shell you startq chatfrom, and if it fails, install Node.js and open a new terminal./mcpsays MCP functionality has been disabled by your administrator.- Your Q Developer Pro admin turned MCP off in the profile, or allows only the servers in an MCP registry. Ask them to switch it back on, or to add shadcn.io to that registry.
- On Windows, the server doesn't start.
- Run
npxthroughcmd: setcommandtocmdand startargswith/candnpx, before-y,mcp-remoteand your URL. MCP clients has the whole entry. - Amazon Q writes a component from memory instead.
- Name the server (
use shadcnio to…) and ask for something specific. A rule under.amazonq/rules/makes that the default, and Kiro has the setup if you've moved to Kiro CLI.
Get the MCP for Amazon Q 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 Amazon Q: setup, limits, and the rest.
Yes. Amazon Q starts the server as a local command, and npx, which comes with Node.js, downloads mcp-remote and runs it the first time. If shadcnio never loads, check that node --version works in the same shell you start q chat from.
An mcp.json entry tells Amazon Q which command to start and talk to over stdio, while shadcn.io serves MCP over HTTP. mcp-remote is a small npm package that runs on your machine between the two and forwards each call to your MCP URL.
Yes. Run q mcp add --name shadcnio --command npx, with --args set to a JSON array of -y, mcp-remote and your URL, and it writes the entry to ~/.aws/amazonq/mcp.json. Add --scope workspace to write the project's .amazonq/mcp.json, and run q mcp list to see what each file holds.
Usually not. Amazon Q in VS Code and JetBrains still reads the legacy mcp.json files while useLegacyMcpJson is true, which is the default, so the entry you saved for the CLI shows up there too. Open the Chat panel and choose the tools icon to see it.
Press t at the y/n/t prompt to trust that tool for the rest of the session, or start with q chat --trust-tools=fs_read,@shadcnio to trust every shadcnio tool at once. To make it stick, list @shadcnio under allowedTools in an agent file of your own.
Amazon Q calls get_install_plan, which returns each file with its path and the packages to add. It writes the files with fs_write and installs the packages with execute_bash, asking first unless you trusted those tools. A React project gets a single npx shadcn add command instead, built for the base its package.json uses.
Type /usage to see how much of the context window the session has used, and /compact to summarize the conversation and make room. Asking for a component's usage or its install, rather than its full source, keeps each result short.
Nothing extra on the AWS side beyond a working Amazon Q. On a Q Developer Pro subscription signed in through IAM Identity Center, an admin can switch MCP off or limit it to an approved registry, so ask them if /mcp says it is disabled. The shadcnio server is billed apart from AWS: it needs shadcn.io Pro on the account behind your token.
Commit .amazonq/mcp.json at the repo root with the shared entry, which reads the token from SHADCNIO_TOKEN, and have each person export that variable in the shell they run q chat from. On a shadcn.io Team or Organization plan, every member's own token has Pro.
In ~/.aws/amazonq/mcp.json, as part of the URL in the entry's args. That file sits in your home folder, away from your repositories, so no commit carries it. If it ever leaks, regenerate the token on your account page and the old one stops working.
Each tool call's name and inputs, like a component name, a framework or a search phrase, and nothing more. Amazon Q reads your project on your machine with its own tools, and every shadcnio tool only reads the registry: none of them can touch your files.
Watch the output as q chat starts, because mcp-remote prints its errors there. The usual cause is a URL with an old token: copy it again from your dashboard and paste it over the old one. Without an active Pro plan the server answers 403, and that shows up in the same place.
Name the server in the prompt, check that /mcp shows shadcnio loaded, and be specific: a component's name, your framework or a block category. A vague request lets the model fall back on what it remembers, and a rule under .amazonq/rules keeps it on the registry.
Run npx through cmd. Set the command to cmd and put /c and npx first in args, ahead of -y, mcp-remote and your URL. The MCP clients page on shadcn.io shows the whole entry.
Yes, for the q command you have installed: it keeps reading ~/.aws/amazonq/mcp.json. AWS now ships the CLI as Kiro CLI and keeps the open-source Amazon Q CLI on critical security fixes only, so once you move to kiro-cli, follow the Kiro setup on shadcn.io instead.
Using another agent too?
The same URL works in every MCP client: use it beside Amazon Q, in your editor, your terminal or your chat app.
4.9 out of 5 from 150+ developers
Use the registry from q chat
Every component, 6,231 blocks and 294k icons, one mcp.json entry away from your next `q chat` session, with shadcn.io Pro.
Get Pro