freshcrate
Home > MCP Servers > better-notion-mcp

better-notion-mcp

Markdown-first MCP server for Notion API - composite tools optimized for AI agents

Description

Markdown-first MCP server for Notion API - composite tools optimized for AI agents

README

Better Notion MCP

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

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

CI codecov npm Docker License: MIT

TypeScript Node.js Notion semantic-release Renovate

Better Notion MCP server

Features

  • Markdown in, Markdown out -- human-readable content instead of raw JSON blocks
  • 10 composite tools with 44 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)

Setup

With AI Agent -- copy and send this to your AI agent:

Please set up @n24q02m/better-notion-mcp for me. Follow this guide: https://raw.githubusercontent.com/n24q02m/better-notion-mcp/main/docs/setup-with-agent.md

Manual Setup -- follow docs/setup-manual.md

Tools

Tool Actions Description
pages create, get, get_property, update, move, archive, restore, duplicate Create, read, update, and organize pages
databases create, get, query, create_page, update_page, delete_page, create_data_source, update_data_source, update_database, list_templates Database CRUD and page management within databases
blocks get, children, append, update, delete Read and manipulate block content
users list, get, me, from_workspace List and retrieve user information
workspace info, search Workspace metadata and cross-workspace search
comments list, get, create Page and block comments
content_convert markdown-to-blocks, blocks-to-markdown Convert between Markdown and Notion blocks
file_uploads create, send, complete, retrieve, list Upload files to Notion
setup status, start, reset, complete Credential setup via browser relay, status check, reset, re-resolve
help - Get full documentation for any tool

MCP Resources

URI Description
notion://docs/pages Page operations reference
notion://docs/databases Database operations reference
notion://docs/blocks Block operations reference
notion://docs/users User operations reference
notion://docs/workspace Workspace operations reference
notion://docs/comments Comment operations reference
notion://docs/content_convert Content conversion reference
notion://docs/file_uploads File upload reference

Zero-Config Setup

No environment variables needed. On first start, the server opens a setup page in your browser:

  1. Start the server (via plugin, npx, or Docker)
  2. A setup URL appears -- open it in any browser
  3. Fill in your credentials on the guided form
  4. Credentials are encrypted and stored locally

Your credentials never leave your machine. The relay server only sees encrypted data.

For CI/automation, you can still use environment variables (see below).

Configuration

Variable Required Default Description
NOTION_TOKEN Yes (stdio) - Notion integration token
TRANSPORT_MODE No stdio Set to http for remote mode
PUBLIC_URL Yes (http) - Server's public URL for OAuth redirects
NOTION_OAUTH_CLIENT_ID Yes (http) - Notion Public Integration client ID
NOTION_OAUTH_CLIENT_SECRET Yes (http) - Notion Public Integration client secret
DCR_SERVER_SECRET Yes (http) - HMAC secret for stateless client registration
PORT No 8080 Server port

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

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

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

License

MIT -- See LICENSE.

Release History

VersionChangesUrgencyDate
v2.28.4## v2.28.4 (2026-04-21) ### Bug Fixes - Persist token + notify relay safely in local-relay mode ([`1d5b2d9`](https://github.com/n24q02m/better-notion-mcp/commit/1d5b2d9e5742e29908d495bd5ac412f2fb30386b)) - Prevent command injection in tryOpenBrowser via URL safety validator ([`a798afe`](https://github.com/n24q02m/better-notion-mcp/commit/a798afec8c9b6de7b91e1e96ba3990fff3e1fae6)) - Stdio fallback spawns local HTTP, never hits remote URL ([`df721e0`](https://github.com/n24q02m/better-notion-mHigh4/21/2026
v2.28.3## v2.28.3 (2026-04-20) ### Bug Fixes - Bump @n24q02m/mcp-core to ^1.4.2 ([#558](https://github.com/n24q02m/better-notion-mcp/pull/558), [`10ba266`](https://github.com/n24q02m/better-notion-mcp/commit/10ba2660d7048548e3138abbee043aa59d547338)) --- **Detailed Changes**: [v2.28.2...v2.28.3](https://github.com/n24q02m/better-notion-mcp/compare/v2.28.2...v2.28.3) High4/20/2026
v2.27.6## v2.27.6 (2026-04-17) ### Bug Fixes - Bump @n24q02m/mcp-core to 1.2.0 (authlib CVE + auto-issue CD) ([`d9ba489`](https://github.com/n24q02m/better-notion-mcp/commit/d9ba489426e91aca4b8029a733419b7be34e62f4)) --- **Detailed Changes**: [v2.27.5...v2.27.6](https://github.com/n24q02m/better-notion-mcp/compare/v2.27.5...v2.27.6) High4/17/2026
v2.27.4## v2.27.4 (2026-04-13) ### Bug Fixes - Remove direct better-sqlite3 dep; add trustedDependencies for Bun script skip ([`43fcd3b`](https://github.com/n24q02m/better-notion-mcp/commit/43fcd3b2b4bfb78f105b51f3769a075bf47ac0de)) --- **Detailed Changes**: [v2.27.3...v2.27.4](https://github.com/n24q02m/better-notion-mcp/compare/v2.27.3...v2.27.4) High4/13/2026
v2.26.0## v2.26.0 (2026-04-07) ### Bug Fixes - Remove BETA markers and promote relay as primary setup method ([`c8814e9`](https://github.com/n24q02m/better-notion-mcp/commit/c8814e95ea28e90021497874e39d3ba3a8219533)) - **databases**: Refactor queryDatabase complexity ([#406](https://github.com/n24q02m/better-notion-mcp/pull/406), [`8ff5171`](https://github.com/n24q02m/better-notion-mcp/commit/8ff51717374f7400e5503e15887a8480864475ef)) - **deps**: Update dependency @n24q02m/mcp-relay-core to ^1.4.0 High4/7/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

thoughtboxThoughtbox is an intention ledger for agents. Evaluate AI's decisions against its decision-making.main@2026-04-20
codebase-contextGenerate a map of your codebaseto help AI Agents understand your architecture, coding conventions and patterns. Discoverable with Semantic Searchv2.3.0
codingbuddyCodingbuddy orchestrates 29 specialized AI agents to deliver code quality comparable to a team of human experts through a PLAN → ACT → EVAL workflow.v5.6.3
cortex-hubSelf-hosted AI Agent Memory + Code Intelligence Platform — one MCP endpoint for persistent memory, AST-aware code search, shared knowledge, and quality enforcement across all your AI coding agents.v0.7.0
chromadb-remote-mcpRemote MCP server for ChromaDBv1.0.2