notion-mcp

v0.5.2
io.github.shck-dev/notion-mcp Checked 2 days ago Published 5 months ago

Notion MCP server — search, export, and import pages as markdown

Values you need

VariableWhat it is
NOTION_TOKENrequired secret Notion token_v2 cookie value from browser DevTools
NOTION_USER_IDrequired Notion user ID from x-notion-active-user-header
NOTION_SPACE_IDrequired Notion workspace ID from API request body

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add notion-mcp -e 'NOTION_SPACE_ID=<NOTION_SPACE_ID>' -e 'NOTION_TOKEN=<NOTION_TOKEN>' -e 'NOTION_USER_ID=<NOTION_USER_ID>' -- npx -y @shck-dev/notion-mcp@0.5.2
Add to claude_desktop_config.json
{
  "mcpServers": {
    "notion-mcp": {
      "args": [
        "-y",
        "@shck-dev/notion-mcp@0.5.2"
      ],
      "command": "npx",
      "env": {
        "NOTION_SPACE_ID": "<NOTION_SPACE_ID>",
        "NOTION_TOKEN": "<NOTION_TOKEN>",
        "NOTION_USER_ID": "<NOTION_USER_ID>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "notion-mcp": {
      "args": [
        "-y",
        "@shck-dev/notion-mcp@0.5.2"
      ],
      "command": "npx",
      "env": {
        "NOTION_SPACE_ID": "<NOTION_SPACE_ID>",
        "NOTION_TOKEN": "<NOTION_TOKEN>",
        "NOTION_USER_ID": "<NOTION_USER_ID>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "NOTION_SPACE_ID",
      "id": "notion-space-id",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "NOTION_TOKEN",
      "id": "notion-token",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "NOTION_USER_ID",
      "id": "notion-user-id",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "notion-mcp": {
      "args": [
        "-y",
        "@shck-dev/notion-mcp@0.5.2"
      ],
      "command": "npx",
      "env": {
        "NOTION_SPACE_ID": "${input:notion-space-id}",
        "NOTION_TOKEN": "${input:notion-token}",
        "NOTION_USER_ID": "${input:notion-user-id}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.notion-mcp]
command = "npx"
args = ["-y", "@shck-dev/notion-mcp@0.5.2"]
env = { "NOTION_SPACE_ID" = "<NOTION_SPACE_ID>", "NOTION_TOKEN" = "<NOTION_TOKEN>", "NOTION_USER_ID" = "<NOTION_USER_ID>" }

For AI agents

  1. Ask the user for: NOTION_TOKEN, NOTION_USER_ID, NOTION_SPACE_ID. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: notion_search, notion_export_page, notion_import_page, notion_import_page_from_file, notion_append_to_page, notion_append_to_page_from_file, notion_create_page, notion_create_page_from_file, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json