File tree Expand file tree Collapse file tree 7 files changed +773
-649
lines changed
Expand file tree Collapse file tree 7 files changed +773
-649
lines changed Original file line number Diff line number Diff line change 1+ # GitHub Token (可选,用于获取最新文档)
2+ # 获取方式:https://github.com/settings/tokens
3+ GITHUB_TOKEN = your_github_token_here
4+
5+ # 环境配置
6+ NODE_ENV = production
7+
8+ # 日志级别
9+ LOG_LEVEL = info
10+
11+ # 缓存配置
12+ CACHE_TTL = 3600000
13+
14+ # API 配置
15+ API_TIMEOUT = 30000
Original file line number Diff line number Diff line change 1+ # Varlet MCP 快速开始指南
2+
3+ ## 🚀 5分钟快速上手
4+
5+ ### 第一步:安装依赖
6+
7+ ``` bash
8+ cd varlet-mcp
9+ pnpm install
10+ ```
11+
12+ ### 第二步:构建项目
13+
14+ ``` bash
15+ pnpm run build
16+ ```
17+
18+ ### 第三步:启动服务器
19+
20+ ``` bash
21+ pnpm start
22+ ```
23+
24+ 看到 "Server is ready!" 消息表示启动成功!
25+
26+ ## 🔧 配置 Claude Desktop
27+
28+ ### 1. 找到配置文件
29+
30+ - ** macOS** : ` ~/Library/Application Support/Claude/claude_desktop_config.json `
31+ - ** Windows** : ` %APPDATA%\Claude\claude_desktop_config.json `
32+ - ** Linux** : ` ~/.config/Claude/claude_desktop_config.json `
33+
34+ ### 2. 添加配置
35+
36+ ``` json
37+ {
38+ "mcpServers" : {
39+ "varlet" : {
40+ "command" : " node" ,
41+ "args" : [" /Users/你的用户名/Desktop/varlet-mcp/dist/index.js" ]
42+ }
43+ }
44+ }
45+ ```
46+
47+ ** 重要:** 请将路径替换为你的实际项目路径!
48+
49+ ### 3. 重启 Claude Desktop
50+
51+ 配置完成后,重启 Claude Desktop 应用。
52+
53+ ## ✅ 测试连接
54+
55+ 在 Claude 中输入以下问题测试:
56+
57+ ```
58+ 如何在 Vue 项目中安装 Varlet UI?
59+ ```
60+
61+ ```
62+ Button 组件有哪些属性?
63+ ```
64+
65+ ```
66+ 如何实现暗黑模式?
67+ ```
68+
69+ 如果 Claude 能够回答这些问题并提供详细信息,说明配置成功!
70+
71+ ## 🛠️ 常见问题
72+
73+ ### Q: 服务器启动失败?
74+ ** A:** 检查 Node.js 版本是否 >= 18.0.0
75+
76+ ### Q: Claude 无法连接?
77+ ** A:** 确认配置文件路径正确,JSON 格式无误
78+
79+ ### Q: 构建报错?
80+ ** A:** 运行 ` pnpm run clean && pnpm install && pnpm run build `
81+
82+ ## 📚 更多功能
83+
84+ 查看完整文档:[ USER_GUIDE.md] ( ./USER_GUIDE.md )
85+
86+ ---
87+
88+ ** 🎉 现在你可以开始使用 Varlet MCP 了!**
You can’t perform that action at this time.
0 commit comments