Skip to content

Unable to run MCP daemon on Windows platform #8

@CLASSLU

Description

@CLASSLU

Description

When trying to run the MCP daemon on a Windows system, I'm getting the following error:
base) PS C:\Users\ylnew> y-cli daemon start
Starting MCP daemon in background
Socket: C:\Users\ylnew/.local/share/y-cli\mcp_daemon.sock
Log file: C:\Users\ylnew/.local/share/y-cli/logs\mcp_daemon.log
MCP daemon started with PID 21852
(base) PS C:\Users\ylnew> y-cli daemon status
MCP daemon is not running
2025-04-15 02:20:13.404 | ERROR | mcp_daemon.server:start_server:124 - Error starting server: module 'asyncio' has no attribute 'start_unix_server'

Problem Analysis

The error occurs because the daemon server in src/mcp_daemon/server.py is using asyncio.start_unix_server(), which is only available on Unix-like operating systems (Linux, macOS) and not on Windows.

The specific problematic code is:

# Start server
self.server = await asyncio.start_unix_server(
    self.handle_client, 
    self.socket_path
)

Additional Notes

  • There is no platform detection or alternative implementation for Windows in the server code
  • Unix-specific functions like os.unlink() and os.chmod() are used directly
  • The error consistently appears in the daemon logs when attempting to start the service

Environment

  • OS: Windows 11
  • Python version 3.12.9

Question

Is Windows support planned or should be implemented? If it is supposed to be supported, could you provide guidance on how to run it properly on Windows?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions