Notion AI 交互服务器添加福利群:解决AI开发者的「MCP实战痛点」这是一个模型上下文协议 (MCP) 服务器,它暴露了官方的 Notion SDK,允许 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 文件而不是直接传递 API 密钥:
.env 文件:NOTION_API_KEY=your-notion-integration-key
npx @ramidecodes/mcp-server-notion@latest -y
您还可以在 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
如果您遇到“创建客户端失败”的错误:
cmd /c有关每个工具的详细文档,请参阅 工具文档。
本项目根据 Apache License 2.0 许可发布 - 详情请参阅 LICENSE 文件。