Notion MCP Server

Notion MCP Server

site icon
2025.03.23 0
TypeScriptNotion集成LLM交互工作区管理交流协作开发效率
Notion MCP Server 是一个用于 Notion 集成的模型上下文协议服务器,允许 Claude 和其他大型语言模型(LLM)与您的 Notion 工作区进行交互。该服务器提供了丰富的功能,包括搜索、获取、创建和更新 Notion 页面,以及创建和查询数据库等。
View on GitHub

Overview

基本能力

产品定位

Notion MCP Server 是一个用于 Notion 集成的模型上下文协议服务器,旨在通过 Claude 和其他 LLM 增强 Notion 工作区的交互能力。

核心功能

  • 搜索 Notion:在整个 Notion 工作区中搜索内容
  • 获取页面:从特定 Notion 页面检索内容
  • 创建页面:在 Notion 工作区中创建新页面
  • 更新页面:更新现有页面的内容或标题
  • 创建数据库:创建具有自定义属性的新数据库
  • 查询数据库:使用筛选器和排序查询数据库
  • 更新数据库条目:更新数据库条目的属性
  • 创建数据库行:向现有数据库添加具有自定义属性的新行

适用场景

  • 通过自然语言指令管理 Notion 内容
  • 自动化 Notion 工作区的任务
  • 集成 Notion 与其他 LLM 工具

工具列表

  1. Search Notion:搜索 Notion 工作区
  2. Get Page:获取特定页面的内容
  3. Create Page:创建新页面
  4. Update Page:更新现有页面
  5. Create Database:创建新数据库
  6. Query Database:查询数据库
  7. Update Database Entry:更新数据库条目
  8. Create Database Row:创建数据库行

常见问题解答

  • 工具未显示:检查 Claude for Desktop 日志
  • API 密钥问题:确保 Notion API 密钥正确设置且集成有权访问所需页面
  • Unexpected token 错误:可能是 console.log 语句干扰了 MCP 协议

使用教程

使用依赖

  1. 安装 Node.js(确保已安装)

安装教程

  1. 克隆仓库
  2. 安装依赖 bash npm install
  3. 配置 Notion API 密钥
  4. Notion Developers portal 创建集成
  5. 复制 API 密钥
  6. 编辑 .env 文件或直接在 Claude for Desktop 配置中传递密钥
  7. 构建服务器 bash npm run build
  8. 运行服务器 bash npm start

调试方式

  1. 检查 Claude for Desktop 日志: bash tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
  2. 确保 API 密钥正确且集成有权访问所需页面

许可证

None