Skip to content

shadcn/ui MCP and API

shadcn/ui provides component source code and registry information for building web interfaces. An agent can read component source and registry information before building interfaces. Longwave installs the shadcn/ui MCP server and runs it on your machine, with no account or key.

Add to Longwave

Install elsewhere

Install shadcn/ui

Choose a harness. These instructions start the same local MCP server shown on this page.

Claude Code

Run this in your terminal. It adds a user-scoped server; use --scope project instead if it should apply only to the current project.

terminal
claude mcp add --scope user --transport stdio shadcn-ui -- npx -y @jpisnice/shadcn-ui-mcp-server
functions
10
access
Runs locally

Use shadcn/ui on Longwave

  1. Download Longwave or open app.longwave.run.
  2. Longwave installs the shadcn/ui MCP server and runs it on your machine, with no account or key.
  3. Ask for the result in any thread, for example: “Find a component for a settings form”. The agent picks the shadcn/ui function and calls it.

shadcn/ui functions

Function
apply_theme Apply a TweakCN theme preset to the project
get_block Get source code for a specific shadcn/ui v4 block (e.g., dashboard-01, login-02, sidebar-01)
get_component Get the source code for a specific shadcn/ui v4 component
get_component_demo Get demo code illustrating how a shadcn/ui v4 component should be used
get_component_metadata Get metadata for a specific shadcn/ui v4 component
get_directory_structure Get the directory structure of the shadcn-ui v4 repository
get_theme Get details of a specific tweakcn theme
list_blocks Get all available shadcn/ui v4 blocks with categorization
list_components Get all available shadcn/ui v4 components
list_themes List available tweakcn themes

Use cases

Questions people ask

Is shadcn/ui a packaged component dependency?

shadcn/ui distributes component source code that becomes part of your project. You can change that code to fit the application. shadcn/ui documentation

What can the shadcn MCP server search?

The server lets an agent browse and search component registries. Registries describe components and other resources that an agent can add to a project. shadcn/ui documentation

How do I add the shadcn/ui MCP server to Claude Code?

Run claude mcp add shadcn-ui -- npx -y @jpisnice/shadcn-ui-mcp-server in a terminal. Longwave installs the shadcn/ui MCP server and runs it on your machine, with no account or key.

Who publishes the shadcn/ui MCP server?

Janardhan Pisnice publishes the shadcn/ui MCP server that Longwave installs. Source code

Use shadcn/ui in Longwave

Call shadcn/ui from any agent thread, on your machine or in the cloud.

Add to Longwave