rts-commander / start_mcp_only.py
Luigi's picture
Initial commit: Complete RTS project with MCP evaluation
551ad28
raw
history blame
1.14 kB
#!/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()