Notion MCP Server
Provides tools for interacting with Notion, including searching workspaces, retrieving pages and page content, inspecting and querying databases, creating and updating pages, and appending content to pages.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Notion MCP ServerQuery my Tasks database for everything due this week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Notion MCP Server (Cloudflare Workers)
無狀態 Streamable HTTP MCP Server,零依賴,適用 Workers Free plan。
端點:POST /mcp 健康檢查:GET /health
工具
notion_search · notion_get_page · notion_read_page_content · notion_get_database ·
notion_query_database · notion_create_page · notion_update_page · notion_append_content
Related MCP server: Notion MCP Server
部署
到 https://www.notion.so/profile/integrations 建立 Internal integration,複製 secret。
在要開放的 Notion 頁面 / 資料庫右上
…→ Connections → 加入該 integration。安裝並部署(用 CLI,不需要 Git 連線 / Workers Builds):
npm install
npx wrangler login
npx wrangler secret put NOTION_TOKEN # 貼上 Notion secret
npx wrangler secret put MCP_AUTH_TOKEN # 例如:openssl rand -hex 32
npx wrangler deploy本機測試:複製 .dev.vars.example 為 .dev.vars,執行 npm run dev。
測試
URL=https://notion-mcp.<你的子網域>.workers.dev/mcp
TOKEN=<MCP_AUTH_TOKEN>
curl -s $URL -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
curl -s $URL -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"notion_search","arguments":{"query":"","page_size":5}}}'接到客戶端
# Claude Code
claude mcp add --transport http notion https://notion-mcp.<子網域>.workers.dev/mcp \
--header "Authorization: Bearer <MCP_AUTH_TOKEN>"Cursor / VS Code 等:{"url": ".../mcp", "headers": {"Authorization": "Bearer ..."}}
若客戶端無法設定自訂 header,可設 ALLOW_QUERY_TOKEN=true(wrangler secret put 或 vars),
改用 https://.../mcp?key=<token>。注意 URL 可能出現在日誌中,安全性較低。
免費方案注意事項
CPU 10ms/請求:只做 JSON 轉換,足夠;Notion 的等待時間不計入 CPU。
每次呼叫最多 50 個 subrequest:程式內設上限 40,
notion_read_page_content超過會附上[truncated],可降低max_depth或分段讀。10 萬請求/天。
Notion API 版本預設
2022-06-28(支援/databases/{id}/query)。可用NOTION_VERSION覆寫,但2025-09-03起資料庫改為 data sources,需要改寫查詢工具。本伺服器為 stateless:不提供 GET SSE 串流與 session(規格允許,回 405)。
若用 GitHub Actions 部署(不經 Workers Builds)
新增 .github/workflows/deploy.yml:
name: Deploy to Cloudflare Workers
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci
- run: npx wrangler deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}在 repo 的 Settings → Secrets and variables → Actions 加入 CLOUDFLARE_API_TOKEN 與 CLOUDFLARE_ACCOUNT_ID。
(npm ci 需要 package-lock.json 一併 commit;NOTION_TOKEN / MCP_AUTH_TOKEN 只需事先用 wrangler secret put 設定一次,不必進 CI。)
授權
MIT © detutag/cloudflare-notion-mcp
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted Notion MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Remote streamable-HTTP MCP server running on a single Cloudflare Worker. Your assistant gets live Airbnb, Amazon, Booking.com, Google Flights, Maps and Reddit data, social search on X, Instagram and TikTok, the Meta Ad Library, and image/video generation without any keys. Connect your own accounts to let it send WhatsApp or Telegram messages, work an IMAP inbox, manage Meta Ads campaigns and publish to X and LinkedIn. OAuth 2.1 with PKCE; stored credentials are AES-256-GCM encrypted.
MCP-native open-source Notion alternative: read & write pages, databases and kanban boards.
Notes, kanban tasks, and a capture inbox: read and create Flow data with a personal token.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI agents like Claude, Cursor, and VS Code to read and write Notion content through a token-authenticated connection, covering pages, databases, blocks, comments, and file uploads. It supports headless and CI use with context-efficient tooling, batched mutations, and idempotent retries.3,343 npmMIT
- AlicenseNot gradedqualityAmaintenanceGives AI agents and coding assistants read/write access to Notion — creating and editing pages, querying databases, appending blocks, applying templates, commenting, and uploading files — through just three context-efficient tools. It authenticates with a single token so it works headless in automation, CI, and self-hosted deployments, with batched mutations, idempotency keys, and retry handling built in.3,343 npmMIT
- AlicenseNot gradedqualityAmaintenanceGives AI clients token-authenticated read/write access to Notion, letting them create and rewrite pages, query databases, append blocks, apply templates, comment, and upload files through natural language. It exposes 47 operations behind only three tools to keep context usage small, and runs headless with batched mutations, idempotency keys, and retry on rate limits.3,343 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables MCP clients such as Claude, Cursor and ChatGPT to read and write in Notion using a single token, covering search, page creation and editing, database queries, comments and file uploads through natural language. It also supports headless use in automation and CI, with batched, idempotent writes and compact context cost.3,343 npmMIT