Notion MCP Server - MCP服务,MCP服务器,MCP教程

基本能力

产品定位

Notion MCP Server 是一个用于与 Notion 工作区进行交互的中间件,旨在通过标准化的工具集实现语言模型与 Notion 的无缝集成。

核心功能

  1. 页面操作
  2. 搜索 Notion 工作区
  3. 创建带有丰富 Markdown 内容的新页面
  4. 读取页面内容并格式化
  5. 更新现有页面
  6. 添加和检索评论
  7. 块级操作(更新、删除)

  8. 增强的 Markdown 支持

  9. 多级标题(H1-H3)
  10. 支持语言的代码块
  11. 带有复选框状态的交互式待办事项
  12. 多行支持的块引用
  13. 水平分隔线
  14. 带有标题的图像
  15. 嵌套项目符号

  16. 数据库操作

  17. 创建和管理数据库
  18. 添加和更新数据库项
  19. 使用过滤器和排序进行查询
  20. 支持多种属性类型(标题、富文本、数字、选择、多选、日期、复选框等)

适用场景

  • 自动化 Notion 内容管理
  • 集成 Notion 到语言模型工作流
  • 批量处理 Notion 页面和数据库
  • 开发基于 Notion 的自动化工具

工具列表

  1. 页面操作工具
  2. 搜索页面
  3. 读取页面
  4. 创建页面
  5. 更新页面

  6. 数据库操作工具

  7. 创建数据库
  8. 查询数据库

常见问题解答

  1. 如何设置 Notion 访问权限?
  2. 创建 Notion 集成并配置适当的权限
  3. 将集成连接到需要访问的页面

  4. 如何更新页面内容?

  5. 使用 update_page 工具,提供页面 ID 和新内容

  6. 如何查询数据库?

  7. 使用 query_database 工具,提供数据库 ID 和可选过滤器和排序条件

使用教程

使用依赖

  1. Node.js (v16 或更高版本)
  2. Notion API 密钥
  3. MCP 兼容客户端(如 Claude Desktop)

安装教程

  1. 克隆仓库:
    bash
    git clone https://github.com/v-3/notion-server.git
    cd notion-server

  2. 安装依赖:
    bash
    npm install

  3. 设置环境:
    ```bash
    echo "NOTION_API_KEY=your_notion_api_key_here" > .env

或直接导出

export NOTION_API_KEY=your_notion_api_key_here
```

  1. 构建服务器:
    bash
    npm run build

调试方式

  1. 更新 Claude Desktop 配置:
    json
    {
    "mcpServers": {
    "notion": {
    "command": "node",
    "args": ["/absolute/path/to/notion-server/build/index.js"],
    "env": {
    "NOTION_API_KEY": "your_notion_api_key_here"
    }
    }
    }
    }

  2. 重启 Claude Desktop 应用更改

  3. 测试创建页面:
    typescript
    const result = await notion.create_page({
    parentPageId: "page_id",
    title: "My Page",
    content: "# Welcome\nThis is a test page."
    });

点击访问

搜索工具

MCP Compass 🧭 - MCP服务,MCP服务器,MCP教程

2025-4-29 12:16:40

搜索工具

AWS Model Context Protocol (MCP) Server - MCP服务,MCP服务器,MCP教程

2025-4-29 12:16:48

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索