Skip to content

fix: handle EPERM as port-in-use for proxy mode on macOS#34

Merged
yepzdk merged 1 commit into
mainfrom
feature/fix-eperm-proxy-mode
Apr 21, 2026
Merged

fix: handle EPERM as port-in-use for proxy mode on macOS#34
yepzdk merged 1 commit into
mainfrom
feature/fix-eperm-proxy-mode

Conversation

@yepzdk
Copy link
Copy Markdown
Collaborator

@yepzdk yepzdk commented Apr 21, 2026

Summary

  • On macOS, the system can return EPERM instead of EADDRINUSE when a port is already bound by another process
  • The server only recognized EADDRINUSE, so EPERM caused it to skip the health check and proxy mode logic entirely
  • This left the MCP session unregistered and non-functional when another instance was already running (e.g. the marketplace version alongside a local dev server)

Test plan

  • Start one MCP server instance (binds port 9877)
  • Start a second instance — verify it enters proxy mode instead of failing
  • Verify MCP tools work in the proxied instance

🤖 Generated with Claude Code

macOS can return EPERM instead of EADDRINUSE when a port is already
bound. The server only recognized EADDRINUSE, so EPERM caused it to
skip the health check and proxy mode logic, leaving the MCP session
unregistered and non-functional.

Co-authored-by: Claude <noreply@anthropic.com>
@yepzdk yepzdk merged commit 87a2b0c into main Apr 21, 2026
1 check passed
@yepzdk yepzdk deleted the feature/fix-eperm-proxy-mode branch April 21, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant