本项目是一个用于实现 Claude AI 和 Notion 工作区之间无缝集成的 Model Context Protocol (MCP) 服务器,支持读写功能,能让 Claude AI 与 Notion 高效协作。
npm install
在项目根目录创建一个 .env
文件,包含你的 Notion API 密钥:
NOTION_API_KEY=your_api_key_here
此步骤仅在你开发服务器时需要。
构建服务器,准备由 Claude 使用。
npm run build
如果你正在开发服务器,可以运行 npm run dev
或 npm run inspect
。
打开 claude_desktop_config.json
(导航至 Settings > Developer
并点击 Edit Config
),添加以下内容:
"notion": {
"command": "node",
"args": [
"path/to/mcp-server-notion/dist/index.js"
],
"env": {
"NOTION_API_KEY": "your_notion_api_key_here"
}
}
重启 Claude 后,你就可以开始使用了!
该项目旨在构建一个 MCP 服务器,连接 Claude AI 和 Notion 工作区,允许 Claude:
见“快速开始”部分。
该 MCP 服务器提供以下工具:
search_notion
: 使用查询字符串在 Notion 整个工作区中搜索get_notion_page
: 获取特定 Notion 页面的详细内容get_notion_database
: 获取 Notion 数据库的元数据和架构query_notion_database
: 支持复杂查询,在 Notion 数据库中搜索和过滤条目该项目在 MIT 许可证下发布,详细信息见 LICENSE 文件。
欢迎贡献!请随意提交 Pull Request。