"""Wrapper to start MCP server with correct environment"""
import sys
import os

# Force correct working directory
os.chdir(r'C:\ProgramData\Ableton\Live 12 Suite\Resources\MIDI Remote Scripts\AbletonMCP_AI\MCP_Server')

# Set up Python path for imports
sys.path.insert(0, r'C:\ProgramData\Ableton\Live 12 Suite\Resources\MIDI Remote Scripts\AbletonMCP_AI\MCP_Server')
sys.path.insert(0, r'C:\ProgramData\Ableton\Live 12 Suite\Resources\MIDI Remote Scripts\AbletonMCP_AI')

# Now import and run server
import importlib.util
spec = importlib.util.spec_from_file_location("server", "server.py")
server = importlib.util.module_from_spec(spec)
spec.loader.exec_module(server)
