Notion MCP 服务器是一个提供官方 Notion SDK 的 Model Context Protocol (MCP) 服务器,它允许 AI 模型与 Notion 工作区进行交互,为 AI 与 Notion 数据的结合提供了便利。
为了让你的集成访问 Notion 内容,你需要将页面或数据库显式地共享给它,具体步骤如下:
⚠️ 重要提示
集成只能访问显式共享给它的页面和数据库。子页面会自动继承其父页面的权限。
你可以将此 MCP 服务器添加到 Claude Desktop、Cursor AI 或 Claude.ai,使用以下配置格式之一:
npx @ramidecodes/mcp-server-notion@latest -y --api-key=your-notion-integration-key
{
"mcpServers": {
"Notion": {
"command": "npx",
"args": [
"@ramidecodes/mcp-server-notion@latest",
"-y",
"--api-key=your-notion-integration-key"
]
}
}
}
请将 your-notion-integration-key
替换为你从步骤1复制的 API 键。
该服务器提供与 Notion 交互的工具:
有关每个工具的详细文档,请参阅 工具文档。
创建一个名为 .env
的文件,并添加以下内容:
NOTION_API_KEY=your-notion-integration-key
然后在项目根目录运行命令以应用设置:
source .env
本项目根据 Apache License 2.0 许可,具体请参阅 LICENSE 文件。