notion-mcp
A self-hosted MCP server that mirrors a Notion workspace to local Markdown files, enabling tools to access Notion data through the local mirror without direct API calls.
README
Notion MCP
A self-hosted Streamable HTTP MCP server that mirrors a Notion workspace to local Markdown files. MCP tools read the local mirror only; they never make a Notion API request.
Docker deployment
Prerequisites: Docker with the Compose plugin, and a Notion internal integration token that has been connected to the pages and data sources to mirror.
-
Create a private Docker network shared with MCP clients:
docker network create notion-mcp-client -
Copy
.env.exampleto.envand setNOTION_TOKEN. SetMCP_AUTH_TOKENto protect/mcpand/statuswith a bearer token. -
Start the server:
docker compose up -d --build
The Compose service has no published host ports. It is reachable only by
containers on notion-mcp-client, using http://notion-mcp:3000. Set
MCP_NETWORK before docker compose up to use a differently named existing
network.
The named notion-mcp-data volume persists the Markdown mirror and FTS index.
Restarting the service retains them, so unchanged pages are not downloaded
again.
The Linux x64 image measured 297 MiB in verification. The runtime stage
contains only node:22-slim, production dependencies (including the native
FTS binding), and compiled application output; compiler packages and
development dependencies remain in the discarded build stage.
Client integration
Connect an MCP client container to the shared network. For example:
docker run --rm --network notion-mcp-client curlimages/curl \
http://notion-mcp:3000/health
Configure a Streamable HTTP MCP client with URL
http://notion-mcp:3000/mcp. When MCP_AUTH_TOKEN is set, send
Authorization: Bearer <MCP_AUTH_TOKEN>. /health is intentionally public on
the private Docker network; /mcp and /status always pass through the auth
middleware.
Environment
| Variable | Default | Description |
|---|---|---|
NOTION_TOKEN |
required | Notion internal integration token. |
MCP_AUTH_TOKEN |
unset | Optional bearer token for /mcp and /status. |
EXPORT_DIR |
/data/export |
Markdown mirror root. |
CACHE_DIR |
/data/.cache |
SQLite FTS index location. |
PORT |
3000 |
HTTP listen port. |
BIND_HOST |
0.0.0.0 |
HTTP listen address. |
SYNC_INTERVAL_SECONDS |
900 |
Incremental sync interval. |
SYNC_OVERLAP_SECONDS |
600 |
Overlap behind the derived watermark. |
RECONCILE_EVERY_N_SYNCS |
96 |
Full-reconcile cadence. |
NOTION_RPS |
2.5 |
Notion request budget. |
NOTION_MAX_RETRIES |
5 |
Retry limit for retryable Notion failures. |
MIRROR_EXTERNAL_ASSETS |
false |
Also mirror non-Notion asset URLs. |
SYNC_ON_STARTUP |
true |
Run a sync when the service starts. |
LOG_LEVEL |
info |
Pino log level. |
Runbook
View service state and logs:
docker compose ps
docker compose logs -f notion-mcp
Check health from a sibling container:
docker run --rm --network notion-mcp-client curlimages/curl \
http://notion-mcp:3000/health
Stop gracefully with docker compose stop. The process handles SIGTERM,
stops scheduling new syncs, closes HTTP connections, and Compose allows up to
30 seconds before forceful termination. Do not remove notion-mcp-data unless
you intend to discard the mirror and force a full sync on the next start.
To update, run docker compose up -d --build. To intentionally reset all
local mirror and search data, run docker compose down -v.
Development
cp .env.example .env
pnpm install
pnpm build
pnpm start
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。