Hosted Claude Code: OAuth flow for n8n MCP never completes token handshake
Resolved 💬 3 comments Opened Apr 2, 2026 by davidorban Closed Apr 6, 2026
Description
When using the hosted version of Claude Code (claude.ai/code, not the local CLI), the OAuth authentication flow for an n8n MCP server never completes the round-trip back to the session.
Steps to Reproduce
- Configure an n8n MCP server via claude.ai integration settings
- URL:
https://<instance>.app.n8n.cloud/mcp-server/http - Config location:
claude.ai
- Run
/mcpin Claude Code → select the n8n server → select "Authenticate" - Browser tab opens with the n8n OAuth consent screen
- Complete authentication successfully in the browser (confirmed working)
- Return to Claude Code
Expected Behavior
Claude Code should detect the completed OAuth flow and show the n8n MCP server as authenticated, with its tools available.
Actual Behavior
- Claude Code still shows
Status: ⚠ needs authentication - The
/mcpdialog only offers "Authenticate" or "Disable" — no way to proceed - Calling the
authenticatetool programmatically returns:"Ask the user to run /mcp and select 'claude.ai n8n' to authenticate." - Repeating the flow produces the same result — the token never persists to the session
- Only option is to press Escape to dismiss the dialog
Environment
- Claude Code version: Hosted (claude.ai/code web app)
- MCP server: n8n cloud instance via HTTP transport
- Browser: OAuth completes successfully (confirmed on n8n side)
- OS: macOS
Workaround
Setting up n8n as a local MCP server with direct HTTP transport bypasses the claude.ai OAuth proxy and works.
Notes
This appears to be specific to the hosted version's OAuth callback mechanism — the browser-side auth succeeds but the token is never propagated back to the Claude Code session.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗