MCP Notion Server

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Provides tools for interacting with Notion databases and pages, enabling CRUD operations on Notion content, querying databases with filters, managing page properties, and working with blocks. Also offers AI-powered tools for content analysis, summarization, and tag suggestion.

mcp-notion-服务器

用于 Notion 集成的模型上下文协议服务器

这款基于 TypeScript 的 MCP 服务器在 Claude 和 Notion 之间搭建了桥梁,允许与 Notion 的数据库和页面无缝交互。它通过以下方式演示了 MCP 的核心概念:

  • Notion 页面和数据库的资源管理
  • 用于 Notion 内容 CRUD 操作的工具
  • 人工智能驱动的内容分析提示

特征

资源

  • 通过 URI 访问 Notion 页面和数据库
  • 支持纯文本和富文本内容类型
  • 从 Notion 属性中提取元数据

工具

数据库操作

  • list_databases - 列出所有可访问的 Notion 数据库
  • create_database - 使用自定义属性创建新数据库
  • query_database - 搜索和过滤数据库条目
  • update_database - 修改数据库属性和模式

页面操作

  • create_page - 在数据库中创建新页面或作为子页面
    • 支持标题、属性和 markdown 内容
  • update_page - 更新现有页面属性
  • get_page检索页面内容和元数据
  • delete_page - 从数据库或父页面中删除页面

块操作

  • append_blocks - 向页面添加新块
  • delete_blocks - 从页面中删除块
  • get_blocks - 检索块内容
  • update_blocks - 修改现有块内容

提示

  • summarize_notes - 生成简明的笔记摘要
  • analyze_content - 提供对页面内容的见解和分析
  • suggest_tags - 根据内容推荐相关标签

设置

先决条件

  • Node.js 18 或更高版本
  • Notion API 密钥和集成设置
  • Claude桌面应用程序

与 Claude Desktop 集成

创建概念集成:

  1. 访问 Notion 您的集成页面。
  2. 点击“新集成”。
  3. 命名您的集成并选择适当的权限(例如,“阅读内容”,“更新内容”)。
  4. 检索密钥:
  5. 从您的集成中复制“内部集成令牌”。此令牌将用于身份验证。
  6. 将集成添加到您的工作区:
  7. 在 Notion 中打开您希望集成访问的页面或数据库。
  8. 单击右上角的导航按钮。
  9. 单击“连接到”按钮并选择您的集成。

配置设置

将服务器配置添加到 Claude Desktop:

MacOS

~/Library/Application Support/Claude/claude_desktop_config.json

窗户

%APPDATA%/Claude/claude_desktop_config.json

配置内容:

{ "mcpServers": { "mcp-notion-server": { "command": "npx", "args": [ "-y", "@gabornyerges/mcp-notion-server" ], "env": { "NOTION_API_KEY": "your-notion-api-key" } } } }

调试

由于 MCP 服务器通过 stdio 进行通信,调试起来可能比较困难。我们推荐使用MCP Inspector ,它以包脚本的形式提供:

  1. MCP 检查器
npm run inspector

MIT 许可证 - 详情请参阅许可证

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Claude AI 与 Notion 之间的桥梁,使用户能够通过自然语言与 Notion 数据库和页面进行交互,支持创建、阅读、更新和删除内容等操作。

  1. Features
    1. Resources
    2. Tools
    3. Prompts
  2. Setup
    1. Prerequisites
  3. Integration with Claude Desktop
    1. Configuration Setup
    2. Debugging
ID: stxohtlgox