- Notion MCP Server
Notion MCP Server
Content
Notion MCP Server
A simple MCP (Model-Controller-Persistence) server implementation for Notion integration. This server provides a REST API that wraps around the Notion API, making it easier to interact with Notion databases and pages.
Prerequisites
- Node.js (v14 or higher)
- Notion API key (Integration Token)
- Notion database ID
Setup
-
Clone this repository:
git clone https://github.com/KingGuizzard/notion-mcp.git cd notion-mcp -
Install dependencies:
npm install -
Create a
.envfile based on the.env.example:cp .env.example .env -
Edit the
.envfile and add your Notion API key and database ID:NOTION_API_KEY=your_notion_api_key_here NOTION_DATABASE_ID=your_notion_database_id_here PORT=3000
How to Get a Notion API Key
- Go to Notion Integrations
- Click "New integration"
- Give your integration a name and select the workspace where you want to use it
- Copy the "Internal Integration Token"
Connecting to a Notion Database
- Create a new database in Notion or use an existing one
- Share the database with your integration:
- Open the database in Notion
- Click the "..." menu in the top right
- Click "Add connections"
- Search for your integration name and select it
- Copy the database ID from the URL. The database ID is the part of the URL after the workspace name and before the query parameters:
https://www.notion.so/workspace/your-database-id?v=...
Starting the Server
Run the following command to start the server:
npm start
The server will start on port 3000 (or the port specified in your .env file).
Available Endpoints
Databases
GET /api/notion/databases/:databaseId- Query a databasePOST /api/notion/databases/:databaseId/pages- Create a new page in a database
Pages
GET /api/notion/pages/:pageId- Get a pagePATCH /api/notion/pages/:pageId- Update a page
Blocks
GET /api/notion/blocks/:blockId/children- Get block childrenPOST /api/notion/blocks/:blockId/children- Add block childrenDELETE /api/notion/blocks/:blockId- Delete a block
Search
POST /api/notion/search- Search Notion
Example Usage
Query a database
curl -X GET http://localhost:3000/api/notion/databases/your-database-id
Create a new page in a database
curl -X POST http://localhost:3000/api/notion/databases/your-database-id/pages \
-H "Content-Type: application/json" \
-d '{
"properties": {
"Name": {
"title": [
{
"text": {
"content": "New task"
}
}
]
},
"Status": {
"select": {
"name": "To Do"
}
}
}
}'
License
MIT
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Tavily Mcp
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Amap Maps高德地图官方 MCP Server
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
WindsurfThe new purpose-built IDE to harness magic
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Playwright McpPlaywright MCP server
Serper MCP ServerA Serper MCP Server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
CursorThe AI Code Editor
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
DeepChatYour AI Partner on Desktop
ChatWiseThe second fastest AI chatbot™
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code