KD-UI
生成即用型Flask+DaisyUI UI组件的MCP服务器。让你的人工智能助手生成仪表板、表单、表格、导航栏、侧栏等——默认情况下,它们会被抛光。
堆栈:顺风CSS+DaisyUI 4+Lucide Icons+Chart.js,通过CDN交付。无需构建步骤。
______________________________________________________________________
安装
1.克隆和设置
git clone https://github.com/windseeker5/kdui_mcp.git
cd kdui_mcp
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # Linux / macOS
# venv\Scripts\activate # Windows
# Install the MCP server package
pip install -e mcp-server2.配置您的AI工具
Claude代码(推荐——项目范围)
A. .mcp.json 文件已位于项目根目录下。更新 command 匹配克隆位置的路径:
{
"mcpServers": {
"kd-ui": {
"command": "/absolute/path/to/kdui_mcp/venv/bin/python",
"args": ["-m", "kd_ui_server.server"],
"cwd": "/absolute/path/to/kdui_mcp/mcp-server"
}
}
}Claude Code自动检测 .mcp.json 当你打开项目时。不需要其他配置。
克劳德代码(全局安装)
claude mcp add kd-ui \
--command "/absolute/path/to/kdui_mcp/venv/bin/python" \
-- -m kd_ui_server.serverVS代码——Cline扩展
打开VS代码设置→ 搜索 临床MCP → 添加新的服务器条目:
| 字段 | 值 |
|---|---|
| 姓名 | kd-ui |
| 指挥部 | /absolute/path/to/kdui_mcp/venv/bin/python |
| Args | -m kd_ui_server.server |
| 工作目录 | /absolute/path/to/kdui_mcp/mcp-server |
然后重新加载VS Code窗口。
克劳德桌面
增添 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)或 %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"kd-ui": {
"command": "/absolute/path/to/kdui_mcp/venv/bin/python",
"args": ["-m", "kd_ui_server.server"],
"cwd": "/absolute/path/to/kdui_mcp/mcp-server"
}
}
}重新启动克劳德桌面。
______________________________________________________________________
可用工具
| 工具 | 说明 |
|---|---|
create_dashboard | 完整的仪表板布局——侧边栏或顶部导航、统计数据、图表、表格 |
create_form | 表单模板--登录、注册、联系人或自定义字段 |
create_table | 具有搜索、排序和分页功能的数据表 |
add_component | 单个组件——见下面的完整列表 |
add_component 类型
用户界面组件: badge, button, alert, card, progress, skeleton, typography, stat_card, modal, tabs, breadcrumb, dropdown_menu, navbar, sidebar, navigation_menu, chart_container, theme_toggle
登录页面部分: hero, features, testimonials, pricing, cta, footer
______________________________________________________________________
示例提示
Create a sales dashboard with sidebar navigation, stat cards for revenue and active users, and a monthly revenue chart.Add a dropdown menu with Profile, Settings, and Log out items.Generate a login form.______________________________________________________________________
另请参见
SHOWCASE.md--在本地运行组件展示以浏览每个组件
