import argparse
import asyncio
import logging
import sys
import os
# Configure logging
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger('mcp_remote_macos_use')
# Add src directory to path to allow importing action_handlers and vnc_client
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
def main():
"""Entry point for the MCP Remote MacOS Use server."""
logger.debug("Starting mcp_remote_macos_use main()")
parser = argparse.ArgumentParser(description='VNC MCP Server')
args = parser.parse_args()
# Import server module at runtime
from .server import main as server_main
# Run the async main function
logger.debug("About to run server.main()")
asyncio.run(server_main())
logger.debug("Server main() completed")
if __name__ == "__main__":
main()
# Expose important items at package level
__all__ = ["main"]