← shck.dev

Notion MCP Server

March 2026 · npm i @shck-dev/notion-mcp

An open-source MCP server that connects Claude, Cursor, and any MCP-compatible client directly to your Notion workspace.

No OAuth app. No workspace admin. No sharing pages one by one.
Paste 3 values from your browser's DevTools and you're in.

Tools

notion_search
Full-text search across your entire workspace
notion_export_page
Export any page as clean markdown
notion_import_page
Replace page content from a markdown string
notion_import_page_from_file
Replace page content from a local .md file

Why not the official API?

The official Notion API requires a workspace admin to create an integration, then explicitly share each page or database with it. This server uses the same internal API the Notion web app uses — if you can see it in your browser, this tool can access it.

This MCP Official API
Setup 3 values from DevTools Create integration + admin approval
Access Everything you can see Only shared pages
Markdown Bidirectional Read-only blocks API
Auth Cookie (token_v2) OAuth / integration token

Quick start

You need Bun installed, then grab 3 values from your browser:

  1. Open notion.so in Chrome, press F12 → Application → Cookies → copy token_v2
  2. In the Network tab, find any POST to api/v3/* — copy x-notion-active-user-header from request headers
  3. From the same request body, copy the spaceId value

Claude Code (one-liner):

claude mcp add notion -- \
  env NOTION_TOKEN=your_token \
      NOTION_USER_ID=your_user_id \
      NOTION_SPACE_ID=your_space_id \
  bunx @shck-dev/notion-mcp

Claude Desktop / Cursor (.json config):

{
  "mcpServers": {
    "notion": {
      "command": "bunx",
      "args": ["@shck-dev/notion-mcp"],
      "env": {
        "NOTION_TOKEN": "your_token_v2",
        "NOTION_USER_ID": "your_user_id",
        "NOTION_SPACE_ID": "your_space_id"
      }
    }
  }
}

Limitations

The internal API is undocumented and could change. The token_v2 cookie expires periodically — just re-grab it from your browser when auth fails. Currently supports pages only (no database queries). Import replaces page content entirely (no append/merge).