| 12345678910111213141516171819 |
- #!/bin/bash
- # 启动 Novel Translator MCP 服务器
- cd /mnt/code/223-236-template-6
- # 停止旧的 MCP 服务器
- pkill -f 'server_http' 2>/dev/null
- pkill -f 'mcp_server' 2>/dev/null
- sleep 2
- # 设置端口号(默认 8081,因为 8080 可能被占用)
- export MCP_PORT=${MCP_PORT:-8081}
- # 启动 MCP 服务器
- echo "Starting MCP Server on port $MCP_PORT..."
- nohup python3 src/mcp_server/server_http.py > mcp.log 2>&1 &
- sleep 3
- echo "MCP Server started. Check logs: tail -f mcp.log"
|