Notion MCP Server
Not MCP 服务器
模型上下文协议 (MCP) 服务器,用于将 Claude 和其他 AI 助手连接到您的 Notion 工作区。此集成允许 AI 助手与您的 Notion 数据库、页面和块进行交互。
这是什么?
此工具充当 AI 助手(如 Claude)和 Notion 工作区之间的桥梁。它允许 AI 执行以下操作:
查看和搜索您的 Notion 数据库
创建和更新页面
管理内容块
还有更多!
Related MCP server: Notion MCP Server
分步设置指南
先决条件
Node.js (版本 14 或更高版本)
Notion 帐户
Claude 桌面应用程序(如果与 Claude 一起使用)
1. 获取 Notion API 密钥
点击蓝色的**“+ 新集成”**按钮
填写详细信息:
名称:选择一个名称,例如“Claude Assistant”或“AI Helper”
徽标:可选
关联工作区:选择您的 Notion 工作区
点击**“提交”**
在下一页上,找到**“内部集成令牌”**部分
单击**“显示”**并复制令牌(以
secret_开头)
2. 设置此服务器
将此存储库下载到您的计算机
如果你有 Git:
git clone [repository-url]或者下载并解压 ZIP 文件
打开命令提示符或终端
Windows:按
Win+R,键入cmd,然后按 Enter 键Mac:从“应用程序”>“实用程序”打开终端
导航到下载此存储库的文件夹:
cd path/to/notion-mcp-server安装所需的依赖项:
npm install创建配置文件:
复制
.env.example并将其命名为.env在文本编辑器中打开
.env文件将
your_notion_api_key_here替换为您之前复制的令牌保存文件
3. 连接到 Notion 页面
为了安全起见,Notion 要求您明确授予对每个页面或数据库的访问权限:
打开 Notion 并导航到您希望 AI 访问的页面或数据库
点击右上角的**“•••”** (三个点)
选择**“添加连接”**
查找并选择您之前创建的集成
对您想要访问的任何其他页面或数据库重复此操作
4. 连接到 Claude Desktop
找到您的 Claude Desktop 配置文件:
Windows:
%APPDATA%\Claude\claude_desktop_config.json(在文件资源管理器地址栏中输入此路径)Mac:
~/Library/Application Support/Claude/claude_desktop_config.json(在 Finder 中,按 Cmd+Shift+G 并粘贴此路径)
在文本编辑器中打开该文件。如果该文件不存在,请使用以下内容创建它:
{ "mcpServers": { "notion": { "command": "node", "args": [ "C:\\path\\to\\notion-mcp-server\\server.js" ], "env": { "NOTION_API_KEY": "your_notion_api_key_here" } } } }代替:
C:\\path\\to\\notion-mcp-server\\server.js替换为 server.js 文件的实际路径Windows:在路径中使用双反斜杠 (\\)
Mac:使用正斜杠 (/)
your_notion_api_key_here为您的 Notion API 密钥
保存文件并重新启动Claude Desktop
5.测试连接
在 Claude 中开始新对话
让 Claude 与您的 Notion 工作区进行交互,例如:
“显示我的 Notion 数据库列表”
“在我的任务数据库中创建一个标题为‘测试任务’的新页面”
可用工具
服务器为AI助手提供以下工具:
list-databases :查看所有可访问的数据库
查询数据库:从数据库中获取条目
create-page :向数据库添加新页面
update-page :修改现有页面
create-database :创建一个新的数据库
update-database :修改数据库结构
get-page :查看特定页面
get-block-children :查看内容块
append-block-children :向页面添加内容
update-block :编辑内容块
get-block :查看特定块
搜索:在整个工作区中查找内容
故障排除
常见问题:
克劳德的“连接失败”
确保 claude_desktop_config.json 中的服务器路径正确
检查您的 Notion API 密钥是否有效
确保 Node.js 正确安装
访问 Notion 内容时出现“访问被拒绝”
确保您已与集成共享页面/数据库
检查您的 API 密钥是否具有必要的权限
服务器无法启动
确保所有依赖项都已安装(
npm install)检查 .env 文件是否存在以及您的 API 密钥
获取帮助
如果您遇到此处未涵盖的问题,请:
检查控制台输出的错误消息
确保您的 Notion API 密钥有效
验证您的集成是否可以访问页面/数据库
执照
麻省理工学院
Available Tools
12 toolsappend-block-childrenC
Append blocks to a parent block
Inputs: block_id (required), children (required), after.
create-databaseC
Create a new database
Inputs: parent_id (required), properties (required), title (required), cover, +1 more.
create-pageC
Create a new page in a database
Inputs: parent_id (required), properties (required), children.
get-blockC
Retrieve a block by its ID
Inputs: block_id (required).
get-block-childrenC
Retrieve the children blocks of a block
Inputs: block_id (required), page_size, start_cursor.
get-pageC
Retrieve a page by its ID
Inputs: page_id (required).
list-databasesB
List all databases the integration has access to
Inputs: no named parameters.
query-databaseC
Query a database
Inputs: database_id (required), filter, page_size, sorts, +1 more.
searchC
Search Notion for pages or databases
Inputs: filter, page_size, query, sort, +1 more.
update-blockC
Update a block's content or archive status
Inputs: block_id (required), block_type (required), content (required), archived.
update-databaseC
Update an existing database
Inputs: database_id (required), description, properties, title.
update-pageC
Update an existing page
Inputs: page_id (required), properties (required), archived.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool has a clearly distinct purpose targeting specific Notion resources and actions, with no overlap that would cause confusion. For example, 'get-block' retrieves a single block, 'get-block-children' retrieves child blocks, and 'append-block-children' adds new blocks, making them easily distinguishable.
All tools follow a consistent verb-noun pattern with hyphens separating words, such as 'create-database', 'update-page', and 'query-database'. This predictable naming convention enhances readability and agent usability without any deviations or mixed styles.
With 12 tools, this server is well-scoped for managing Notion's core resources like pages, blocks, and databases. Each tool earns its place by covering essential CRUD operations and specific functionalities like searching and querying, avoiding both bloat and thin coverage.
The tool set provides complete CRUD and lifecycle coverage for Notion's domain, including creation, retrieval, updating, and querying of pages, blocks, and databases. There are no obvious gaps, as it supports all major workflows from basic operations to advanced features like searching and appending blocks.
Maintenance
Related MCP Connectors
Hosted Notion MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Hosted Airtable MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Official Fibery MCP server: query and update your workspace from any AI client via OAuth.
Related MCP Servers
- AlicenseDqualityDmaintenanceA Model Context Protocol server that enables Claude and other LLMs to interact with Notion workspaces, providing capabilities like searching, retrieving, creating and updating pages, as well as managing databases.103ISC
- AlicenseCqualityDmaintenanceA Model Context Protocol (MCP) server that exposes the official Notion SDK, allowing AI models to interact with Notion workspaces.1735 npm10Apache 2.0
- AlicenseBqualityDmaintenanceA Model Context Protocol server that connects Claude and other AI assistants to your Notion workspace, allowing AIs to interact with databases, pages, and blocks.12011MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides a standardized interface for AI models to access, query, and modify content in Notion workspaces.4MIT