{"_id":"@blueking/chat-x-mcp","_rev":"3-9c3e85f7139679c64c13cfa9ed0fa553","name":"@blueking/chat-x-mcp","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@blueking/chat-x-mcp","version":"0.0.1","keywords":["mcp","chat-x","blueking","ai","chat"],"license":"MIT","_id":"@blueking/chat-x-mcp@0.0.1","maintainers":[{"name":"blueking-magicbox","email":"contactus_bk@tencent.com"}],"bin":{"chat-x-mcp":"dist/index.js","bk-chat-x-mcp":"dist/index.js"},"dist":{"shasum":"8972daea72ba5fd00c5c8686058aad357b3e4132","tarball":"https://registry.npmjs.org/@blueking/chat-x-mcp/-/chat-x-mcp-0.0.1.tgz","fileCount":94,"integrity":"sha512-VnSpi/WfVrUs867u7pOYEpEoyYW1g+9iO+mWTZyrmg5BYQgdwUidtXU/UXUmvnnuBi6DnIskh/K2USpvDEUEHQ==","signatures":[{"sig":"MEYCIQC0fdpLHftOddFuQ6kva2COib1wyslQvCONyb9g5au09QIhAP0WMkzVpWnE+bK3ula3NWzHX7HsrcknO7Ff6lP5eZl6","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":320051},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"a6f04c86576c50b4699456695451083cb0d22fbc","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","inspector":"npx @modelcontextprotocol/inspector node dist/index.js","postbuild":"node scripts/copy-docs.js","start:sse":"node dist/index.js --sse --port 3000","start:stdio":"node dist/index.js --stdio","prepublishOnly":"pnpm build"},"_npmUser":{"name":"blueking-magicbox","email":"contactus_bk@tencent.com"},"_npmVersion":"11.7.0","description":"MCP Server for @blueking/chat-x component library","directories":{},"_nodeVersion":"22.20.0","dependencies":{"zod":"^4.3.5","glob":"^13.0.0","express":"^5.1.0","gray-matter":"^4.0.3","@modelcontextprotocol/sdk":"^1.25.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.5.0","@types/node":"^22.0.0","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/chat-x-mcp_0.0.1_1769003768243_0.3530948342404152","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@blueking/chat-x-mcp","version":"0.0.2","keywords":["mcp","chat-x","blueking","ai","chat"],"license":"MIT","_id":"@blueking/chat-x-mcp@0.0.2","maintainers":[{"name":"blueking-magicbox","email":"contactus_bk@tencent.com"}],"bin":{"chat-x-mcp":"dist/index.js","bk-chat-x-mcp":"dist/index.js"},"dist":{"shasum":"0ffc5301ea1f2ebc9cdff5bb16b1fb97a8bb2cfd","tarball":"https://registry.npmjs.org/@blueking/chat-x-mcp/-/chat-x-mcp-0.0.2.tgz","fileCount":94,"integrity":"sha512-LYCb03ZUlBJkbmtfclip/lz8f0BGPesuBLQmYoM7KSUaBJ2wdXeOAOwIqVc1ZvD1aXYYSsteLzm7dTLbNjau/g==","signatures":[{"sig":"MEUCIQDEJlaMhK1LbEmUVLhPZsJW/lWOEbua0SZciQ+sUJyY0gIgXKExuURvvYEBju3ItM8Pg78kRnGX8k8oOr8WBvYW6b0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":318148},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"a6f04c86576c50b4699456695451083cb0d22fbc","scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js","inspector":"npx @modelcontextprotocol/inspector node dist/index.js","postbuild":"node scripts/copy-docs.js","start:sse":"node dist/index.js --sse --port 3000","start:stdio":"node dist/index.js --stdio","prepublishOnly":"pnpm build"},"_npmUser":{"name":"blueking-magicbox","email":"contactus_bk@tencent.com"},"_npmVersion":"11.7.0","description":"MCP Server for @blueking/chat-x component library","directories":{},"_nodeVersion":"22.20.0","dependencies":{"zod":"^4.3.5","glob":"^13.0.0","express":"^5.1.0","gray-matter":"^4.0.3","@modelcontextprotocol/sdk":"^1.25.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.5.0","@types/node":"^22.0.0","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/chat-x-mcp_0.0.2_1769004691358_0.6160249866881449","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@blueking/chat-x-mcp","version":"0.0.3","description":"MCP Server for @blueking/chat-x component library","type":"module","main":"dist/index.js","bin":{"chat-x-mcp":"dist/index.js","bk-chat-x-mcp":"dist/index.js"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build":"tsc","postbuild":"node scripts/copy-docs.js","dev":"tsc --watch","start":"node dist/index.js","start:stdio":"node dist/index.js --stdio","start:sse":"node dist/index.js --sse --port 3000","inspector":"npx @modelcontextprotocol/inspector node dist/index.js","prepublishOnly":"pnpm build"},"dependencies":{"@modelcontextprotocol/sdk":"^1.25.0","express":"^5.1.0","glob":"^13.0.0","gray-matter":"^4.0.3","zod":"^4.3.5"},"devDependencies":{"@types/express":"^5.0.0","@types/node":"^22.0.0","typescript":"^5.5.0"},"engines":{"node":">=18.0.0"},"keywords":["mcp","chat-x","blueking","ai","chat"],"license":"MIT","gitHead":"5f8c66a71b18a42cdaabc20dcd5c3040c5a97d92","types":"./dist/index.d.ts","_id":"@blueking/chat-x-mcp@0.0.3","_nodeVersion":"22.20.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-GZYEbToVEMAxVIhIM7anRBeuMprJU7ZAOD/FmfnCEO+iif/LBOt7yMTYIZwX+5dCOLXwSL4icJxjTTCWx734fQ==","shasum":"a5ff8f5a8375368d7338226f77d1882729c71846","tarball":"https://registry.npmjs.org/@blueking/chat-x-mcp/-/chat-x-mcp-0.0.3.tgz","fileCount":94,"unpackedSize":324131,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDE3XSoJ7B5LGR6fAxeQXGBsqW30/M5oPA6xjKuBIH7wAIgLD1PCrlV1xt5mHtk7dJwDI6quB2KWrurmTrj0U2K7dE="}]},"_npmUser":{"name":"blueking-magicbox","email":"contactus_bk@tencent.com"},"directories":{},"maintainers":[{"name":"blueking-magicbox","email":"contactus_bk@tencent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/chat-x-mcp_0.0.3_1769066587270_0.2804948270328076"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-21T13:56:08.145Z","modified":"2026-01-22T07:23:07.548Z","0.0.1":"2026-01-21T13:56:08.373Z","0.0.2":"2026-01-21T14:11:31.530Z","0.0.3":"2026-01-22T07:23:07.412Z"},"license":"MIT","keywords":["mcp","chat-x","blueking","ai","chat"],"description":"MCP Server for @blueking/chat-x component library","maintainers":[{"name":"blueking-magicbox","email":"contactus_bk@tencent.com"}],"readme":"# @blueking/chat-x-mcp\n\n`@blueking/chat-x` 组件库的 MCP (Model Context Protocol) 服务器，提供智能开发辅助功能。\n\n## 特性\n\n- 📚 **文档查询** - 快速获取组件 API 文档、类型定义\n- 🔧 **代码生成** - 自动生成组件使用示例、聊天页面模板\n- 🔍 **代码分析** - 分析组件结构、Props、Events、Slots\n- 🌐 **多传输支持** - 支持 Stdio 和 SSE 两种传输模式\n\n## 安装\n\n### 方式一：npx 直接运行（推荐）\n\n无需安装，直接运行：\n\n```bash\n# Stdio 模式\nnpx @blueking/chat-x-mcp --stdio\n\n# SSE 模式\nnpx @blueking/chat-x-mcp --sse --port 3000\n```\n\n### 方式二：本地开发\n\n```bash\n# 进入 mcp 包目录\ncd packages/mcp\n\n# 安装依赖\npnpm install\n\n# 构建\npnpm build\n\n# 运行\nnode dist/index.js --stdio\n```\n\n## 使用方式\n\n### Stdio 模式（推荐）\n\n适用于 Claude Desktop、Cursor 等客户端：\n\n```bash\n# npx 方式\nnpx @blueking/chat-x-mcp --stdio\n\n# 本地开发\nnode dist/index.js --stdio\n```\n\n### SSE 模式\n\n适用于 Web 应用集成：\n\n```bash\n# npx 方式\nnpx @blueking/chat-x-mcp --sse --port 3000\n\n# 本地开发\nnode dist/index.js --sse --port 3000\n```\n\n### 环境变量\n\n支持通过环境变量配置，命令行参数优先级更高：\n\n| 环境变量   | 说明           | 默认值    |\n| ---------- | -------------- | --------- |\n| `MCP_MODE` | 传输模式       | `stdio`   |\n| `MCP_PORT` | SSE 模式端口号 | `3000`    |\n| `MCP_HOST` | SSE 模式主机   | `0.0.0.0` |\n\n```bash\n# 使用环境变量启动\nMCP_MODE=sse MCP_PORT=8080 npx @blueking/chat-x-mcp\n```\n\n## 配置客户端\n\n### Claude Desktop\n\n在 `claude_desktop_config.json` 中添加：\n\n```json\n{\n  \"mcpServers\": {\n    \"chat-x\": {\n      \"command\": \"npx\",\n      \"args\": [\"@blueking/chat-x-mcp\", \"--stdio\"]\n    }\n  }\n}\n```\n\n### Cursor\n\n在项目根目录的 `.cursor/mcp.json` 中添加：\n\n```json\n{\n  \"mcpServers\": {\n    \"chat-x\": {\n      \"command\": \"npx\",\n      \"args\": [\"@blueking/chat-x-mcp\", \"--stdio\"]\n    }\n  }\n}\n```\n\n## 可用功能\n\n### Tools (工具)\n\n#### 文档查询类\n\n| 工具名                | 说明                            |\n| --------------------- | ------------------------------- |\n| `get_composable_doc`  | 获取 Composable 文档            |\n| `get_type_definition` | 获取类型定义                    |\n| `search_docs`         | 搜索文档                        |\n| `get_ag_ui_types`     | 获取 AG-UI Message/Content 类型 |\n\n#### 代码生成类\n\n| 工具名                     | 说明               |\n| -------------------------- | ------------------ |\n| `generate_component_usage` | 生成组件使用示例   |\n| `generate_message_list`    | 生成消息列表代码   |\n| `generate_chat_page`       | 生成聊天页面模板   |\n| `generate_custom_message`  | 生成自定义消息类型 |\n\n#### 代码分析类\n\n| 工具名              | 说明         |\n| ------------------- | ------------ |\n| `analyze_component` | 分析组件结构 |\n| `list_components`   | 列出所有组件 |\n\n## 开发调试\n\n使用 MCP Inspector 进行调试：\n\n```bash\nnpx @modelcontextprotocol/inspector node dist/index.js\n```\n\n## 示例对话\n\n### 生成聊天页面\n\n```\n用户: 帮我生成一个带流式消息和工具调用的聊天页面\n\nAI: [调用 generate_chat_page 工具]\n生成包含 streaming 和 tool_calls 功能的完整 Vue 组件代码...\n```\n\n### 搜索文档\n\n```\n用户: 搜索关于 Markdown 的文档\n\nAI: [调用 search_docs 工具]\n返回所有包含 Markdown 关键词的文档片段...\n```\n\n## 目录结构\n\n```\npackages/mcp/\n├── src/\n│   ├── index.ts              # 主入口\n│   ├── server.ts             # MCP Server 实现\n│   ├── tools/                # 工具模块\n│   │   ├── index.ts\n│   │   ├── docs-tools.ts     # 文档查询工具\n│   │   ├── generate-tools.ts # 代码生成工具\n│   │   └── analyze-tools.ts  # 代码分析工具\n│   ├── transports/           # 传输层\n│   │   ├── index.ts\n│   │   └── sse.ts\n│   └── utils/                # 工具函数\n│       ├── index.ts\n│       ├── file-reader.ts\n│       └── markdown-parser.ts\n├── package.json\n├── tsconfig.json\n└── README.md\n```\n\n## 依赖\n\n- `@modelcontextprotocol/sdk` - MCP SDK\n- `express` - SSE 服务器\n- `glob` - 文件搜索\n- `gray-matter` - Markdown 解析\n- `zod` - 类型验证\n\n## 许可证\n\nMIT License\n","readmeFilename":"README.md"}