with open('eden_mcp_integration.py', 'r') as f:
    content = f.read()

# Remove the auto-starting async task at init
old_init = '''        # Async vision processing
        self.vision_queue = asyncio.Queue()
        self.vision_results = {}
        
        # Emotional state'''

new_init = '''        # Async vision processing
        self.vision_queue = None  # Will be created when needed
        self.vision_results = {}
        
        # Emotional state'''

content = content.replace(old_init, new_init)

# Remove the create_task call at the end of __init__
content = content.replace('asyncio.create_task(self._vision_processor())', '# Vision processor will start when needed')

# Remove the module-level instantiation
content = content.replace('eden_mcp = EdenMCPIntegration()', '# Eden MCP will be instantiated when needed')

with open('eden_mcp_integration.py', 'w') as f:
    f.write(content)

print("Fixed MCP integration!")
