Browse Source

feat: MCP 服务器改用 Watch 模式支持热更新

- 更新安装脚本使用 pnpm run dev 替代 node dist/index.js
- 使用 tsx watch 实现代码修改后自动重新加载
- 更新技能文档说明 Watch 模式功能

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
yourname 3 weeks ago
parent
commit
9f988852ef

+ 4 - 3
.claude/skills/install-admin-mcp/SKILL.md

@@ -69,14 +69,15 @@ bash .claude/skills/install-admin-mcp/scripts/install.sh
 
 ## 手动操作
 
-### 启动服务器
+### 启动服务器 (Watch 模式 - 热更新)
 
 ```bash
 cd packages/admin-mcp-server
-pnpm run build
-nohup node dist/index.js > /tmp/admin-mcp-server.log 2>&1 &
+nohup pnpm run dev > /tmp/admin-mcp-server.log 2>&1 &
 ```
 
+> **Watch 模式**: 代码修改后自动重新加载,无需手动重启!
+
 ### 停止服务器
 
 ```bash

+ 3 - 3
.claude/skills/install-admin-mcp/scripts/install.sh

@@ -48,11 +48,11 @@ else
     echo "✓ 端口 3000 未被占用"
 fi
 
-# 5. 启动 MCP 服务器
+# 5. 启动 MCP 服务器 (Watch 模式 - 热更新)
 echo ""
-echo "[5/6] 启动 MCP 服务器..."
+echo "[5/6] 启动 MCP 服务器 (Watch 模式 - 热更新)..."
 cd "$MCP_SERVER_DIR"
-nohup node dist/index.js > "$LOG_FILE" 2>&1 &
+nohup pnpm run dev > "$LOG_FILE" 2>&1 &
 echo $! > "$PID_FILE"
 
 # 等待服务启动并验证健康检查