[BUG] Notion OAuth connector fails with "Internal Server Error" on authorization step

Status Fixed / completed
Reported on v2.1.110
Maintainer reply ✓ Yes — localden
Activity 4 comments · opened Apr 16, 2026 · closed May 25, 2026
💡 Likely answer: A maintainer (localden, collaborator) responded on this thread — see the highlighted reply below.

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Bug Description

When trying to connect the Notion MCP connector on claude.ai/settings/connectors,
the OAuth flow fails with an "Internal Server Error" immediately after approving
access on Notion's authorization page (Step 3 of the OAuth flow).

What Should Happen?

Expected Behavior

After approving access on Notion's OAuth page, the connector should be
successfully linked and appear as "Connected" on the settings page.

Error Messages/Logs

## Actual Behavior

"Internal Server Error" is displayed after the OAuth redirect.
The connector is not established.

the link for error message is https://mcp.notion.com/callback?code=03d6a088-ca5d-408b-b202-4b545c8b5476&state=eyJyZXNwb25zZVR5cGUiOiJjb2RlIiwiY2xpZW50SWQiOiJodHRwczovL2NsYXVkZS5haS9vYXV0aC9tY3Atb2F1dGgtY2xpZW50LW1ldGFkYXRhIiwicmVkaXJlY3RVcmkiOiJodHRwczovL2NsYXVkZS5haS9hcGkvbWNwL2F1dGhfY2FsbGJhY2siLCJzY29wZSI6WyJjbGF1ZGVhaSJdLCJzdGF0ZSI6InFRUXVhWGQ5MTVWVWJTVFNLbjBHNUtsNWxLdm1TcTZDYXdxSGRvdE5oX1kiLCJjb2RlQ2hhbGxlbmdlIjoicFJoZ2dMZHNSX3p5YjdDckx4cEpZbUxXamp1VDJxcHN2UGt5ckxwYmdkcyIsImNvZGVDaGFsbGVuZ2VNZXRob2QiOiJTMjU2IiwibWNwX3N0YXRlX2tleSI6Im1jcF82NGI3NTc0ZmJhZTA0MWM2YTRhMGZkYTQxYmMxNWRiNSIsIm1jcF9zdGF0ZV92YWwiOiJkOTYxZmM1MS1kNzY0LTQzN2EtYjBjZi1mOGJjOGM1YjdhNzkiLCJtY3BfdGltZSI6MTc3NjMwMjEzMDQ5MCwicmVzb3VyY2UiOiJodHRwczovL21jcC5ub3Rpb24uY29tL21jcCJ9

Steps to Reproduce

Steps to Reproduce

  1. Go to https://claude.ai/settings/connectors
  2. Click "Connect" on the Notion connector
  3. The Notion OAuth page opens — select workspace and click "Allow access"
  4. Redirected back to claude.ai — "Internal Server Error" is displayed
  5. Connector remains unconnected

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

2.1.110

Claude Code Version

2.1.110

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

Additional Context

  • This issue has persisted for 4–5 days (since approximately April 11, 2026)
  • Tried multiple times, same result every time
  • Notion workspace and account are working normally
  • Notion API token is valid (tested separately, returns HTTP 200)

View original on GitHub ↗

4 Comments

github-actions[bot] · 6 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/48243
  2. https://github.com/anthropics/claude-code/issues/48130

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

0xbrainkid · 6 months ago

Notion OAuth returning "Internal Server Error" immediately after the user approves access on Notion's authorization page is an OAuth callback handling failure — the authorization code returned by Notion after approval is not being successfully exchanged for an access token on Anthropic's backend.

From an agent identity perspective, this is a complete MCP connector identity establishment failure: the OAuth flow exists to bind the user's Notion identity to their Claude.ai session, and the error at the callback step means that binding never completes. The connector shows as not connected, and any agent tool calls to Notion MCP will fail with no identity context.

Diagnostic steps to narrow down the root cause:

1. Verify it is a Notion-specific issue. Try connecting a different OAuth-based MCP connector (Linear, Figma, Slack if available). If other connectors work, the issue is in Notion OAuth handling specifically — possibly the token endpoint URL, the scopes requested, or the callback URL registered with Notion.

2. Check for workspace-specific failure. The "Internal Server Error" may be related to Notion workspace permissions, not the OAuth flow itself. If you have access to multiple Notion workspaces, try authorizing with a different one.

3. The timing matters. "Immediately after approving access" means the failure is in the OAuth callback handler (Step 3: authorization code → access token exchange), not in the Notion authorization page itself. This is server-side on Anthropic's infrastructure — the authorization code is being received but the token exchange is failing.

For recovery while the bug is active: clearing the connector's cached state (disconnect, wait a few minutes, reconnect) sometimes works when the failure is caused by a stale or partially-written auth state rather than a systematic backend error.

localden collaborator · 4 months ago

Thanks for the report. This was a server-side issue on our end: the OAuth client metadata document Notion's authorize step fetches was getting caught by a geo-redirect rule in one Cloudflare region, so Notion received HTML instead of JSON and returned a 500. The rule was corrected on May 21. Please reopen if you still see the Internal Server Error on the Notion authorize step after that.

github-actions[bot] · 2 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.