Notion-MCP:Notion API 的 MCP 客户端
一个简单的 MCP 服务器,集成 Notion API 管理个人习惯追踪。
快速入门
- 安装工具:
使用 pip 安装:
pip install notion-mcp
或从源码安装:git clone https://github.com/phoenine/Notion-MCP.git cd Notion-MCP pip install -e .
- 配置环境:
创建
.env
文件,添加以下内容:NOTION_TOKEN=your_notion_token_here ROOT_PAGE_ID=your_root_page_id_here
- 启动服务:
运行命令启动服务器:
notion-mcp-server --host 0.0.0.0 --port 8000
- 使用 API:
发送 POST 请求到
http://localhost:8000/notion
,示例:curl -X POST http://localhost:8000/notion \ -H "Content-Type: application/json" \ -d '{"root_page_id": "your_page_id_here", "operation": {"type": "fill_web_url"}}'