MCP OAuth callback now redirects to localhost rather than 127.0.0.1#
MCP OAuth logins now send you back via localhost, so servers only allowing the IP form will reject you.
What's wrong with this entry?
When Claude Code logs in to an MCP server over OAuth, the default address it hands the server to send you back to is now http://localhost:<port>/callback instead of http://127.0.0.1:<port>/callback. If a server has the old IP form registered as its only allowed redirect, that login will now be rejected until the localhost form is added.
- The port is taken from the server's
oauth.callbackPortsetting, falling back to Claude Code's own MCP OAuth callback port. - Configuring an explicit
redirectUrifor a server still overrides this entirely, and that path logs "(no localhost listener)" since Claude Code is not the one receiving the redirect. - This aligns the default with two other places in the same code that already built the localhost form, so all three now agree.
/callback
Strings lifted out of the shipped bundle, so the claim above can be checked against them.