Newcontext-mode—Save 98% of your AI coding agent's context windowLearn more
MCP Directory
ServersClientsBlog

context-mode

Save 98% of your AI coding agent's context window. Works with Claude Code, Cursor, Copilot, Codex, and more.

Try context-mode
MCP Directory

Model Context Protocol Directory

MKSF LTD
Suite 8805 5 Brayford Square
London, E1 0SG

MCP Directory

  • About
  • Blog
  • Documentation
  • Contact

Menu

  • Servers
  • Clients

© 2026 model-context-protocol.com

The Model Context Protocol (MCP) is an open standard for AI model communication.
Powered by Mert KoseogluSoftware Forge
  1. Home
  2. Servers
  3. better-notion-mcp

better-notion-mcp

GitHub
Website

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

26
10

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

<!-- Badge Row 1: Status -->

CI
codecov
npm
Docker
License: MIT

<!-- Badge Row 2: Tech -->

TypeScript
Node.js
Notion
semantic-release
Renovate

<a href="https://glama.ai/mcp/servers/n24q02m/better-notion-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/n24q02m/better-notion-mcp/badge" alt="Better Notion MCP server" /> </a>

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)

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
setupstatus, start, reset, completeCredential setup via browser relay, status check, reset, re-resolve
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

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

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

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.

Repository

N2
n24q02m

n24q02m/better-notion-mcp

Created

December 6, 2025

Updated

April 13, 2026

Language

TypeScript

Category

AI