Notion MCP server fails in Cursor with "Error in MCP: Client closed"
I'm trying to set up the official Notion MCP server in Cursor 0.48.9 on macOS (arm64) following the README, but both the
npxand Docker options fail immediately withError in MCP: Client closedandConnection closed. Is there a working configuration?Originally asked on GitHub: https://github.com/makenotion/notion-mcp-server/issues/20
4 answers
The GitHub issue is still open, but a contributor posted a working Docker configuration in the thread. The README-style setups — both
npx -y @notionhq/notion-mcp-serverand passing the JSON env value inline in thedocker runcommand — fail in Cursor 0.48.9 on macOS withError in MCP: Client closed/Connection closed.The configuration that worked for the contributor uses the
mcp/notionDocker image, passes the env variable name as a separate-eargument, and puts the actual JSON in Cursor'senvblock:json"notionApi": { "command": "docker", "args": [ "run", "--rm", "-i", "-e", "OPENAPI_MCP_HEADERS", "mcp/notion" ], "env": { "OPENAPI_MCP_HEADERS": "{\"Authorization\":\"Bearer your_token_here\",\"Notion-Version\":\"2022-06-28\"}" } }Key difference from the README: don't inline the JSON as part of the
-evalue insideargs; let Cursor inject it via theenvmap instead. The thread does not include a fix for thenpxroute, so it's still unresolved if you prefer that.General advice, not from the thread: the Notion Bearer token sits in your MCP configuration, so keep that file out of version control and use a token with the minimum scope you need.
Did this work for you?What @jeffatgametime tried on GitHub (Didn't work)
Reporter tried the README npx command
npx -y @notionhq/notion-mcp-serverin Cursor 0.48.9; Cursor logs showError in MCP: Client closedandConnection closed.Source: https://github.com/makenotion/notion-mcp-server/issues/20 (opens external site)
Did this work for you?What @jeffatgametime tried on GitHub (Didn't work)
Reporter tried
docker run --rm -i -e OPENAPI_MCP_HEADERS={"Authorization": "Bearer <token>", ...}with the inline JSON set as the env value; sameClient closederror.Source: https://github.com/makenotion/notion-mcp-server/issues/20 (opens external site)
Did this work for you?What @gorokhovdenis tried on GitHub (Worked)
A contributor reported success using
mcp/notionwith a separate-e OPENAPI_MCP_HEADERSargument and the JSON placed in Cursor'senvblock instead of inline in the command.Did this work for you?