Conversation
syscall.SysProcAttr{Setpgid} doesn't compile on Windows. Extract
setProcAttr into OS-specific files (Setpgid on Unix, CREATE_NEW_PROCESS_GROUP
on Windows) and use runtime.GOOS to pick a real Android SDK home default on
Windows instead of only darwin/linux paths.
pkill -f is Unix-only and fragile (matches by command line, not the actual child PID). Store the *exec.Cmd from Start() and kill it directly via cmd.Process.Kill(), which is cross-platform stdlib.
os.Getenv("HOME") is unset on Windows (USERPROFILE is used instead), so
default config-file discovery silently no-op'd there. os.UserHomeDir()
resolves the right env var per OS.
New job builds/vets/tests on ubuntu/windows/macos to catch OS-specific compile regressions (e.g. the Setpgid/Windows breakage this branch fixes) going forward. task validate stays ubuntu-only since its golangci-lint and Taskfile vars aren't guaranteed on native Windows runners.
Only the iOS adapter needs macOS (Xcode/xcrun). Android and the agent-device controller already work cross-platform.
Add `mcp-sim service install|uninstall|start|stop|restart|status|run` via github.com/kardianos/service, so a single command registers mcp-sim as a launchd service (macOS), systemd service (Linux), or Windows Service — covering all three OSes the server now runs on. A `--user` flag installs a per-user service (LaunchAgent / systemd --user) that doesn't need root. Extracted the registry/HTTP-server wiring shared by "serve" and the new service program into internal/bootstrap, and rename docs/launchd.md to docs/service.md now that it covers all three platforms.
Homebrew/GitHub Releases are the primary install paths; go install is a source-build fallback, not the recommended default.
Builds docs/ via docmd (task docs-build) and publishes through the actions/upload-pages-artifact + actions/deploy-pages flow, avoiding a branch-commit deploy hack. Refs #29
procattr split (procattr_unix.go/procattr_windows.go) and cross-platform adapters already support Windows; GoReleaser was still darwin/linux-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
syscall.SysProcAttr{Setpgid}inplatforms/androiddoesn't build on Windows. Split into OS-specificprocattr_unix.go/procattr_windows.go, plus portable Android SDK home-dir defaults.controllers/agentdevice: replaced Unix-onlypkill -fwith a trackedcmd.Process.Kill()(cross-platform stdlib).internal/config:os.Getenv("HOME")→os.UserHomeDir()so default config path resolves on Windows too.mcp-sim service install|uninstall|start|stop|restart|status|runsubcommand viakardianos/service— installs mcp-sim as a launchd/systemd/Windows Service, with a--userflag for non-root installs on macOS/Linux.docs/launchd.mdrenamed todocs/service.md.Tracked in #27.
Test plan
go build ./...,go vet ./...,task validateall greenGOOS=windowsandGOOS=linuxmcp-sim serveboots iOS+Android+agentdevice adapters,/healthzreachable, graceful shutdown on signalmcp-sim service install --user/start/status/stop/uninstallfull cycle on macOS — install/uninstall confirmed;launchctl loadruntime start needs an active GUI login session (works from a real Terminal, not from a sandboxed shell)