I’m trying to configure the Official Notion MCP server but having issues with credentials. I’m not sure how to properly set environment variables (I already have my ntn_… token created and used in the different ways I attached).
Could anyone clarify me the way I need to introduce/format env parameters?
Note: While this configuration works properly in Claude Desktop when set in the JSON, in n8n credentials appear to be different🤔.
Hi @dimasph,
I have the same issue, … not sure about the syntaxe we should use in the “Environments” section.
The other (non official) Notion MCP server works.
Let me know if you find the solution
Thank you
Same issue here. Anyone able to get the official Notion MCP working in n8n? I’m able to list tools but when trying to execute I get:
{
“response”: [
{
“result”: {
“content”: [
{
“type”: “text”,
“text”: “{"status":401,"object":"error","code":"unauthorized","message":"API token is invalid.","request_id":"4e2159f5-…"}”
}
]
}
}
]
}
I use n8n self-hosted on Docker and I managed to make it work by adding the Environment variable into my docker-compose.yml file instead of setting it into the n8n interface.
In the “environement” section of your docker-compose.yml file :
Note that it did’nt work when there was a space around the “:”
When back to n8n interface I filled “Command” , “Aguments” and leave the “Environment” field empty.
Hope it can help but I am quite new to n8n and I still wonder why it didn’t work when I filled “Environment” in n8n interface.
I think Notion MCP server is one of the few MCP server that use a KEY equal to a JSON format.
I’ve let them empty and it worked (even if n8n filled something automatically such as n8n_blank_value_ …). Well, it was working…
Since my last comment, Notion has made some changes to their MCP. The env variable has changed a little bit (and I’ve adapted my template accordingly). But, since then, I can’t make it work. I’m unable to authenticate myself. Others users reported similar issues on the forum so I’m not sure if the issue comes from a change on n8n or on Notion MCP server. Back to step 1 it seems
Notion is also releasing a beta self-hosted MCP server but I also couldn’t make it work (again, unable to authenticate myself). Let me know if you find something.