Notion MCP Server

Notion MCP Server

site icon
2025.02.01 4
TypeScriptNotion集成自动化工具内容管理交流协作开发效率
Notion MCP Server 是一个用于与 Notion API 交互的服务,使 Claude 能够与 Notion 工作区进行交互。它提供了一系列工具来操作 Notion 中的块、页面和数据库,包括创建、查询、更新和删除等功能。
View on GitHub

Overview

基本能力

产品定位

Notion MCP Server 是一个中间件服务,用于连接 Claude 和 Notion,实现自动化操作 Notion 内容的功能。

核心功能

  1. 块操作
  2. 追加子块到父块
  3. 检索块信息
  4. 检索块的子块
  5. 删除块

  6. 页面操作

  7. 检索页面信息
  8. 更新页面属性

  9. 数据库操作

  10. 创建数据库
  11. 查询数据库
  12. 检索数据库信息
  13. 更新数据库
  14. 在数据库中创建项目

适用场景

  1. 自动化管理 Notion 内容
  2. 集成 Notion 到 Claude 工作流
  3. 批量操作 Notion 数据库
  4. 构建基于 Notion 的自动化工具

工具列表

  1. notion_append_block_children - 向父块追加子块
  2. notion_retrieve_block - 检索块信息
  3. notion_retrieve_block_children - 检索块的子块
  4. notion_delete_block - 删除块
  5. notion_retrieve_page - 检索页面信息
  6. notion_update_page_properties - 更新页面属性
  7. notion_create_database - 创建数据库
  8. notion_query_database - 查询数据库
  9. notion_retrieve_database - 检索数据库信息
  10. notion_update_database - 更新数据库
  11. notion_create_database_item - 在数据库中创建项目

常见问题解答

  1. 权限错误
  2. 确保集成具有所需权限
  3. 验证集成是否被邀请到相关页面或数据库
  4. 确认令牌和配置在 claude_desktop_config.json 中正确设置

使用教程

使用依赖

  1. Node.js 环境
  2. Notion 账户和集成权限

安装教程

  1. 创建 Notion 集成
  2. 访问 Notion 集成页面
  3. 点击 "New Integration"
  4. 命名集成并选择适当权限

  5. 获取密钥

  6. 复制 "Internal Integration Token"

  7. 将集成添加到工作区

  8. 在 Notion 中打开要访问的页面或数据库
  9. 点击右上角的导航按钮
  10. 点击 "Connect to" 并选择您的集成

  11. 配置 Claude Desktop: 在 claude_desktop_config.json 中添加: json { "mcpServers": { "notion": { "command": "node", "args": ["your-built-file-path"], "env": { "NOTION_API_TOKEN": "your-integration-token" } } } }

调试方式

  1. 检查环境变量是否正确设置
  2. 验证 Notion API 令牌是否有效
  3. 确认集成具有足够的权限
  4. 检查日志输出是否有错误信息

许可证

该项目遵循 MIT 开源许可条款,请参阅 MIT 了解完整条款。