OriginUI MCP Server

OriginUI MCP Server

Enables searching, browsing, and installing OriginUI components through the Model Context Protocol. It provides detailed component information, visual previews, and installation commands compatible with the shadcn CLI.

Category
访问服务器

README

OriginUI MCP Server

A Model Context Protocol (MCP) server that provides access to OriginUI components, enabling Claude Code agents to search, browse, and install OriginUI components seamlessly.

Features

  • Component Search: Search components by name, category, or tags
  • Component Details: Get comprehensive information about specific components
  • Installation Commands: Generate proper pnpm dlx shadcn@latest add commands
  • Visual Previews: Get component screenshots and visual descriptions to assess fit
  • Component Preview: View styling information and usage examples
  • Category Filtering: Browse components by category (buttons, inputs, forms, etc.)

🚀 Quick Start

TL;DR: Add this to your ~/.claude-code/mcp.json file:

{
  "mcpServers": {
    "origin-ui": {
      "command": "npx",
      "args": ["--yes", "github:kelvinchng/origin-ui-mcp"],
      "env": {}
    }
  }
}

Restart Claude Code and ask: "What OriginUI button components are available?"

Installation

Option 1: Use with npx (Recommended - No Cloning Required!)

No installation needed! You can use the MCP server directly from the GitHub repository with npx.

Option 2: Clone and Build Locally

git clone https://github.com/kelvinchng/origin-ui-mcp.git
cd origin-ui-mcp
npm install
npm run build

Option 3: Global Installation (Coming Soon)

npm install -g origin-ui-mcp

Claude Code Integration

Step 1: Add to Claude Code MCP Configuration

Create or edit your Claude Code MCP configuration file at ~/.claude-code/mcp.json:

Option A: Using npx (Recommended)

{
  "mcpServers": {
    "origin-ui": {
      "command": "npx",
      "args": ["--yes", "github:kelvinchng/origin-ui-mcp"],
      "env": {}
    }
  }
}

Option B: Using local clone

{
  "mcpServers": {
    "origin-ui": {
      "command": "node",
      "args": ["/absolute/path/to/origin-ui-mcp/dist/index.js"],
      "env": {}
    }
  }
}

Note: With Option A (npx), no manual installation or path configuration is needed!

Step 2: Restart Claude Code

After adding the MCP configuration, restart Claude Code to load the OriginUI MCP server.

Step 3: Verify Integration

You can verify the integration is working by asking Claude Code:

"What OriginUI components are available for buttons?"

Claude Code should now be able to search, describe, and provide installation commands for OriginUI components.

Usage Examples

Once integrated with Claude Code, you can ask questions like:

  • "Find me payment-related components"
  • "How do I install the button component?"
  • "What styling options does the card component have?"
  • "Show me all navigation components"
  • "I need a component for user input forms"

Claude Code will use the MCP server to provide accurate information and installation commands.

📸 Visual Component Assessment

One of the key features is the ability to get visual previews of components to help LLMs make better recommendations:

"Show me what the payment component looks like"
"Get a screenshot of the button component"
"I want to see the visual style of navigation components"

The MCP server will provide:

  • Visual descriptions of component appearance
  • Links to live examples on OriginUI
  • Theme-specific information (light/dark modes)
  • Mobile responsiveness details
  • Use case recommendations based on visual style

Available Tools

search_components

Search for OriginUI components by name, category, or tags.

Parameters:

  • query (string, required): Search query
  • category (string, optional): Filter by category
  • limit (number, optional): Maximum results (default: 10)

Example:

search_components({
  query: "payment",
  category: "form",
  limit: 5
})

get_component_details

Get detailed information about a specific component.

Parameters:

  • componentId (string, required): Component ID (e.g., "comp-163")

Example:

get_component_details({
  componentId: "comp-163"
})

list_components

List all available components with basic information.

Parameters:

  • category (string, optional): Filter by category
  • limit (number, optional): Maximum results (default: 50)

get_install_command

Get the installation command for a specific component.

Parameters:

  • componentId (string, required): Component ID

Returns:

pnpm dlx shadcn@latest add https://originui.com/r/comp-163.json

get_component_preview

Get component preview with styling information and usage examples.

Parameters:

  • componentId (string, required): Component ID

get_component_screenshot

Get component visual preview to help assess if it fits your project.

Parameters:

  • componentId (string, required): Component ID
  • theme (string, optional): Theme preference ("light", "dark", "both")

Returns:

  • Visual descriptions of component appearance
  • Screenshots when available
  • Links to live examples
  • Use case recommendations
  • Installation instructions

Component Categories

  • button - Button components
  • input - Input and form controls
  • select - Select and dropdown components
  • navbar - Navigation components
  • card - Card and container components
  • form - Form-related components
  • layout - Layout components
  • navigation - Navigation elements
  • feedback - Feedback and status components
  • data-display - Data display components
  • overlay - Modal and overlay components
  • typography - Text and typography components
  • media - Media components

Example Usage with Claude Code

// Search for button components
const buttons = await search_components({
  query: "button",
  category: "button",
  limit: 10
});

// Get details for a specific component
const details = await get_component_details({
  componentId: "comp-163"
});

// Get installation command
const installCmd = await get_install_command({
  componentId: "comp-163"
});

// Get visual preview to assess fit
const screenshot = await get_component_screenshot({
  componentId: "comp-163",
  theme: "both"
});

// Install the component
// pnpm dlx shadcn@latest add https://originui.com/r/comp-163.json

Development

# Install dependencies
npm install

# Build the project
npm run build

# Run in development mode
npm run dev

# Start the MCP server
npm start

How It Works

  1. Component Discovery: The server maintains a registry of OriginUI components with metadata
  2. Dynamic Fetching: Component details are fetched from OriginUI's JSON registry on demand
  3. Caching: Components are cached for 5 minutes to improve performance
  4. Installation: Generates proper pnpm dlx shadcn@latest add commands with correct URLs

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选