opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat(mcp): add oauth callbackHost config

Open chrisolszewski opened this issue 20 hours ago • 3 comments

Adds mcp.<name>.oauth.callbackHost to control the bind address for the OAuth callback server. This helps in WSL2, Docker, and devcontainers where the host browser can’t reach the callback listener.

Default behavior is unchanged when unset. When set, we pass hostname to Bun.serve() and restart the callback server if the host changes.

Also escapes the callback error page output and documents the troubleshooting step in the MCP server docs.

Testing:

  • bun run typecheck
  • bun test test/mcp/oauth-callback.test.ts
  • bun test test/config/config.test.ts

Fixes #9081

chrisolszewski avatar Jan 17 '26 12:01 chrisolszewski