Skip to content

feat: cross-platform support (Windows + Linux) #27

Description

@espetro

Make the core server (config, HTTP/MCP layer, Android adapter, agent-device controller) run correctly on Windows and Linux; keep iOS Simulator support macOS-only (inherently requires Xcode); correct docs; add a native cross-platform service manager.

What's included

  • platforms/android — dropped darwin/linux-only build constraint; extracted setProcAttr into procattr_unix.go/procattr_windows.go (Setpgid vs CREATE_NEW_PROCESS_GROUP); portable Android SDK home-dir probing (macOS/Linux/Windows defaults via %LOCALAPPDATA%)
  • controllers/agentdevice — replaced Unix-only pkill -f with cmd.Process.Kill() (cross-platform stdlib)
  • internal/config — replaced raw $HOME env lookup with os.UserHomeDir() for portable default config path
  • .github/workflows/ci.yml — new cross-platform matrix job (ubuntu/windows/macos) running build+vet+test
  • docs/adding-platform.md — updated Setpgid guidance to point at the new procattr pattern
  • README.md / AGENTS.md — corrected wording; only iOS needs macOS, rest of the server runs everywhere
  • New mcp-sim service subcommand (install/uninstall/start/stop/restart/status/run) via github.com/kardianos/service — installs mcp-sim as a native background service (launchd/systemd/Windows Service), including a --user mode for non-root installs on macOS/Linux
  • docs/launchd.mddocs/service.md

Verification

  • go build ./..., go vet ./..., task validate all green
  • Cross-compiled clean for GOOS=windows and GOOS=linux
  • Manual smoke test: mcp-sim serve boots iOS+Android+agentdevice adapters, /healthz reachable, graceful shutdown on signal
  • Manual smoke test: mcp-sim service install --user/start/status/stop/uninstall full cycle on macOS — install/uninstall lifecycle confirmed working; launchctl load for user LaunchAgents needs an active GUI login session (works from a real Terminal session, not from this sandboxed shell)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status
    WIP

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions