GitHub

MCP Server

Let your AI assistant browse, search and install med-ui components using natural language.

How It Works

med-ui works with an MCP (Model Context Protocol) server. Once connected, your AI assistant can browse med-ui, read component source and examples, and install components into your project for you.

Quick Start

First, tell your project where med-ui lives by adding it to components.json:

components.json
{
  "registries": {
    "@med-ui": "https://ui.elhcn.com/r/{name}.json"
  }
}

Then run the setup command for your client:

npx shadcn@4.21.1 mcp init --client claude
Restart your client afterwards so it picks up the new server.

Manual Setup

If your client isn't listed, add the server to its MCP configuration yourself. For Claude Code, that is .mcp.json in your project root:

.mcp.json
{
  "mcpServers": {
    "med-ui": {
      "command": "npx",
      "args": [
        "shadcn@4.21.1",
        "mcp"
      ]
    }
  }
}

Example Prompts

Once connected, ask your assistant things like:

  • Show me all the components in the med-ui registry.
  • Add the med-ui button, dialog and field components to my project.
  • Build a settings page with a sidebar using med-ui components.