File size: 1,140 Bytes
551ad28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
44
45
#!/usr/bin/env python3
"""
Start script for just the MCP server (for testing)
"""

import asyncio
import sys
import os

# Add the web directory to the path
sys.path.insert(0, os.path.dirname(__file__))

def main():
    """Main entry point."""
    print("Starting MCP server only...")
    print("=" * 40)
    print()
    
    try:
        # Import and start the MCP server
        from mcp_server import RTSGameMCP
        print("โœ… MCP server module imported successfully")
        
        # Create an instance
        server = RTSGameMCP()
        print(f"โœ… MCP server created: {server.mcp.name}")
        print(f"   Host: {server.mcp.settings.host}")
        print(f"   Port: {server.mcp.settings.port}")
        print()
        
        print("๐Ÿš€ Starting MCP server...")
        print("Press Ctrl+C to stop the server")
        print()
        
        # Start the server
        asyncio.run(server.run())
        
    except KeyboardInterrupt:
        print("\n\n๐Ÿ‘‹ MCP server stopped.")
    except Exception as e:
        print(f"โŒ Failed to start MCP server: {e}")
        sys.exit(1)

if __name__ == "__main__":
    main()