Better Notion MCP logo

Better Notion MCP

by @faize555

Better MCP server for Notion API with composite tools optimized for AI agents

Install Better Notion MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "faize555-better-notion-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@faize555/better-notion-mcp@latest"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y @faize555/better-notion-mcp@latest

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

Tools10

What Better Notion MCP lets your agent do. Expand a tool for its parameters.

Self-reported~52 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

9/9 checks healthy over the last 33d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 17d ago via OSV.dev · @faize555/better-notion-mcp@latest (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads104Package downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed10Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

From the project README

Better Notion MCP

🇺🇸 English · 🇨🇳 简体中文

An independently maintained enhanced edition evolved from the outstanding open-source project n24q02m/better-notion-mcp (now n24q02m/notion), maintained by one2agi.
A high-fidelity Markdown pipeline and production-grade Notion MCP infrastructure deeply redesigned for modern AI Agents (Claude, Cursor, Antigravity, Gemini Spark, etc.).

🌐 Official Website · 🧭 Knowledge Base · 💬 Community · 📦 GitHub Repo

Maintained by one2agi npm License: MIT TypeScript Node.js Notion


Table of Contents


Core Architecture Design

Better Notion MCP is engineered specifically for LLM context optimization and autonomous multi-step execution across 4 technical pillars:

1. Markdown-First Semantic Pipeline

Equipped with an in-house 1,700+ line bi-directional AST compiler. Elements like callouts, toggles, multi-column blocks, syntax-highlighted code, and complex tables render as clean, standard Markdown. Writing content automatically compiles into valid Notion Block trees, reducing static and interaction token consumption by 70% to 90%.

2. Composite Mega-Tools

Instead of exposing dozens of fragmented low-level endpoints, APIs are consolidated into 8 domain composite tools (53 atomic actions) + 2 infrastructure tools. A single pages action can atomically update body content, title, icon, and cover in one transaction, eliminating redundant network hops.

3. Agent Resilience & Self-Healing

Features built-in exponential backoff retries (retryWithBackoff) and machine-readable fix advice (suggestFixes). When encountering transient rate limits or validation errors, structured fix instructions allow the model to self-correct autonomously without aborting tasks.

4. Lightweight & Isomorphic Runtimes

Seamlessly bridges local developer workflows and enterprise infrastructure: zero-setup local Stdio with integration tokens, or production Docker deployments with OAuth 2.1 + PKCE multi-user session isolation.


Key Features

  • 📄 Full Markdown Round-Trip: High-fidelity bi-directional AST conversion between Markdown and Notion blocks.
  • 🛠️ Complete 10-Tool Matrix: 8 domain composite tools + 2 infrastructure tools covering 95%+ of Notion API capabilities.
  • ⚡ Atomic Multi-Field Updates: Modify body text, title, icon, and cover in a single replace_content call.
  • 📚 Tiered Token Optimization: Compact tool descriptions reduce static context by ~77%, with on-demand detailed manual retrieval via help.
  • 🔄 Kernel-Level Auto-Pagination: autoPaginate transparently handles cursor loops and recursive deep-child block fetching.
  • 🛡️ Production Security: Automatic token sanitization on error paths; full OAuth 2.1 PKCE support for HTTP mode.
  • 🌐 Dual Transport: Seamlessly switch between local Stdio and self-hosted remote HTTP services.

Tool Matrix (10 Tools)

The server registers 10 MCP tools comprising 8 Notion domain composite tools and 2 infrastructure tools:

ToolActionsScope & CapabilitiesToken Mode
pagescreate, get, get_property, update, move, archive, restore, duplicate, get_markdown, replace_content, insert_markdown, update_content, replace_content_range (13 actions)Full page lifecycle; native Markdown reading/writing, atomic metadata updates (icon, cover, title), server-side fast rendering.Notion API
databasescreate, get, query, create_page, update_page, delete_page, create_data_source, update_data_source, update_database, list_templates, aggregate, group_by, create_view, list_views, get_view, update_view, delete_view (17 actions)Database schema management, multi-view configurations, batch row CRUD, and aggregations (count/sum/avg/group).Notion API
blocksget, children, append, update, delete (5 actions)Granular block operations; tree traversal and content manipulation.Notion API
workspaceinfo, search (2 actions)Global fuzzy search and workspace metadata inspection.Notion API
userslist, get, me, from_workspace (4 actions)Team members, collaborators, and bot user retrieval.Notion API
commentslist, get, create, update, delete (5 actions)Comment discussion lifecycle on pages and blocks, with workarounds for upstream OAuth 404 quirks.Notion API
content_convertmarkdown-to-blocks, blocks-to-markdown (2 directions)Pure local offline AST converter. Transforms Markdown into Notion blocks and vice versa without network calls.Offline (Token-Free)
file_uploadscreate, send, complete, retrieve, list (5 actions)Upload local files and attachments to Notion with chunked multi-part resumption.Notion API
helpTarget tool_nameCore of Tiered Token Optimization: Dynamically retrieves complete schemas and examples for any composite tool.Offline (Token-Free)
configstatus, setup_start, setup_reset, setup_complete, set, cache_clear (6 actions)Runtime Autonomy: Inspects credential health and resets or reloads configuration without restarting the client.Offline (Token-Free)

Note on Complex Arguments: Parameters typed as objects or arrays (properties, filters, sorts, etc.) accept both raw structured JSON and JSON strings to maintain compatibility across different clients.


Quick Start & Installation

1. Zero-Install with npx (Recommended)

Requires Node.js (>= 24) and a Notion integration token from Notion Integrations (starts with ntn_):

Add to your MCP client configuration (Claude Desktop, Cursor, Antigravity, Windsurf, etc.):

JSON Config
{
  "mcpServers": {
    "better-notion-mcp": {
      "command": "npx",
      "args": ["-y", "@faize555/better-notion-mcp@latest"],
      "env": {
        "NOTION_TOKEN": "ntn_your_integration_token_here"
      }
    }
  }
}

2. Global Installation via npm

Install globally on your machine:

Terminal
npm install -g @faize555/better-notion-mcp

Client configuration:

JSON Config
{
  "mcpServers": {
    "better-notion-mcp": {
      "command": "better-notion-mcp",
      "env": {
        "NOTION_TOKEN": "ntn_your_integration_token_here"
      }
    }
  }
}

3. Docker Container (Stdio Mode)

Build and run in stdio mode via Docker:

bash
# Build the Docker image
docker build -t better-notion-mcp .

# Run container
docker run --rm -i -e NOTION_TOKEN=ntn_your_integration_token_here better-notion-mcp

Configuration Reference

VariableRequiredDefaultDescription
NOTION_TOKENYes (Stdio mode)-Internal Notion integration token (ntn_...)
TRANSPORT_MODE / MCP_TRANSPORTNostdioTransport mode. Set to http for remote multi-tenant service
PORTNo8080Port for remote HTTP transport
HOSTNo0.0.0.0Bind address for remote HTTP server
PUBLIC_URLYes (HTTP mode)-Public URL of the server for OAuth redirect resolution
NOTION_OAUTH_CLIENT_IDYes (HTTP mode)-Notion Public Integration Client ID
NOTION_OAUTH_CLIENT_SECRETYes (HTTP mode)-Notion Public Integration Client Secret
CREDENTIAL_SECRETNo (HTTP mode)-32-byte hex key for EdDSA signing across container restarts

Self-Hosted Deployment: Remote OAuth 2.1

Ideal for team-wide tokenless access. Users authenticate via standard OAuth 2.1 web authorization rather than copying and pasting private tokens.

1. Create a Notion Public Integration

  1. Visit Notion Developers and create an integration;
  2. Select type Public;
  3. Set Redirect URIs to: https://<your-domain>/callback;
  4. Grant required read/write permissions and copy the Client ID and Client Secret.

2. Docker Compose Setup

Create docker-compose.yml:

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Better Notion MCP

@faize555/better-notion-mcp is an MCP server that connects AI agents to the Notion API through composite tools optimized for multi-step tasks. It provides high-fidelity Markdown round-tripping, atomic page updates, retry handling, machine-readable fix guidance, and local Stdio or production Docker deployment with OAuth 2.1 and PKCE.

It provides 8 domain composite tools and 2 infrastructure tools covering more than 95% of Notion API capabilities. Composite actions can handle operations such as updating page body content, titles, icons, and covers together.

Yes, it supports high-fidelity bidirectional conversion between Markdown and Notion blocks. Its Markdown-first pipeline handles elements including callouts, toggles, multi-column blocks, syntax-highlighted code, and complex tables.

You can run it with npx for a zero-install setup, install it globally through npm, or deploy it in a Docker container using Stdio mode. The project identifies npx as the recommended installation approach.

Yes, it supports production Docker deployments with OAuth 2.1, PKCE, and multi-user session isolation. Local workflows can use Stdio with Notion integration tokens.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewBetter Notion MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/faize555-better-notion-mcp?style=directory)](https://allmcps.com/mcp/faize555-better-notion-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/faize555-better-notion-mcp"><img src="https://allmcps.com/api/badge/faize555-better-notion-mcp?style=directory" alt="Better Notion MCP on AllMCPs" /></a>