[BUG] Can't Authenticate With Notion MCP

Status Fixed / completed
Reported on v2.1.119
Maintainer reply ✓ Yes — localden
Activity 12 comments · opened Apr 24, 2026 · closed May 6, 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?

I start by running claude and doing /mcp. I think click on notion and click Authenticate. I get to the first Notion page for granting permissions, check the box for redirecting to localhost, and click continue. The browser goes to a new page that just says the redirect_uri is Invalid. In CC in the terminal, it has a message about, if there's a redirect error, to copy the URL and paste it there, so I copy the entire URL out of the URL bar on the page that says Invalid redirect_uri. When I paste that in CC, it goes back to the main Notion MCP page with the option to Authenticate or Disable, except above the options it says OAuth state mismatch - possible CSRF attack. Note that I also tried copying the redirect_uri query parameter, which is itself a whole URL pointing to localhost and opening it in a separate browser window. When I do that, it simply hangs and never does anything.

I've already confirmed that I'm using the correct Notion and Claude accounts...it's the same account for Claude in the browser and the terminal, updated Chrome, restarted CC, and cleared site data for notion.com and notion.so. I also tried it in an incognito window where I was not logged into Claude at all.

What Should Happen?

CC should authenticate with Notion MCP and be able to use it.

Error Messages/Logs

Steps to Reproduce

  1. Run claude
  2. Give prompt /mcp
  3. Select Authenticate
  4. In the browser tab that opens, select the checkbox to allow redirect and click continue
  5. See that it shows the Invalid redirect_uri page
  6. Copy the URL from the URL bar and paste it in CC in the terminal
  7. See that it goes back to the main Notion MCP Server page with the message OAuth state mismatch - possible CSRF attack

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.119

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

12 Comments

johnhampton · 4 months ago

I'm having the same problem.

ryo-8316-gt · 4 months ago

Confirming this happens on Windows 11 as well, with Claude Code v2.1.119.

Same symptoms:

  • "Invalid redirect_uri" error after granting permission in browser
  • "OAuth state mismatch - possible CSRF attack" when pasting the URL back

The root cause appears to match #37747 (CIMD redirect_uris missing port). Verified by inspecting the published documents:

Claude Code's CIMD at https://claude.ai/oauth/claude-code-client-metadata declares:
"redirect_uris": ["http://localhost/callback", "http://127.0.0.1/callback"] — port-less

But runtime actually listens on http://localhost:<port>/callback (e.g. 8081 when using --callback-port 8081).

Notion's OAuth server metadata at https://mcp.notion.com/.well-known/oauth-authorization-server declares "client_id_metadata_document_supported": true, so it uses CIMD and correctly rejects the port-mismatched URI per spec.

So this isn't macOS/Windows specific — it's a protocol-level CIMD configuration issue that should affect any CIMD-supporting provider (Slack, Granola, Notion, etc.).

naturalkrish · 4 months ago

Same

Jhhames · 4 months ago

experiencing the same thing

melhossaryk · 4 months ago

Did anyone find a workaround for this issue with Notion MCP? Notion MCP can no longer authenticate.
Any ETA to fix this?
We can downgrade the Claude Code version to 2.1.79 but we will lose A LOT of fixes

yurukusa · 4 months ago

/tmp/issue-response-52922.md

localden collaborator · 4 months ago

Hi folks - we are actively investigating this 🕐

localden collaborator · 4 months ago

<img width="240" alt="Image" src="https://github.com/user-attachments/assets/5fcdcd02-474c-46f0-bcf6-ae51ef1acad6" />

After consenting for Notion access, I can confirm that I could authenticate and Notion MCP is connected to Claude Code. There was a temporary hiccup with the Notion MCP AS earlier last week but that should be mitigated.

@t-rad679 @johnhampton @ryo-8316-gt can you please verify whether this is still occurring?

Jhhames · 4 months ago

Hi @localden its working again for me now

ryo-8316-gt · 4 months ago

@localden Thanks so much for the quick mitigation, really appreciate it!

Verified on my end as well — Notion MCP authentication is now working again on Windows 11 with Claude Code v2.1.119. The notion-work server (configured with --callback-port 8081) reconnected successfully after running /mcp → notion-work → Authenticate, without any config changes needed.

Thanks again to you and the team for the fast turnaround.

t-rad679 · 4 months ago

@localden Confirmed fixed!

Thank you all so much. That speed was incredible!

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.