Not MCP 服务器
用于 Notion 集成的模型上下文协议服务器,允许 Claude 和其他 LLM 与您的 Notion 工作区进行交互。
特征
- 搜索 Notion :搜索整个 Notion 工作区
- 获取页面:从特定 Notion 页面检索内容
- 创建页面:在 Notion 工作区中创建新页面
- 更新页面:使用新内容或标题更新现有页面
- 创建数据库:使用自定义属性创建新数据库
- 查询数据库:使用过滤器和排序查询数据库
- 更新数据库条目:更新数据库条目的属性
- 创建数据库行:使用自定义属性向现有数据库添加新行
设置
- 克隆此存储库
- 安装依赖项
- 配置你的 Notion API 密钥
- 在Notion 开发者门户中创建集成
- 复制您的 API 密钥
- 您可以:
- 编辑
.env
文件并将your_notion_api_key_here
替换为你的实际 API 密钥,或者 - 直接在 Claude for Desktop 配置中传递它(推荐,见下文)
- 编辑
- 构建服务器
- 运行服务器
使用 Claude for Desktop 进行设置
- 安装 Claude for Desktop(如果尚未安装)
- 打开您的 Claude for Desktop App 配置:
- 在 macOS 上:
~/Library/Application Support/Claude/claude_desktop_config.json
- 如果文件不存在,则创建该文件
- 在 macOS 上:
- 将 Notion 服务器添加到您的配置中:代替:
/Users/shaheerahmad/Documents/notion-mcp-server
以及项目目录的完整路径YOUR_ACTUAL_API_KEY_HERE
替换为您的实际 Notion API 密钥
- 重启 Claude 桌面版
使用服务器
一旦连接到 Claude for Desktop,您可以通过向 Claude 询问以下问题来使用服务器:
- “在我的 Notion 工作区中搜索会议记录”
- “获取我的项目规划页面内容”(您需要页面 ID)
- “在 Notion 中创建一个包含任务列表的新页面”
- “更新我的 Notion 页面(ID 为 1aaada269d1b8003adceda69cf7bcd97),内容为‘这是要添加到页面的一些新内容。’”
- “在我的 Notion 页面中创建一个新的数据库,ID 为 1aaada269d1b8003adceda69cf7bcd97”
- “查询 ID 为 1aaada269d1b8003adceda69cf7bcd97 的 Notion 数据库,查找状态为‘已完成’的项目”
Claude 将根据您的请求自动使用适当的工具。
工具使用示例
搜索概念
获取页面内容
创建新页面
更新现有页面
您还可以更新标题:
创建新数据库
查询数据库
您还可以添加排序:
更新数据库条目
更新现有数据库条目(数据库内的页面)的属性。
properties
参数应与 Notion API 针对数据库中特定属性类型所期望的结构相匹配。不同的属性类型(文本、选择、日期等)需要不同的格式。
创建数据库行
使用自定义属性向现有数据库添加新行。
properties
参数必须包含数据库的所有必需属性,并遵循每种属性类型的 Notion API 结构。
故障排除
- 如果工具没有显示,请检查 Claude for Desktop 日志:
- 确保您的 Notion API 密钥已正确设置,并且您的集成已被授予访问您想要交互的页面的权限。
- 如果您在日志中看到“意外令牌”错误,则可能是 console.log 语句干扰了 MCP 协议。此版本的服务器已更新,以避免出现此类问题。
未来的改进
- 添加数据库查询功能
- 实施更好的内容格式
- 添加对更多块类型的支持
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
模型上下文协议服务器使 Claude 和其他 LLM 能够与 Notion 工作区交互,提供搜索、检索、创建和更新页面以及管理数据库等功能。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that gives LLMs the ability to interact with Ethereum networks, manage wallets, query blockchain data, and execute smart contract operations through a standardized interface.Last updated -313232TypeScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server that provides a standardized interface for interacting with Notion's API, enabling users to list databases, create pages, and search across their Notion workspace.Last updated -95PythonMIT License
- AsecurityFlicenseAqualityA Model Context Protocol server that connects AI assistants like Claude to Notion workspaces, enabling them to view, search, create, and update Notion databases, pages, and content blocks.Last updated -12194JavaScript
- AsecurityAlicenseAqualityA Model Context Protocol server that fetches up-to-date, version-specific documentation and code examples from libraries directly into LLM prompts, helping developers get accurate answers without outdated or hallucinated information.Last updated -290,38513,947JavaScriptMIT License