-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstart-server.sh
More file actions
executable file
·43 lines (37 loc) · 1.16 KB
/
Copy pathstart-server.sh
File metadata and controls
executable file
·43 lines (37 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# GSAP MCP 服务器启动脚本
# 用于快速启动和测试MCP服务器
echo "🚀 启动 GSAP MCP 服务器..."
echo "======================================"
# 检查Node.js是否安装
if ! command -v node &> /dev/null; then
echo "❌ 错误: Node.js 未安装"
echo "请先安装 Node.js: https://nodejs.org/"
exit 1
fi
# 检查依赖是否安装
if [ ! -d "node_modules" ]; then
echo "📦 安装依赖..."
npm install
fi
# 启动服务器
echo "🎯 启动 MCP 服务器..."
echo "服务器路径: $(pwd)/src/index.js"
echo "配置文件: $(pwd)/mcp-config.json"
echo ""
echo "💡 使用说明:"
echo "1. 将 mcp-config.json 中的配置添加到 Claude Desktop 配置中"
echo "2. 重启 Claude Desktop"
echo "3. 在对话中使用自然语言描述动画需求"
echo ""
echo "📚 示例命令:"
echo "- '创建一个按钮悬停放大的动画'"
echo "- '生成一个从左侧滑入的时间轴动画'"
echo "- '优化这段GSAP代码的性能'"
echo ""
echo "🌐 查看演示页面: file://$(pwd)/example.html"
echo ""
echo "按 Ctrl+C 停止服务器"
echo "======================================"
# 启动服务器
node src/index.js