Notion MCP Server
Not MCP 服务器
公开官方 Notion SDK 的模型上下文协议 (MCP) 服务器,允许 AI 模型与 Notion 工作区交互。
快速入门
1. 设置你的 Notion 集成
创建新集成
复制 API 密钥
2. 将你的 Notion 页面连接到集成
为了让您的集成能够访问 Notion 内容,您需要明确地与其共享您的页面或数据库:
导航到您想要通过集成访问的 Notion 页面或数据库
点击右上角的“分享”按钮
在“添加人员、群组或集成”字段中,从下拉列表中选择您的集成
点击“邀请”
对每个想要访问的页面或数据库重复此操作
**注意:**集成只能访问已明确与其共享的页面和数据库。子页面会自动继承父页面的访问权限。
3. 添加到你的AI助手
您可以使用以下任一配置格式将此 MCP 服务器添加到 Claude Desktop、Cursor AI 或 Claude.ai:
命令行格式
npx @ramidecodes/mcp-server-notion@latest -y --api-key=your-notion-integration-keyJSON 配置格式
{
"mcpServers": {
"Notion": {
"command": "npx",
"args": [
"@ramidecodes/mcp-server-notion@latest",
"-y",
"--api-key=your-notion-integration-key"
]
}
}
}将your-notion-integration-key替换为步骤 1 中的 API 密钥。
设置说明
Claude Desktop :设置 > 高级 > 模型上下文协议
光标 AI :设置 > AI > MCP 服务器
Claude.ai(Web) :配置文件 > 设置 > API 和集成 > 模型上下文协议
Related MCP server: Notion MCP Server
可用工具
服务器提供了与 Notion 交互的工具:
搜索:查找页面或数据库
数据库:查询和检索数据库条目
页面:创建、检索和更新页面
块:管理内容块(段落、列表等)
用户:列出用户并获取用户信息
评论:创建并列出评论
链接预览:为 URL 创建链接预览
替代设置方法
使用环境变量
您可以使用.env文件,而不是直接传递 API 密钥:
创建
.env文件:
NOTION_API_KEY=your-notion-integration-key运行服务器:
npx @ramidecodes/mcp-server-notion@latest -y带有环境变量的 JSON 配置(适用于 Claude Desktop)
您还可以使用 JSON 配置格式的环境变量:
{
"mcpServers": {
"Notion": {
"command": "npx",
"args": [
"@ramidecodes/mcp-server-notion@latest",
"-y",
"--api-key=your-notion-integration-key"
]
}
}
}命令行选项
OPTIONS:
-h, --help Show help message
-v, --version Show version information
--verbose Enable verbose logging
--env-path <path> Path to .env file
--api-key <key> Notion API key
-y Skip confirmation prompts故障排除
如果遇到“无法创建客户端”错误:
在 Windows 上,尝试在 npx 命令之前使用
cmd /c在 macOS/Linux 上,尝试使用 npx 的完整路径
在将命令添加到 AI 助手之前,请在终端中测试该命令
常见问题
“无法访问资源”错误:确保您已与您的集成共享特定的 Notion 页面或数据库(请参阅步骤 2)
集成未出现在共享菜单中:请尝试刷新页面或重新启动浏览器
功能受限:检查您的集成是否在 Notion 集成设置中启用了适当的功能
特征
通过官方 SDK 提供完整的 Notion API 支持
符合 MCP 规范,可实现无缝 AI 集成
适用于所有 Notion 操作的综合工具
强大的错误处理功能,提供详细的消息
使用环境变量轻松配置
有关每个工具的详细文档,请参阅工具文档。
执照
该项目根据 Apache License 2.0 获得许可 - 有关详细信息,请参阅LICENSE文件。
Available Tools
17 toolsappend-blocksD
Inputs: block_id (required), children (required).
create-commentD
Inputs: page_id (required), text (required), discussion_id.
create-link-previewD
Inputs: url (required), page_id.
create-pageD
Inputs: parent_type (required), parent_id (required), properties (required), children.
delete-blockD
Inputs: block_id (required).
get-blockD
Inputs: block_id (required).
get-block-childrenD
Inputs: block_id (required), page_size, start_cursor.
get-databaseD
Inputs: database_id (required).
get-meD
Inputs: no named parameters.
get-pageD
Inputs: page_id (required).
get-userD
Inputs: user_id (required).
list-commentsD
Inputs: page_id, block_id, start_cursor, page_size.
list-usersD
Inputs: no named parameters.
query-databaseD
Inputs: database_id (required), filter, sorts, page_size, +1 more.
searchD
Inputs: query, filter_object_type, page_size.
update-blockD
Inputs: block_id (required), properties (required).
update-pageD
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 17 tools
Each tool has a clearly distinct purpose targeting specific Notion resources and actions. For example, get-block vs get-block-children vs update-block are clearly differentiated, and there's no overlap between operations like create-page, update-page, and get-page.
All tools follow a consistent verb-noun pattern with kebab-case naming throughout (e.g., create-page, get-block, query-database). The naming convention is perfectly uniform across all 17 tools.
17 tools is slightly high but reasonable for a comprehensive Notion API integration. It covers multiple resource types (pages, blocks, databases, users, comments) with appropriate operations, though it might feel slightly heavy compared to more minimal implementations.
The tool set provides excellent coverage of Notion's core functionality including CRUD operations for pages, blocks, and comments, plus database querying, user management, and search. Minor gaps might include missing operations like deleting pages or databases, but agents can work around these limitations.
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…
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
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
- AlicenseNot gradedqualityDmaintenanceA 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.109MIT
- 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.121MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides a standardized interface for AI models to access, query, and modify content in Notion workspaces.4MIT