1.注册Notion
2.注册后打开页面
https://www.notion.so/profile/integrations
点击新集成
内部集成秘钥就是Notion 集成
3.在MCP配置中添加配置
{
"mcpServers": {
"notion": {
"command": "/opt/homebrew/bin/notion-mcp-server",
"args": ["--transport", "stdio"],
"env": {
"NOTION_TOKEN": "ntn_139545828518TeVMmCTv06mQO9jcEy9xVnIIbmWP"
}
}
}
}
4.获取Notion中文本的id
获取到的链接
https://www.notion.so/welcome-27933fc20943801c9e71f71447c4f5?source=copy_link
- 和 ?之间的是pageId,读取Notion pageId 27933fc20943801c9e71f71447c4f 的文章生成工具RequestUtil,调用即可
输出结果
同时读到内容,会根据内容进行下一步操作