Not MCP 服务器
用于 Notion 集成的模型上下文协议 (MCP) 服务器实现,提供与 Notion API 交互的标准化接口。兼容 Claude Desktop 和其他 MCP 客户端。
特征
列出并查询 Notion 数据库
创建和更新页面
在 Notion 工作区中搜索
获取数据库详细信息并阻止子项
通过 httpx 提供完整的 async/await 支持
使用 Pydantic v2 模型实现类型安全
通过详细的日志记录正确处理错误
与 MCP 1.6.0 兼容
安装
克隆存储库:
创建虚拟环境并安装依赖项(使用 uv):
或者,使用标准 venv:
在项目根目录中创建一个
.env
文件:
用法
测试服务器(它应该正常运行):
要将其与 Claude Desktop 一起使用,请调整您的
claude_desktop_config.json
文件(位于 macOS 上的~/Library/Application Support/Claude/claude_desktop_config.json
):
请务必将/Users/username/
替换为您的实际主目录路径。
发展
项目结构
运行测试
配置
服务器需要 Notion 集成令牌。设置方法如下:
创建具有适当功能的新集成(根据需要读/写)
复制集成令牌
将其添加到项目根目录中的
.env
文件中:
通过集成共享您的 Notion 数据库(从数据库的“共享”菜单)
贡献
分叉存储库
创建你的功能分支(
git checkout -b feature/amazing-feature
)提交您的更改(
git commit -m 'Add some amazing feature'
)推送到分支(
git push origin feature/amazing-feature
)打开拉取请求
执照
MIT 许可证 - 使用风险自负
故障排除
常见问题
连接错误:请确保您的 Notion API 密钥正确并且您可以访问互联网
权限错误:确保您的集成已获得您尝试访问的数据库的访问权限
Claude Desktop 集成:如果 Claude Desktop 未连接,请检查您的配置路径是否正确,以及服务器是否正在运行且未记录到 stdout
致谢
专为与 Claude Desktop 和其他 MCP 客户端配合使用而设计
使用 Notion 的 API(最新兼容版本 2022-02-22)
保持 MCP 1.6.0 兼容性
特别感谢danhilse ,我参考了他的notion-mcp-server项目
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
模型上下文协议服务器提供与 Notion API 交互的标准化接口,使用户能够列出数据库、创建页面并在他们的 Notion 工作区中进行搜索。
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityA 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.Last updated -102383
- AsecurityFlicenseAqualityA 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.Last updated -122381
- -securityAlicense-qualityA Model Context Protocol server that provides a standardized interface for AI models to access, query, and modify content in Notion workspaces.Last updated -2384MIT License
- -securityAlicense-qualityA Model Context Protocol server that synchronizes Markdown files with Notion pages without using LLM tokens, enabling direct interaction with Notion databases and pages through API calls.Last updated -48MIT License