Better Notion Mcp

io.github.n24q02m由 GitHub 账号 n24q02m 发布v2.42.0更新于 Oct 29, 2026

Markdown-first Notion for AI agents -- pages, databases, blocks, and comments in one call.

发布方自己的服务:Notion

概览

AI 生成的概览

以 Markdown 为先的 Notion 服务器,让助手一次调用即可创建、读取、更新和整理页面、数据库、区块、评论与文件上传。

可以做什么
  • 创建、读取、更新、移动、归档、恢复和复制页面
  • 查询与管理数据库,包括其中的页面和数据源
  • 读取、追加、更新和删除区块内容
  • 列出用户与工作区信息,并在工作区内搜索
  • 列出并创建页面评论
  • 在 Markdown 与 Notion 区块之间转换,并以单次或分片方式上传文件
适用场景
适合需要让助手以可读的 Markdown 而非原始 JSON 区块来操作 Notion 工作区的场景,例如起草或重组页面、查询数据库、添加评论和附件。
运行要求
通过 npx(需 Node.js 24 或更高版本)或已发布的 Docker 镜像在本地以 stdio 运行。需要 Notion 集成令牌,放在 NOTION_TOKEN 中,并在 Notion 集成设置中创建;该集成还需被共享到目标页面。可选的自托管 HTTP 模式使用 bearer 令牌认证。
安装前请注意
Notion 集成令牌可访问该集成被共享的所有内容,应尽量缩小授权范围。工具可在工作区中创建、更新、归档、删除和上传内容,config 工具还能更改凭据状态。在自托管 HTTP 模式下,no-auth 模式会关闭 bearer 校验,只应在可信的本地网络中使用。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Better Notion Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

notion

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

Markdown-first Notion for AI agents -- pages, databases, blocks, and comments in one call.

[Mode] [CI] [codecov] [npm] [Docker] [License: Apache-2.0]

[TypeScript] [Node.js] [Notion] [semantic-release] [Renovate]

Sister projects from n24q02m (click to expand)
ProjectTaglineTag
agent-chat-pluginPeer AI agents chat in a shared folder — no human relay, no orchestrator, wor...Tooling
better-code-review-graphKnowledge graph for token-efficient code reviews -- semantic search and call-...MCP
better-drive2-way Google Drive sync with .driveignore filter — rclone engine, Windows trayTooling
better-email-mcpIMAP/SMTP email for AI agents -- read, send, organize folders, and manage att...MCP
better-godot-mcpComposite MCP server for Godot Engine -- 17 composite tools for AI-assisted g...MCP
better-notion-mcpMarkdown-first Notion for AI agents -- pages, databases, blocks, and comments...MCP
better-semantic-releaseDrop-in python-semantic-release fork with built-in release-safety guards (orp...Tooling
better-telegram-mcpTelegram for AI agents -- messages, chats, media, and contacts across both bo...MCP
better-workspace-mcpGoogle Workspace MCP server (Docs/Drive/Calendar/Gmail/Sheets/Slides/Tasks/Ch...MCP
claude-pluginsClaude Code plugin marketplace for the n24q02m MCP servers -- install web sea...Marketplace
imagine-mcpImage and video understanding + generation for AI agents -- across Gemini, Op...MCP
jules-task-archiverChrome Extension for bulk operations on Jules tasks via batchexecute API -- a...Tooling
mcp-coreShared foundation for building MCP servers -- Streamable HTTP transport, OAut...MCP
mnemo-mcpPersistent AI memory with hybrid search and embedded sync. Open, free, unlimi...MCP
qwen3-embedLightweight Qwen3 text embedding and reranking via ONNX Runtime and GGUFLibrary
skretSecrets without the server.CLI
tacetA self-distilling neuro-symbolic cascade that amortises LLM cost across knowl...Tooling
web-coreShared web infrastructure package for search, scraping, HTTP security, and st...Library
wet-mcpOpen-source MCP server for AI agents: web search, content extraction, and lib...MCP

Table of contents

[Better Notion MCP server]

Features

  • Markdown in, Markdown out -- human-readable content instead of raw JSON blocks
  • 8 composite tools, 39 actions -- one call instead of chaining 2+ atomic Notion endpoints (plus config and help)
  • 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 (integration token) or remote HTTP (per-user or shared bearer token)

Install

Run with npx (Node.js >= 24) and a Notion integration token from https://www.notion.so/my-integrations (starts with ntn_):

jsonc
// MCP client config (e.g. .mcp.json / Claude Code / Cursor){  "mcpServers": {    "notion": {      "command": "npx",      "args": ["--yes", "@n24q02m/notion@latest"],      "env": { "NOTION_TOKEN": "ntn_your_token_here" }    }  }}

The package is @n24q02m/notion (formerly @n24q02m/better-notion-mcp; old package receives one final release then freezes). The MCP Registry id stays io.github.n24q02m/better-notion-mcp, and the legacy better-notion-mcp command is kept as an alias of notion.

Or run the published Docker image (stdio):

bash
docker run --rm -i -e NOTION_TOKEN=ntn_your_token_here n24q02m/notion:latest

Install matrix

ClientInstall
Claude Code/plugin marketplace add n24q02m/claude-plugins + /plugin install better-notion-mcp@n24q02m-plugins (stdio; prompts for NOTION_TOKEN), or an mcpServers entry in .mcp.json / client settings
Codex CLI[mcp_servers.notion] block in ~/.codex/config.toml (stdio command/args or HTTP type/url)
OpenCodemcpServers block in opencode.json
Cursor / Windsurf / Gemini CLI / any MCP clientmcpServers JSON in the client's config — same shape as the example above

Full per-client walkthroughs: docs.n24q02m.com/servers/notion/setup/. See the Documentation section for per-client setup (Claude Code, Codex, Gemini CLI, Cursor, Windsurf) and HTTP mode.

CLI

Installing the package exposes a notion binary (plus the legacy better-notion-mcp alias; run it with npx or after a global install). With no arguments it starts the MCP server and speaks the protocol over stdin/stdout, so it is normally launched by an MCP client rather than by hand. Subcommands: auth stores the Notion integration token; config, status, logout, doctor, and token come from the shared hull CLI.

bash
# Start the stdio server (default transport; requires NOTION_TOKEN)NOTION_TOKEN=ntn_your_token_here npx --yes @n24q02m/notion@latest
# Start the remote HTTP server (bearer token) instead of stdionpx --yes @n24q02m/notion@latest --http
Argument / envEffect
(none)stdio transport (default); requires NOTION_TOKEN
--httpHTTP transport; auth chosen by MCP_AUTH_MODE (multi default, token, or no-auth)

See Configuration for the full environment-variable reference.

Remote (HTTP mode)

Deployed with the HTTP transport, the server is a remote endpoint gated by bearer-token auth -- no integration token in the server config. Point an MCP client that supports remote HTTP servers at the host you deployed it on:

jsonc
// MCP client config -- remote HTTP (bearer token){  "mcpServers": {    "notion": {      "type": "http",      "url": "https://<your-host>/mcp",      "headers": { "Authorization": "Bearer <your-token>" }    }  }}

In multi mode (default) each user is listed in the users file (MCP_USERS_FILE, default ~/.hull/users.toml) and gets their own token and credential namespace. In token mode every client shares one token whose scrypt hash is set in MCP_AUTH_TOKEN_HASH. To stand up such an instance, see Self-Hosting (Remote Mode).

Smithery

The repo ships a smithery.yaml config for Smithery. Smithery launches the server over stdio (npx -y @n24q02m/notion) and requires no install-time config -- provide your Notion credentials at runtime through NOTION_TOKEN or the config tool (see Configuration).

Status

2026-05-02 -- Architecture stabilization update

Past months saw significant churn around credential handling and the daemon-bridge auto-spawn pattern. This caused multi-process races, browser tab spam, and inconsistent setup UX across plugins. The architecture is now stable: 2 clean modes (stdio + HTTP), no daemon-bridge layer, no auto-spawn from stdio.

Apologies for the instability period. If you encountered issues with prior versions, please update to the latest release and follow the current Setup guide -- most prior workarounds are no longer needed.

Related plugins from the same author:

All plugins share the same architecture -- install once, learn pattern transfers.

Documentation

Full docs at docs.n24q02m.com/servers/notion/:

  • Setup -- install methods for Claude Code, Codex, Gemini CLI, Cursor, Windsurf, mcp.json

Install with AI agent -- paste this to your AI coding agent:

Install MCP server notion following the steps at https://raw.githubusercontent.com/n24q02m/claude-plugins/main/plugins/better-notion-mcp/setup-with-agent.md

Tools

Eight composite Notion tools (39 actions) plus two infrastructure tools (config, help):

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 comments and discussion replies
content_convertmarkdown-to-blocks, blocks-to-markdownConvert between Markdown and Notion blocks (uses a direction parameter)
file_uploadscreate, send, complete, retrieve, listUpload files to Notion (single or multi-part)
configstatus, setup_status, setup_start, setup_reset, setup_complete, set, cache_clearInspect and manage credential state and configuration lifecycle
help-Get full documentation for any composite tool (tool_name parameter)

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_MODE / MCP_TRANSPORTNostdioSet either to http for remote mode (or pass --http)
MCP_AUTH_MODENo (http)multimulti (per-user tokens from MCP_USERS_FILE), token (one shared token, needs MCP_AUTH_TOKEN_HASH), or no-auth (trusted/local use only)
MCP_USERS_FILENo (http, multi)~/.hull/users.tomlUsers file for multi mode
MCP_AUTH_TOKEN_HASHYes (token mode)-scrypt$ hash of the shared token (mint with token hash)
MCP_RPMNo (token mode)-Optional per-minute request cap in token mode
PORTNo0 (OS-assigned)Server port; set explicitly (e.g. 8080) to bind a fixed port
HOSTNo127.0.0.1Bind address (http mode)

Self-Hosting (Remote Mode)

Run the HTTP server on your own host and choose an auth mode with MCP_AUTH_MODE:

  • multi (default): list each user in MCP_USERS_FILE; each user's Notion token is stored in their own namespace (~/.better-notion/subs/<ns>/config.json).
  • token: one shared bearer token. Mint the hash with token hash and pass it as MCP_AUTH_TOKEN_HASH.
  • no-auth: no bearer check. Use only on a trusted local network.
bash
docker run -p 8080:8080 \  -e TRANSPORT_MODE=http \  -e PORT=8080 \  -e MCP_AUTH_MODE=token \  -e MCP_AUTH_TOKEN_HASH='scrypt$...' \  n24q02m/notion:latest

Docker Compose (loopback)

docker-compose.http.yml builds the http image target and publishes it on the host loopback interface only (127.0.0.1:8081), so the server is never reachable from other machines directly:

bash
export MCP_AUTH_MODE=tokenexport MCP_AUTH_TOKEN_HASH='scrypt$...'docker compose -f docker-compose.http.yml up

The server listens on http://localhost:8081/mcp. To expose it, put your own TLS reverse proxy in front of the loopback port.

Release images are published multi-arch (amd64 + arm64) to Docker Hub (n24q02m/notion) and GHCR (ghcr.io/n24q02m/notion). There is no n24q02m-hosted HTTP endpoint.

Comparison

How notion stacks up against direct competitors in each pillar:

Capabilitynotionmakenotion/notion-mcp-serversuekou/mcp-notion-serverawkoy/notion-mcp-server
Markdown in / outYes (round-trip on pages + blocks)No (raw Notion JSON)partial (experimental, append + opt-in convert)Yes (round-trip + GFM)
Composite tool designYes (8 composite tools, 39 actions)No (22 endpoint-mapped tools)partial (simplified + raw JSON tools)Yes (2 dispatch tools, 35+ ops)
File uploads to NotionYes (file_uploads, single + multi-part)NoNoYes (upload_file, single + multi-part)
CommentsYes (comments: list/get/create)YesYesYes
Remote HTTP + bearer-token authYes (per-user namespaces or shared token)partial (HTTP + bearer token)No (stdio token only)No (stdio token only)
Self-hostableYes (Docker, own bearer token)YesYesYes
LicenseApache-2.0?MITMIT

Security

  • Bearer token auth -- per-user tokens (multi) or one scrypt-hashed shared token (token)
  • 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/notion.gitcd notionbun installbun run dev

Trust Model

Credentials are never sent to n24q02m: there is no hosted endpoint.

ModeStorageProtectionWho can read your data?
HTTP self-host (multi)~/.better-notion/subs/<ns>/config.json on the server hostFile mode 0600 under the server's data dirThe server operator and anyone with access to that host
HTTP self-host (token)~/.better-notion/config.json on the server hostFile mode 0600 under the server's data dirThe server operator and anyone with access to that host
stdio (local)~/.better-notion/config.jsonFile mode 0600; machine key in ~/.better-notion/.secretOnly your OS user

License

Apache-2.0 -- See LICENSE.

来源:README.md,提交 a8bcdf3

工具

0
SourceWeft 曾在隔离沙箱中以无凭据方式启动该软件包一次,以列出其工具,但未能完成:服务器未能启动。

版本历史

2
  1. v2.42.0最新Oct 29, 2026
  2. v2.41.6Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Notion 集成