How to use

How to use

site icon
2024.12.27 0
JavaScriptNotion 集成自动化工作流交流协作
Notion MCP Server 是一个简单的 MCP 服务器,允许用户查询和操作 Notion 页面。它通过集成 Notion API 和 Claude 集成,提供了与 Notion 页面交互的能力。用户可以通过该服务器创建、查询和更新 Notion 页面内容。
View on GitHub

Overview

基本能力

产品定位

Notion MCP Server 是一个用于与 Notion 页面交互的中间件服务,旨在简化 Notion 页面的查询和操作流程。

核心功能

  • 查询 Notion 页面内容
  • 创建新的数据库条目
  • 更新 Notion 页面内容
  • 与 Claude 集成协同工作

适用场景

  • 自动化 Notion 页面内容管理
  • 批量操作 Notion 数据库
  • 与其他工具(如 Claude)集成实现自动化工作流

工具列表

  • Notion API:用于与 Notion 页面交互
  • Claude 集成:用于处理自动化任务

常见问题解答

  • 如何获取 Notion API Token? 通过 Notion 的集成页面(https://www.notion.so/my-integrations)创建新的集成并获取 Token。
  • 如何配置 Claude 集成? 通过编辑 claude_desktop_config.json 文件,添加 Notion MCP Server 的配置信息。

使用教程

使用依赖

  • Node.js 环境
  • Git

安装教程

git clone https://github.com/arre-ankit/notion-mcp-server.git
cd notion-mcp-server
npm install
npm run build

调试方式

  1. 确保已正确配置 Notion API Token
  2. 运行服务器后,尝试查询或更新 Notion 页面
  3. 检查日志输出以排查问题

配置 Notion 集成

  1. 访问 https://www.notion.so/my-integrations
  2. 点击 "New integration"
  3. 命名为 "Claude MCP Server"
  4. 为 "Pages" 选择 "Read" 和 "Write" 权限
  5. 复制 "Integration Token"

配置 Claude 集成

编辑 claude_desktop_config.json 文件:

{
  "mcpServers": {
    "notion-mcp-server": {
      "command": "node",
      "args": [
        "Copy Path"
      ],
      "env": {
        "NOTION_API_TOKEN": "Your Notion Token"
      }
    }
  }
}

使用方法

  1. 编写提示语来查询 Notion 页面
  2. 在提示语中添加 Notion 页面链接
  3. 示例提示语: "Make a new Database entry in notion with this list of movies to watch in 2024" "Page link https://www.notion.so/154916e48026802f97d4df6086787817" "Add the movie database in this page"

许可证

None