AI and MCP
Connect your coding agent once. Ask for a country picker, a chat screen, or a hero section and it searches 265 free components and 33 landing blocks (20 Pro with All-Access), reads their props and runs the right shadcn CLI install. Ask for icons the same way, by what they're for or by the Lucide names you already use: it finds them among 1200 Hairline Icons.
Connect
Copy the server address, then pick your tool for where it goes. Streamable HTTP, no key.
https://hairlineui.com/api/mcpCoding agents
In your editor
In a chat app
Claude Code
Works in: The terminal, the VS Code and JetBrains extensions, and the Code tab of the Claude desktop app
Run this once, in any terminal. It covers every project.
Leave out --scope user to add it to one project only. Type /mcp in Claude Code to see it and its tools.
Always current. It reads the library as deployed, so a component shipped today is found today.
Installs, never pastes. Your agent runs the shadcn CLI, so the files, the components they use and their keyframes all land.
Free and read-only. No key, no sign-up, nothing in your project touched by the server.
What your agent can do
Every answer is short markdown that ends with the command to install what it found. Nothing touches your project: your agent runs the install itself.
Search components
search_components
Find Hairline UI React components for what the user needs, by plain words ("undo toast", "dropdown with search", "file upload", "pricing toggle"). Call this before writing a UI piece from scratch. Returns the best matches with their install commands. Icons are not components: use search_icons for them.
Search icons
search_icons
Find Hairline icons (free, MIT, React, Outline and Solid, drawn for 16 and 20 px) by what they are for ("delete", "settings", "upload") or by the Lucide icon they replace ("Trash2", "chevron-down"). Pass several at once to swap a whole lucide-react import. Returns each icon with its import line, one install command for all of them, and the live version where one exists. Icons only: components come from search_components.
Components for a screen
find_for_screen
The components to build a whole screen with ("AI chat", "settings page", "pricing section", "analytics dashboard"), each with the job it does there. For an AI chat it returns every chat part in the order a conversation uses them.
Component docs
get_component
Everything needed to use one component correctly: install command, usage example, AI SDK recipe where there is one, every prop with its type and default, states, and the components it pulls in.
Component source
get_component_source
The exact source files the shadcn CLI installs for a component, with the keyframes it adds to the stylesheet. Use it to read or adapt the code; installing with the CLI is still the way to add it.
Install command
get_install_command
One shadcn CLI command that installs several components, for the package manager in use, with the components and npm packages they bring along.
List components
list_components
Every component in the library: name and one line on what it is. Use it to browse when a search is too narrow.
Then just ask
Name the library the first time. After that most agents reach for it on their own.
“Add a searchable country picker to the signup form, using Hairline UI.”
“Build the chat screen with Hairline UI: composer, streaming answer and tool calls.”
“Which Hairline UI component shows what the agent did, with an undo?”
“Add a pricing section with a monthly and yearly toggle from Hairline UI.”
“Swap the Lucide icons in the sidebar for Hairline icons.”
Without MCP
For assistants that browse instead of connecting. Built from the same docs as the site, so they never fall behind.
- /llms.txt
- The library in one page: what it is and every component, each linked to its docs.
- /llms-full.txt
- Install, usage and props for all 265 components in one file.
- /ui/<name>.md
- One component’s full docs as markdown. Every component page also has Copy page and Open in Claude or ChatGPT.
- /r/registry.json
- The shadcn registry index the CLI installs from.
What we keep
The server is public and read-only. We count how often each search is made and each component is opened, and whether a search found anything, so we know what to build next. Nothing about you, your agent or your code is stored. Privacy
Free components and free blocks are MIT licensed (MIT); Pro blocks install with your All-Access token under our commercial license. Logos belong to their owners and only show which tools connect.