yq-charts-mcp
v1.0.3
Published
MCP Server for reading yq-charts component library documentation
Maintainers
Readme
yq-charts MCP Server
用于读取 yq-charts 组件库文档的 MCP (Model Context Protocol) 服务器。
安装
方式一:全局安装(推荐)
npm install -g yq-charts-mcp方式二:使用 npx(无需安装)
直接在配置中使用 npx 运行。
配置 AI 助手
Claude Code
编辑 .claude.json:
全局安装后:
{
"mcpServers": {
"yq-charts": {
"command": "yq-charts-mcp"
}
}
}使用 npx:
{
"mcpServers": {
"yq-charts": {
"command": "npx",
"args": ["yq-charts-mcp"]
}
}
}Gemini Code Assist
编辑 ~/.gemini/settings.json:
全局安装后:
{
"mcpServers": {
"yq-charts": {
"command": "yq-charts-mcp"
}
}
}使用 npx:
{
"mcpServers": {
"yq-charts": {
"command": "npx",
"args": ["yq-charts-mcp"]
}
}
}功能
工具 (Tools)
| 工具名 | 说明 | 参数 |
|--------|------|------|
| list_docs | 列出所有文档文件 | 无 |
| read_doc | 读取指定文档内容 | path: 文档路径 |
| search_docs | 搜索文档内容 | query: 搜索关键词 |
| get_component_api | 获取组件 API 文档 | component: 组件名, version: vue2/vue3 |
| list_components | 列出所有组件 | version: vue2/vue3 |
资源 (Resources)
所有 Markdown 文档都作为资源暴露,URI 格式: yq-charts://docs/{path}
使用示例
配置完成后,AI 助手可以:
列出所有组件
请列出 yq-charts 的所有组件获取组件用法
请告诉我 BarChart 组件的用法搜索文档
搜索文档中关于 "堆叠" 的内容
本地开发
# 安装依赖
npm install
# 开发模式
npm run dev
# 构建
npm run build
# 启动
npm startLicense
MIT
