Notion MCP(模型上下文协议)服务器旨在为用户提供便捷的Notion页面及数据库管理功能,通过一系列API接口,可轻松实现页面的搜索、创建、编辑等操作,极大提升了信息管理效率。
要使用Notion MCP服务器,需完成安装与配置,以下是详细步骤:
使用以下命令克隆项目仓库:
git clone https://github.com/yourusername/notion-mcp-server.git
确保安装了以下工具:
进入项目目录后,运行命令:
npm install
或者
yarn install
在项目的config.json文件中添加你的Notion API密钥:
{
"notion": {
"apiKey": "your_notion_api_key_here"
}
}
Notion MCP服务器提供了丰富的功能,满足多样化的Notion使用需求:
POST /api/pages
Content-Type: application/json
{
"title": "新建页面标题",
"content": "页面内容描述..."
}
GET /api/databases/{databaseId}/query
Query-Param: {
"filter": {
"property": "状态",
"select": {
"equals": "完成"
}
},
"sort": {
"property": "创建时间",
"direction": "ascending"
}
}
如果遇到问题,请检查以下内容:
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log