-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathrun_server.py
29 lines (24 loc) · 871 Bytes
/
run_server.py
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
#!/usr/bin/env python
"""
Run script for the Sequential Thinking MCP server.
This script makes it easy to run the server directly from the root directory.
"""
import os
import sys
# Set environment variables for proper encoding
os.environ['PYTHONIOENCODING'] = 'utf-8'
os.environ['PYTHONUNBUFFERED'] = '1'
# Ensure stdout is clean before importing any modules
sys.stdout.flush()
# Import and run the server
from mcp_sequential_thinking.server import main
from mcp_sequential_thinking.logging_conf import configure_logging
# Configure logging for this script
logger = configure_logging("sequential-thinking.runner")
if __name__ == "__main__":
try:
logger.info("Starting Sequential Thinking MCP server from runner script")
main()
except Exception as e:
logger.error(f"Fatal error in MCP server: {e}", exc_info=True)
sys.exit(1)