2
0

start_mcp_server.sh 489 B

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