连接 AI 代码助手与 UI 组件生态系统的通用桥梁
厌倦了你的 AI 助手生成通用的 HTML,或者花费时间解释需要安装哪些 UI 组件?无边界组件通过提供一个集中的智能 UI 组件注册表来革新 AI 驱动的 Web 开发,这些组件可以被 AI 助手即时发现并使用。
当你让 AI 创建一个带有图表和表单的仪表盘时,它现在知道确切地从你喜欢的 UI 库中使用哪些组件——无论是 Ant Design、Material-UI、shadcn/ui 还是其他框架。
在无边界组件之前:
用户:"创建一个带有数据表格和表单的管理员仪表盘"
AI:*生成通用的 HTML 和 CSS*
用户:"你能使用 Material-UI 组件吗?"
AI:*需要手动解释可用的组件*
用户:"现在切换到 Ant Design"
AI:*需要另一个上下文切换和组件解释*
在无边界组件之后:
用户:"创建一个带有 Material-UI 组件的管理员仪表盘"
AI:*立即发现并使用完美的 Material-UI 组件*
用户:"很好!现在用 shadcn/ui 重新创建这个"
AI:*无缝切换到最佳的 shadcn/ui 组件*
┌─────────────────┐ MCP 协议 ┌─────────────────┐
│ AI 助手 │ ◄─────────────► │ 无边界组件 │
│ (Claude/GPT-4) │ │ 服务器 │
│ │ │ │
└─────────────────┘ │ │
│ │ │
│ HTTP API │ │
│ │ │
┌─────────────────┐ │ │
│ Web/App UI │ ◄──────────────►│ │
│ 仪表板 │ RESTful API │ │
└─────────────────┘ └─────────────────┘
│
▼
┌─────────────────┐
│ PostgreSQL │
│ 数据库 │
│ │
│ • 注册表 │
│ • 组件 │
│ • 示例 │
└─────────────────┘
npm install borderless-components-mcp
git clone https://github.com/your-org/borderless-components-mcp.git
cd borderless-components-mcp
npm install
# 复制环境模板
cp .env.example .env
# 编辑你的数据库配置
# 默认:postgresql://localhost:5432/borderless_components
npm run build
npm run seed:api # 填充示例注册表和组件
npm run dev # 开发模式
# 或
npm start # 生产模式
就这样!你的服务器现在运行在:
http://localhost:3000http://localhost:3000/mcp// 配置你的 AI 助手以使用无边界组件
const mcpConfig = {
name: "borderless-components",
endpoint: "http://localhost:3000/mcp",
tools: [
"get_available_registries",
"get_available_ui_components_from_registries",
"search_items_in_registries",
"get_item_examples_from_registries"
]
};
// 在所有注册表中搜索组件
const response = await fetch('http://localhost:3000/api/components?query=button&limit=10');
const components = await response.json();
// 在特定注册表中搜索
const antdButtons = await fetch('http://localhost:3[...]