Notion MCP Server

Notion MCP Server

site icon
2025.04.08 0
TypeScriptNotion 集成AI 协作工具交流协作开发效率
Notion MCP Server 是一个实现 Model Context Protocol (MCP) 的服务,用于无缝集成 Claude AI 和 Notion 工作区,提供读写能力。该项目旨在构建一个连接 Claude AI 和 Notion 工作区的 MCP 服务器,使 Claude AI 能够读取和更新 Notion 数据库和页面的内容,搜索工作区,查询和过滤数据库条目,以及检索详细的页面内容和数据库模式。
View on GitHub

Overview

基本能力

产品定位

Notion MCP Server 是一个中间件服务,旨在连接 Claude AI 和 Notion 工作区,提供数据交互能力。

核心功能

  • 读取 Notion 数据库和页面的内容
  • 更新现有内容
  • 搜索 Notion 工作区
  • 查询和过滤数据库条目
  • 检索详细的页面内容和数据库模式

适用场景

  • 自动化内容管理和更新
  • 数据查询和分析
  • 工作区内容搜索和检索

工具列表

  • search_notion: 使用查询字符串搜索 Notion 工作区
  • get_notion_page: 检索特定 Notion 页面的详细内容
  • get_notion_database: 检索 Notion 数据库的元数据和模式
  • query_notion_database: 支持复杂查询的数据库条目搜索和过滤

常见问题解答

无明确常见问题解答部分,但提供了资源和参考链接。

使用教程

使用依赖

  • Node.js (v16+)
  • Notion API key
  • Claude Desktop

安装教程

  1. 设置 Notion API 访问权限
  2. 在 https://www.notion.so/my-integrations 创建 Notion 集成
  3. 命名集成(如 "Claude MCP Integration")
  4. 设置集成类型为 "Internal"
  5. 复制 API key
  6. 通过点击页面/数据库右上角的 "..." 菜单并选择 "Add connections" 来共享页面和数据库

  7. 安装依赖

npm install
  1. 配置环境变量 创建 .env 文件并添加 Notion API key:
NOTION_API_KEY=your_api_key_here
  1. 构建
npm run build
  1. 添加到 Claude Desktop 配置 在 claude_desktop_config.json 中添加:
"notion": {
  "command": "node",
  "args": [
    "path/to/mcp-server-notion/dist/index.js"
  ],
  "env": {
    "NOTION_API_KEY": "your_notion_api_key_here"
  }
}
  1. 重启 Claude

调试方式

  • 开发模式下运行 npm run devnpm run inspect

许可证

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