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. 设置此服务器
下载存储库
选项 A:下载为 ZIP 格式(推荐给初学者)
前往 GitHub 存储库: https://github.com/Sjotie/notionMCP/
点击右上角的绿色“代码”按钮
选择“下载 ZIP”
下载后,将 ZIP 文件解压到计算机上的某个位置
Windows:右键单击 ZIP 文件并选择“全部提取”
Mac:双击 ZIP 文件进行解压
选项 B:使用 Git 克隆(适用于熟悉 Git 的用户)
打开命令提示符或终端
Windows:按
Win+R,键入cmd,然后按 Enter 键Mac:从“应用程序”>“实用程序”打开终端
导航到您想要存储存储库的位置
cd path/to/desired/location克隆存储库
git clone https://github.com/Sjotie/notionMCP/
导航到项目目录
下载或克隆后,您需要使用cd (更改目录)命令导航到项目文件夹:
如果您下载了 ZIP(选项 A):
打开命令提示符或终端
使用
cd命令导航到解压 ZIP 文件的位置:cd path/to/extracted/folder/notionMCP例如:
在 Windows 上:
cd C:\Users\YourName\Downloads\notionMCP在 Mac 上:
cd /Users/YourName/Downloads/notionMCP
如果您使用 Git 克隆(选项 B):
该存储库应该被克隆到名为“notionMCP”的文件夹中
如果克隆后仍位于同一个终端窗口中,只需输入:
cd notionMCP
如何知道您在正确的目录中:
使用
cd命令后,您可以检查当前位置:在 Windows 上:输入
dir并按 Enter - 您应该会看到类似server.js文件在 Mac 上:输入
ls并按 Enter - 您应该会看到类似server.js文件
安装依赖项
进入 notionMCP 目录后,安装所需的依赖项:
npm install这将安装所有必需的 Node.js 软件包。您应该会看到一个进度条,最后会显示一条消息,提示安装已完成。它可能会显示类似“X 个软件包正在寻求资金”之类的信息——这完全正常,表示安装成功了。
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
| Name | Required | Description | Default |
|---|---|---|---|
| block_id | Yes | ID of the parent block (page or block) | |
| children | Yes | List of block objects to append | |
| after | No | Optional ID of an existing block to append after |
create-databaseC
Create a new database
| Name | Required | Description | Default |
|---|---|---|---|
| parent_id | Yes | ID of the parent page | |
| title | Yes | Database title as rich text array | |
| properties | Yes | Database properties schema | |
| icon | No | Optional icon for the database | |
| cover | No | Optional cover for the database |
create-pageC
Create a new page in a database
| Name | Required | Description | Default |
|---|---|---|---|
| parent_id | Yes | ID of the parent database | |
| properties | Yes | Page properties | |
| children | No | Optional content blocks |
get-blockC
Retrieve a block by its ID
| Name | Required | Description | Default |
|---|---|---|---|
| block_id | Yes | ID of the block to retrieve |
get-block-childrenC
Retrieve the children blocks of a block
| Name | Required | Description | Default |
|---|---|---|---|
| block_id | Yes | ID of the block (page or block) | |
| start_cursor | No | Cursor for pagination | |
| page_size | No | Number of results per page |
get-pageC
Retrieve a page by its ID
| Name | Required | Description | Default |
|---|---|---|---|
| page_id | Yes | ID of the page to retrieve |
list-databasesB
List all databases the integration has access to
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
query-databaseC
Query a database
| Name | Required | Description | Default |
|---|---|---|---|
| database_id | Yes | ID of the database to query | |
| filter | No | Optional filter criteria | |
| sorts | No | Optional sort criteria | |
| start_cursor | No | Optional cursor for pagination | |
| page_size | No | Number of results per page |
searchC
Search Notion for pages or databases
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Search query string | |
| filter | No | Optional filter criteria | |
| sort | No | Optional sort criteria | |
| start_cursor | No | Cursor for pagination | |
| page_size | No | Number of results per page |
update-blockC
Update a block's content or archive status
| Name | Required | Description | Default |
|---|---|---|---|
| block_id | Yes | ID of the block to update | |
| block_type | Yes | The type of block (paragraph, heading_1, to_do, etc.) | |
| content | Yes | The content for the block based on its type | |
| archived | No | Whether to archive (true) or restore (false) the block |
update-databaseC
Update an existing database
| Name | Required | Description | Default |
|---|---|---|---|
| database_id | Yes | ID of the database to update | |
| title | No | Optional new title as rich text array | |
| description | No | Optional new description as rich text array | |
| properties | No | Optional updated properties schema |
update-pageC
Update an existing page
| Name | Required | Description | Default |
|---|---|---|---|
| page_id | Yes | ID of the page to update | |
| properties | Yes | Updated page properties | |
| archived | No | Whether to archive the page |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
12 tool updates
v1.0.0- Added
append-block-children - Added
create-database - Added
create-page - Added
get-block - Added
get-block-children - Added
get-page - Added
list-databases - Added
query-database - Added
search - Added
update-block - Added
update-database - Added
update-page
TDQS
Scored across 12 tools
Each tool has a clearly distinct purpose targeting specific Notion resources (blocks, databases, pages) and actions (create, get, update, list, query, search, append). There is no overlap or ambiguity between tools, as they cover different resource-action combinations with precise scopes.
All tools follow a consistent verb-noun pattern using kebab-case (e.g., create-database, update-page, get-block). The naming is predictable and uniform across all 12 tools, with verbs like create, get, update, list, query, search, and append consistently applied to appropriate nouns.
With 12 tools, the server is well-scoped for managing Notion's core entities (blocks, databases, pages). Each tool earns its place by covering essential CRUD and query operations without redundancy, making it neither too sparse nor overloaded for the domain.
The tool set provides complete CRUD/lifecycle coverage for Notion's main resources: databases (create, update, list, query), pages (create, get, update), and blocks (get, update, append, get children). It also includes search functionality, leaving no obvious gaps for agent workflows in this domain.
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.105,011 npm3MIT
- AlicenseCqualityDmaintenanceA Model Context Protocol (MCP) server that exposes the official Notion SDK, allowing AI models to interact with Notion workspaces.1726 npm10Apache 2.0
- AlicenseAqualityDmaintenanceA 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.125,011 npm1MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides a standardized interface for AI models to access, query, and modify content in Notion workspaces.5,011 npm4MIT