Back to Directory/Developer Tools

io.github.n24q02m/better-notion-mcp

Markdown-first MCP server for Notion API with 9 composite tools and 39+ actions.

Developer ToolsTypeScriptv2.26.0

Better Notion MCP

mcp-name: io.github.n24q02m/better-notion-mcp

Markdown-first Notion API server for AI agents -- 9 composite tools replacing 28+ endpoint calls

CI codecov npm Docker License: MIT

TypeScript Node.js Notion semantic-release Renovate

<a href="https://glama.ai/mcp/servers/n24q02m/better-notion-mcp"> </a>

Features

  • Markdown in, Markdown out -- human-readable content instead of raw JSON blocks
  • 9 composite tools with 39 actions -- one call instead of chaining 2+ atomic endpoints
  • Auto-pagination and bulk operations -- no manual cursor handling or looping
  • Tiered token optimization -- ~77% reduction via compressed descriptions + on-demand help tool
  • Dual transport -- local stdio (token) or remote HTTP (OAuth 2.1, no token needed)

Quick Start

Claude Code Plugin (Recommended)

Via marketplace (includes skills: /organize-database, /bulk-update):

bash
/plugin marketplace add n24q02m/claude-plugins
/plugin install better-notion-mcp@claude-plugins

Or install this plugin only:

bash
/plugin marketplace add n24q02m/better-notion-mcp
/plugin install better-notion-mcp

Plugin uses remote OAuth — no NOTION_TOKEN needed. Browser opens for Notion authorization on first use.

MCP Server

Option 1: Remote (OAuth) -- No token needed

Connect directly via URL with OAuth authentication. Your MCP client handles the OAuth flow automatically.

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

Option 2: npx

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

Set NOTION_TOKEN in ~/.claude/settings.local.json or your shell profile:

bash
export NOTION_TOKEN="ntn_..."

Then add to your MCP client config:

jsonc
{
  "mcpServers": {
    "better-notion": {
      "command": "npx",
      "args": ["-y", "@n24q02m/better-notion-mcp@latest"]
    }
  }
}

Other runners: bun x, pnpm dlx, yarn dlx also work.

<details> <summary>Other MCP clients (Cursor, Codex, Gemini CLI)</summary>
jsonc
// Cursor (~/.cursor/mcp.json), Windsurf, Cline, Amp, OpenCode
{
  "mcpServers": {
    "better-notion": {
      "command": "npx",
      "args": ["-y", "@n24q02m/better-notion-mcp@latest"]
    }
  }
}
toml
# Codex (~/.codex/config.toml)
[mcp_servers.better-notion]
command = "npx"
args = ["-y", "@n24q02m/better-notion-mcp@latest"]
</details>

Option 3: Docker

jsonc
{
  "mcpServers": {
    "better-notion": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "NOTION_TOKEN",
        "n24q02m/better-notion-mcp:latest"
      ]
    }
  }
}

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
bash
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

Tools

ToolActionsDescription
pagescreate, get, get_property, update, move, archive, restore, duplicateCreate, read, update, and organize pages
databasescreate, get, query, create_page, update_page, delete_page, create_data_source, update_data_source, update_database, list_templatesDatabase CRUD and page management within databases
blocksget, children, append, update, deleteRead and manipulate block content
userslist, get, me, from_workspaceList and retrieve user information
workspaceinfo, searchWorkspace metadata and cross-workspace search
commentslist, get, createPage and block comments
content_convertmarkdown-to-blocks, blocks-to-markdownConvert between Markdown and Notion blocks
file_uploadscreate, send, complete, retrieve, listUpload files to Notion
help-Get full documentation for any tool

MCP Resources

URIDescription
notion://docs/pagesPage operations reference
notion://docs/databasesDatabase operations reference
notion://docs/blocksBlock operations reference
notion://docs/usersUser operations reference
notion://docs/workspaceWorkspace operations reference
notion://docs/commentsComment operations reference
notion://docs/content_convertContent conversion reference
notion://docs/file_uploadsFile upload reference

Configuration

VariableRequiredDefaultDescription
NOTION_TOKENYes (stdio)-Notion integration token
TRANSPORT_MODENostdioSet to http for remote mode
PUBLIC_URLYes (http)-Server's public URL for OAuth redirects
NOTION_OAUTH_CLIENT_IDYes (http)-Notion Public Integration client ID
NOTION_OAUTH_CLIENT_SECRETYes (http)-Notion Public Integration client secret
DCR_SERVER_SECRETYes (http)-HMAC secret for stateless client registration
PORTNo8080Server port

Security

  • OAuth 2.1 + PKCE S256 -- Secure authorization with code challenge
  • Rate limiting -- 120 req/min/IP on HTTP transport
  • Session owner binding -- IP check + TTL for pending token binds
  • Null safety -- Handles Notion API quirks (comments.list 404, undefined rich_text)

Build from Source

bash
git clone https://github.com/n24q02m/better-notion-mcp.git
cd better-notion-mcp
bun install
bun run dev

Compatible With

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

Also by n24q02m

ServerDescription
wet-mcpWeb search, content extraction, and documentation indexing
mnemo-mcpPersistent AI memory with hybrid search and cross-machine sync
better-email-mcpEmail (IMAP/SMTP) with multi-account and auto-discovery
better-godot-mcpGodot Engine 4.x with 18 tools for scenes, scripts, and shaders
better-telegram-mcpTelegram dual-mode (Bot API + MTProto) with 6 composite tools
better-code-review-graphKnowledge graph for token-efficient code reviews

Contributing

See CONTRIBUTING.md.

License

MIT -- See LICENSE.

Learn More