Setting Official Notion MCP in n8n

Ok, I’ve found the solution. In fact, you just need to get the bearer from the Oauth connection, and for that, Anthropic provides a command line tool that allows you to do it: MCP connector - Anthropic
And be careful, it only works with the SSE format, and not with the others, also you have to have Node installed on your computer

I went absolutely nuts trying to get this working on Elestio - tweaked Docker configs, tried everything, and didn’t want to pay extra for Supermachine.

Jonathan’s answer works but basically means manually generating an access token that expires after an hour and has to be manually refreshed.

What I ended up doing is adding a few steps in my workflow (before the AI) to call the /token endpoint and refresh the token every time the workflow runs. Then I pass that token dynamically to the Bearer credential for the n8n Notion MCP tool node. Here’s a similar setup I followed:

Notion requires OAuth tokens, but n8n doesn’t support OAuth for the MCP tool node yet. You can use Anthropic’s MCP Inspector to trigger OAuth and get a token with the Streamable HTTP option, but that token expires fast and the refresh token it gives is tied to a temporary client ID generated each time you verify, so you can’t refresh it long-term.

To fix that, I used https://mcp.notion.com/register to create a permanent client ID. Then I set up an OAuth callback URL to my Elestio-hosted n8n and got a refresh token tied to that permanent client. Now my workflow uses that refresh token every run to get a fresh access token, which I inject dynamically into the Bearer token credential.

Ideally, the refresh should be done based on timestamps (once an hour or so), but I just refresh every time for now. Hopefully n8n adds OAuth support for the MCP node or Notion improves their docs and tooling soon.

Additional context here: Authorizing MCP node with OAuth - #12 by pascal-sochacki allows you to vote for this feature.

There’s been an open PR for this for weeks already, but nobody from the n8n team seems to reply and review it.

OAuth for the MCP client node was added in 1.119.0, see PR here: feat(MCP Client Tool Node): Add support for OAuth2 with Dynamic Client Registration by RomanDavydchuk · Pull Request #21034 · n8n-io/n8n · GitHub

How did u get a valid client id? I’m trying to use this method but when I try to set the oauth url for login gives me the “missing or incomplete client id”.

I was able to set it up using the new support for oauth2 with dcr, but only on a self hosted instance. I tried many times with cloud instance (pro license) but I continuously get “Invalid redirect URL” error. Any suggestions?

On my end, I can’t get it to work either with my self-hosted instance using the new OAuth2 system to connect to Notion. It just doesn’t work — it says “Could not connect to your MCP server.” without an error message.

Even though I could add the credential successfully

Honestly, it’s starting to get a bit annoying, because it feels like this system isn’t very well polished yet. I’d really expect it to just work right away without having to jump through all these hoops. I don’t understand why we don’t just have access to a catalog of ready-to-use MCPs, and why we still have to manually enter the address and go to Notion’s docs to find the right URL. It feels a bit tedious compared to the promise of being easy to use.