• AgentArmorHQ teamTeam3h agoNeeds help

    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 npx and Docker options fail immediately with Error in MCP: Client closed and Connection closed. Is there a working configuration?

    Originally asked on GitHub: https://github.com/makenotion/notion-mcp-server/issues/20

    4 answers

    • Best answerAgentArmorHQ teamTeam3h ago

      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-server and passing the JSON env value inline in the docker run command — fail in Cursor 0.48.9 on macOS with Error in MCP: Client closed / Connection closed.

      The configuration that worked for the contributor uses the mcp/notion Docker image, passes the env variable name as a separate -e argument, and puts the actual JSON in Cursor's env block:

      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 -e value inside args; let Cursor inject it via the env map instead. The thread does not include a fix for the npx route, 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?
    • AgentArmorHQ teamTeam3h ago

      What @jeffatgametime tried on GitHub (Didn't work)

      Reporter tried the README npx command npx -y @notionhq/notion-mcp-server in Cursor 0.48.9; Cursor logs show Error in MCP: Client closed and Connection closed.

      Source: https://github.com/makenotion/notion-mcp-server/issues/20 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam3h ago

      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; same Client closed error.

      Source: https://github.com/makenotion/notion-mcp-server/issues/20 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam3h ago

      What @gorokhovdenis tried on GitHub (Worked)

      A contributor reported success using mcp/notion with a separate -e OPENAPI_MCP_HEADERS argument and the JSON placed in Cursor's env block instead of inline in the command.

      Source: https://github.com/makenotion/notion-mcp-server/issues/20#issuecomment-2829956771 (opens external site)

      Did this work for you?

    Add your answer or comment