MCP Server
Connect your AI assistant to Cortexcn so it can search, read, and install components, blocks, and charts.
The Cortexcn MCP server lets an AI assistant search the registry, read an item's docs and source, and get the exact command to install it into your project.
Quick Start
-
Connect the server. In Claude Code, run:
claude mcp add --transport http cortexcn https://ui.cortexcn.dev/mcpFor other assistants, see Connect your assistant.
-
Make sure your project has shadcn set up. If there is no
components.jsonin the project root, run:npx shadcn@latest init -
Ask your assistant for what you need, for example: "Add the Lanyard 3D component to the about page."
About the server
| Setting | Value |
|---|---|
| URL | https://ui.cortexcn.dev/mcp |
| Server name | cortexcn |
| Transport | Streamable HTTP |
| Protocol versions | The 2025 revisions and the 2026-07-28 revision |
| Sessions | Stateless |
| Sign-in | None |
| Access | Read-only |
The server is hosted, so most clients connect to the URL directly and there is nothing to install or run.
How installs work
The server never runs commands on your machine. When you ask for an item, it returns the install command, and your assistant (Claude Code, Cursor, or another agent with terminal access) runs it in your project root:
npx shadcn@latest add https://ui.cortexcn.dev/r/lanyard-3d.jsonThe command uses the item's URL, so you do not need to add the @cortexcn registry to components.json. The project still needs shadcn initialized. The CLI installs the item's npm dependencies and any other registry items it needs.
Chat apps such as claude.ai and ChatGPT cannot reach your terminal, so there the assistant gives you the command to run yourself.
Tools
| Tool | Arguments | What it returns |
|---|---|---|
search_items | query, optional kind and limit | Components, blocks, and charts that match a keyword or a need, ranked by relevance. |
list_items | optional kind and category | Every item, filtered by kind or category if you pass them. |
list_categories | none | The groups items are organized in, with a count for each. |
get_item | name, optional include_docs | The install command, the files and dependencies it adds, links to its page and live preview, and its docs with usage, examples, and props. |
get_item_source | name | The source of the item's files. |
get_install_command | names, optional package_manager | One shadcn CLI command that installs several items at once. |
get_setup_guide | none | How to prepare a project: shadcn init and the @cortexcn registry in components.json. |
get_design_guide | none | Cortexcn's DESIGN.md. |
Argument values:
kindis one ofcomponent,block,chart,hook, orlib.limitdefaults to 8 results, up to 25.include_docsdefaults totrue.package_manageris one ofpnpm,npm,yarn, orbun, and defaults topnpm.
Connect your assistant
Each client below uses the same URL. If a config file already lists other servers, add the cortexcn entry next to them.
Claude Code
claude mcp add --transport http cortexcn https://ui.cortexcn.dev/mcpAdd --scope user to use it in every project:
claude mcp add --transport http --scope user cortexcn https://ui.cortexcn.dev/mcpOr add --scope project to write it to .mcp.json in the project root, so everyone on your team gets it. You can also write that file by hand:
{
"mcpServers": {
"cortexcn": {
"type": "http",
"url": "https://ui.cortexcn.dev/mcp"
}
}
}Run /mcp inside Claude Code to check that the server is connected.
Claude Desktop and claude.ai
- Open Customize > Connectors.
- Choose Add custom connector.
- Paste
https://ui.cortexcn.dev/mcpas the URL and choose No sign-in.
In Claude Desktop you can use the config file instead. This runs mcp-remote through npx as a local bridge to the server, so it needs Node.js:
{
"mcpServers": {
"cortexcn": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://ui.cortexcn.dev/mcp"]
}
}
}The file is at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Restart Claude Desktop after you save it.
Cursor
Or add it to .cursor/mcp.json in your project, or to ~/.cursor/mcp.json to use it in every project:
{
"mcpServers": {
"cortexcn": {
"url": "https://ui.cortexcn.dev/mcp"
}
}
}VS Code
The server works with GitHub Copilot in agent mode. Add it to .vscode/mcp.json in your project:
{
"servers": {
"cortexcn": {
"type": "http",
"url": "https://ui.cortexcn.dev/mcp"
}
}
}Or add it from a terminal:
code --add-mcp "{\"name\":\"cortexcn\",\"type\":\"http\",\"url\":\"https://ui.cortexcn.dev/mcp\"}"Windsurf and Devin Desktop
Add it to mcp_config.json:
{
"mcpServers": {
"cortexcn": {
"serverUrl": "https://ui.cortexcn.dev/mcp"
}
}
}OpenAI Codex CLI
codex mcp add cortexcn --url https://ui.cortexcn.dev/mcpOr add it to ~/.codex/config.toml:
[mcp_servers.cortexcn]
url = "https://ui.cortexcn.dev/mcp"Zed
Add it to your Zed settings.json:
{
"context_servers": {
"cortexcn": {
"url": "https://ui.cortexcn.dev/mcp"
}
}
}ChatGPT
Custom connectors need developer mode, which is available on the web for Plus, Pro, Business, Enterprise, and Edu plans.
- Go to Settings > Security and login and turn on Developer mode.
- Add a connector, paste
https://ui.cortexcn.dev/mcpas the URL, and choose No authentication.
Example prompts
Once the server is connected, ask in plain words:
- "Find a hero block with a product screenshot and add it to the landing page."
- "Add the Lanyard 3D component and use our team's names."
- "Build a dashboard page with an area chart and three stat cards from Cortexcn."
- "What props does the Gooey Nav take?"
- "Show me the source of the Sphere Menu before we install it."
- "Which Cortexcn chart fits a sales funnel? Add it to the reports page."
Install from a component page
Every component page has an install box with an MCP tab. It shows the command that connects the server in Claude Code and a prompt to paste into your assistant, such as:
Add the Cortexcn lanyard-3d item to this project.Assistants without MCP
If your assistant cannot use MCP, give it the docs as markdown instead:
- Add
.mdto any docs page URL, for example https://ui.cortexcn.dev/docs/components/lanyard-3d.md. - Every docs page in one file: https://ui.cortexcn.dev/llms-full.txt.
Requirements
- An AI assistant that supports MCP.
- To install items: a React and Tailwind CSS project with shadcn initialized (
npx shadcn@latest init). - Node.js 18 or later for the shadcn CLI.
Related
- Skills: teach your assistant how to work with Cortexcn
- DESIGN.md: the design system your assistant should follow
- Installation: set up the
@cortexcnregistry by hand