Provides comprehensive tools for connecting to and manipulating Notion API, including searching pages, creating and updating pages, querying databases, and managing page content blocks with real-time synchronization.
Notion MCP Server
這是一個 Model Context Protocol (MCP) 伺服器,用於連接和操作 Notion API。它提供了一套完整的工具來讀取、寫入和管理 Notion 頁面與資料庫。
功能特色
- 🔍 搜尋頁面 - 在 Notion 工作區中搜尋頁面
- 📄 頁面操作 - 取得、建立和更新 Notion 頁面
- 🗃️ 資料庫查詢 - 查詢和操作 Notion 資料庫
- 📋 內容管理 - 讀取和修改頁面內容區塊
- 🔄 即時同步 - 透過 MCP 協議即時與 Notion 同步
安裝和設定
1. 安裝依賴
2. 設定 Notion 整合
- 前往 Notion 整合設定頁面
- 建立新的整合
- 複製整合 token
- 建立
.env
檔案並加入您的 token:
3. 建立專案
使用方法
開發模式
生產模式
監控模式(自動重新載入)
可用的工具
頁面操作
get-page
- 根據 ID 取得頁面詳細資訊search-pages
- 搜尋頁面create-page
- 建立新頁面update-page
- 更新頁面屬性
資料庫操作
query-database
- 查詢資料庫內容
資源
notion://recent-pages
- 最近存取的頁面notion://databases
- 可存取的資料庫清單
在 VS Code 中使用
- 確保已安裝 MCP 相關的 VS Code 擴充功能
- 使用
.vscode/mcp.json
配置檔案來設定伺服器連接 - 在 VS Code 中啟動偵錯模式以測試 MCP 伺服器
API 範例
搜尋頁面
建立頁面
錯誤排除
常見問題
- Authentication Error: 確認
NOTION_TOKEN
環境變數已正確設定 - Permission Error: 確認 Notion 整合有適當的權限存取所需的頁面和資料庫
- Module Resolution Error: 確認所有依賴已正確安裝
偵錯
在開發模式下,伺服器會在 stderr 輸出詳細的偵錯資訊。
專案結構
授權
MIT License
相關連結
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables interaction with Notion workspaces through the Notion API. Provides tools to search, read, create, and update Notion pages and databases with real-time synchronization.
Related MCP Servers
- -securityAlicense-qualityEnables advanced todo list management and content organization using Notion's API, supporting features like creating databases, dynamic filtering, and collaborative task tracking.Last updated -27PythonMIT License
- -securityFlicense-qualityEnables interaction with Notion through the Notion API by exposing it as tools for LLMs, allowing operations like reading, creating, updating, and deleting Notion pages seamlessly via natural language.Last updated -722TypeScript
- -securityAlicense-qualityEnables Language Models to interact with Notion workspaces through standardized tools for searching, reading, creating, and updating pages and databases.Last updated -108TypeScriptMIT License
- -securityFlicense-qualityA server that connects to the Notion API and exposes functionality through Claude's Machine Context Protocol, enabling search, retrieval, querying, and creation of Notion pages and databases.Last updated -907JavaScript