better-notion-mcp

Markdown-first Notion MCP server with 9 composite tools, 39 actions, and ~77% token reduction via tiered docs.

Better Notion MCP

Markdown-First MCP Server for Notion - Optimized for AI Agents

CI codecov npm Docker License: MIT

TypeScript Node.js Notion semantic-release Renovate

Why "Better"?

9 composite tools that consolidate Notion's 28+ REST API endpoints into action-based operations optimized for AI agents.

vs. Official Notion MCP Server

FeatureBetter Notion MCPOfficial Notion MCP
Content FormatMarkdown (human-readable)Raw JSON blocks
OperationsComposite actions (1 call)Atomic (2+ calls)
PaginationAuto-paginationManual cursor
Bulk OperationsNative batch supportLoop manually
Tools9 tools (39 actions)28+ endpoint tools
Token EfficiencyOptimizedStandard

Quick Start

Remote Mode (OAuth) -- No token needed

Connect directly via URL with OAuth authentication. Your MCP client handles the OAuth flow automatically — just authorize with your Notion account when prompted.

{
  "mcpServers": {
    "better-notion": {
      "type": "http",
      "url": "https://better-notion-mcp.n24q02m.com/mcp"
    }
  }
}

Supported by Claude Desktop, Claude Code, Cursor, VS Code Copilot, and other clients with OAuth support.

Local Mode (Token)

Get your token: https://www.notion.so/my-integrations -> Create integration -> Copy token -> Share pages

Option 1: Package Manager (Recommended)

{
  "mcpServers": {
    "better-notion": {
      "command": "bun",
      "args": ["x", "@n24q02m/better-notion-mcp@latest"],
      "env": {
        "NOTION_TOKEN": "ntn_..."                  // required: Notion integration token
      }
    }
  }
}

Alternatively, you can use npx, pnpm dlx, or yarn dlx:

Runnercommandargs
npxnpx["-y", "@n24q02m/better-notion-mcp@latest"]
pnpmpnpm["dlx", "@n24q02m/better-notion-mcp@latest"]
yarnyarn["dlx", "@n24q02m/better-notion-mcp@latest"]

Option 2: Docker

{
  "mcpServers": {
    "better-notion": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "--name", "mcp-notion",
        "-e", "NOTION_TOKEN",                      // required: pass-through from env below
        "n24q02m/better-notion-mcp:latest"
      ],
      "env": {
        "NOTION_TOKEN": "ntn_..."                  // required: Notion integration token
      }
    }
  }
}

Self-Hosting (Remote Mode)

You can self-host the remote server with your own Notion OAuth app.

Prerequisites:

  1. Create a Public Integration at https://www.notion.so/my-integrations
  2. Set the redirect URI to https://your-domain.com/callback
  3. Note your client_id and client_secret
docker run -p 8080:8080 \
  -e TRANSPORT_MODE=http \
  -e PUBLIC_URL=https://your-domain.com \
  -e NOTION_OAUTH_CLIENT_ID=your-client-id \
  -e NOTION_OAUTH_CLIENT_SECRET=your-client-secret \
  -e DCR_SERVER_SECRET=$(openssl rand -hex 32) \
  n24q02m/better-notion-mcp:latest
VariableDescription
TRANSPORT_MODESet to http for remote mode (default: stdio)
PUBLIC_URLYour server's public URL (used for OAuth redirects)
NOTION_OAUTH_CLIENT_IDNotion Public Integration client ID
NOTION_OAUTH_CLIENT_SECRETNotion Public Integration client secret
DCR_SERVER_SECRETHMAC secret for stateless client registration
PORTServer port (default: 8080)

Tools

ToolActions
pagescreate, get, get_property, update, move, archive, restore, duplicate
databasescreate, get, query, create_page, update_page, delete_page, create_data_source, update_data_source, update_database, list_templates
blocksget, children, append, update, delete
userslist, get, me, from_workspace
workspaceinfo, search
commentslist, get, create
content_convertmarkdown-to-blocks, blocks-to-markdown
file_uploadscreate, send, complete, retrieve, list
helpGet full documentation for any tool

Token Optimization

~77% token reduction via tiered descriptions:

TierPurposeWhen
Tier 1Compressed descriptionsAlways loaded
Tier 2Full docs via help toolOn-demand
Tier 3MCP ResourcesSupported clients
{"name": "help", "tool_name": "pages"}

MCP Resources (Tier 3)

Clients that support MCP Resources can load full tool documentation:

URIDescription
notion://docs/pagesPages tool docs
notion://docs/databasesDatabases tool docs
notion://docs/blocksBlocks tool docs
notion://docs/usersUsers tool docs
notion://docs/workspaceWorkspace tool docs
notion://docs/commentsComments tool docs
notion://docs/content_convertContent Convert tool docs
notion://docs/file_uploadsFile Uploads tool docs

Build from Source

git clone https://github.com/n24q02m/better-notion-mcp
cd better-notion-mcp
mise run setup
bun run build

Requirements: Node.js 24+, bun

Compatible With

Claude Desktop Claude Code Cursor VS Code Copilot Antigravity Gemini CLI OpenAI Codex OpenCode

Also by n24q02m

ServerDescriptionInstall
wet-mcpWeb search, content extraction, library docsuvx --python 3.13 wet-mcp@latest
mnemo-mcpPersistent AI memory with hybrid searchuvx mnemo-mcp@latest
better-email-mcpEmail (IMAP/SMTP) for AI agentsnpx -y @n24q02m/better-email-mcp@latest
better-godot-mcpGodot Engine for AI agentsnpx -y @n24q02m/better-godot-mcp@latest
better-telegram-mcpTelegram Bot API + MTProto for AI agentsuvx --python 3.13 better-telegram-mcp@latest

Contributing

See CONTRIBUTING.md

License

MIT - See LICENSE

Related Servers