Bug: Magnific MCP OAuth flow fails — session state lost between authenticate and complete_authentication
Description
When using the Magnific MCP server (https://mcp.magnific.com/) via HTTP transport in Claude Code desktop app, the OAuth flow consistently fails with:
"No OAuth flow is in progress for magnific. Call mcp__magnific__authenticate first, then retry with the callback URL."
This happens even though authenticate was just called successfully moments before.
Steps to Reproduce
- Add the server:
claude mcp add --transport http magnific https://mcp.magnific.com/ - Call
mcp__magnific__authenticate→ receive auth URL - Open the URL in the browser, complete OAuth login
- Copy the callback URL (
http://localhost:<port>/callback?code=...&state=...) from the browser address bar - Call
mcp__magnific__complete_authenticationwith the callback URL
Expected Behavior
Authentication completes successfully and Magnific tools become available.
Actual Behavior
complete_authentication returns: "No OAuth flow is in progress for magnific."
Root Cause (suspected)
The MCP connection drops and reconnects between step 2 and step 5 (visible in the session as repeated "MCP server disconnected / reconnected" events). On reconnection, the OAuth session state is reset, so complete_authentication finds no active flow.
Tried 3+ times — same result every time. The issue appears to be a race condition between the MCP server's session lifecycle and the OAuth flow duration (the user needs a few seconds to log in and copy the callback URL).
Environment
- Claude Code v0.2.1
- macOS 15 (Mac Mini M4 Pro)
- Transport: HTTP (
--transport http) - MCP server:
https://mcp.magnific.com/
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗