@smwb / ui-mcp-solid
一、 模型上下文协议 (MCP) 它的服务器 这就暴露了
@smwb/ui-solid 组件目录和定制
AI编码助手指南(Cursor, Claude Desktop/Code, Copilot,…)。
工具
| 工具 | 目的 |
|---|---|
search_components | 通过名称、id、描述或prop关键字查找组件 |
get_component_props | 一个组件的完整元数据:道具(类型、要求、描述)、SSR分类(ssr.safe / ssr.rendering / ssr.note) +所需进口较少(styles.base / styles.entries / styles.dependencies / styles.importExample) |
search_customization | 全局主题化选项和每个组件定制方法 |
get_customization | 什么以及如何自定义组件或全局主题 |
运行
npx -y @smwb/ui-mcp-solid
沟通在 的头 只有(没有HTTP端口);启动日志到stderr。
光标(.cursor/mcp.json) / Claude Desktop配置
{
"mcpServers": {
"smwb-ui-solid": {
"command": "npx",
"args": ["-y", "@smwb/ui-mcp-solid"]
}
}
}
示例流
search_components→{ "query": "text field", "limit": 5 }get_component_props→{ "nameOrId": "TextField" }(或idinputs/textField/textField) - - - 读styles.entries/styles.dependencies/styles.importExample一个最小的LESS bundleget_customization→{ "nameOrId": "Button" }或者{ "nameOrId": "global/runtime-css" }
组件id遵循元数据路径,例如: dataDisplay/chat/chat.
苏维埃社会主义共和国
每个组件都有一个 ssr 领域(也浮出水面) search_components 结果):
safe——永远true:没有@smwb/ui-solid在模块加载或加载时触摸浏览器全局 在渲染过程中renderToString从来没有抛出。rendering- - - - - -"universal"(在服务器上发出有意义的静态HTML并进行组合)或"client"(一个纯粹的覆盖,如Modal/Sheet这将在服务器上不呈现任何内容并进行挂载 通过水合作用后的入口)。note-可选提示,例如,选择器的输入呈现在服务器上,而它的弹出窗口是 仅客户端的。
目录是如何构建的
组件元数据从 @smwb/ui-solid TypeScript prop接口
(npm run build:meta),并装在这个包裹下运送 component-meta/。更少的导入提示
参考 @smwb/ui-styles.