The Notion MCP Server enables Claude and other LLMs to interact with your Notion workspace through the Model Context Protocol, providing capabilities like searching, creating, and updating pages and databases.
Clone the repository
Install dependencies
npm install
Configure your Notion API key
.env
file or pass it directly in the Claude Desktop configuration (recommended)Build the server
npm run build
Start the server
npm start
Install Claude for Desktop if you haven't already
Locate or create your Claude for Desktop App configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
Add the Notion server to your configuration:
{
"mcpServers": {
"notion": {
"command": "node",
"args": [
"/path/to/your/notion-mcp-server/dist/index.js",
"--notion-api-key=YOUR_ACTUAL_API_KEY_HERE"
]
}
}
}
Make sure to replace:
/path/to/your/notion-mcp-server
with the full path to your project directoryYOUR_ACTUAL_API_KEY_HERE
with your actual Notion API keyRestart Claude for Desktop
Once configured, you can interact with your Notion workspace by asking Claude questions. The server automatically selects the appropriate tool based on your request.
Search across your entire Notion workspace:
Search for "meeting notes" in my Notion workspace
Get the content of my Notion page with ID 1aaada269d1b8003adceda69cf7bcd97
Create a new page in Notion with title "Weekly Report" and content "This week we accomplished the following tasks..."
Update my Notion page with ID 1aaada269d1b8003adceda69cf7bcd97 with content "Adding this new information to the page."
You can also update the title:
Update my Notion page with ID 1aaada269d1b8003adceda69cf7bcd97 with title "New Title" and content "New content to add."
Create a new database in my Notion page with ID 1aaada269d1b8003adceda69cf7bcd97 with title "Task Tracker" and properties {
"Task Name": { "title": {} },
"Status": {
"select": {
"options": [
{ "name": "Not Started", "color": "red" },
{ "name": "In Progress", "color": "yellow" },
{ "name": "Completed", "color": "green" }
]
}
},
"Priority": {
"select": {
"options": [
{ "name": "Low", "color": "blue" },
{ "name": "Medium", "color": "yellow" },
{ "name": "High", "color": "red" }
]
}
},
"Due Date": { "date": {} }
}
Query my Notion database with ID 1aaada269d1b8003adceda69cf7bcd97 with filter {
"property": "Status",
"select": {
"equals": "Completed"
}
}
You can also add sorting:
Query my Notion database with ID 1aaada269d1b8003adceda69cf7bcd97 with sort {
"property": "Due Date",
"direction": "ascending"
}
Update properties of an existing database entry:
{
"tool_name": "update-database-entry",
"tool_params": {
"pageId": "page_id_of_database_entry",
"properties": {
"Status": {
"select": {
"name": "Completed"
}
},
"Priority": {
"select": {
"name": "High"
}
},
"Due Date": {
"date": {
"start": "2023-12-31"
}
}
}
}
}
Add a new row to an existing database:
{
"tool_name": "create-database-row",
"tool_params": {
"databaseId": "your_database_id_here",
"properties": {
"Name": {
"title": [
{
"text": {
"content": "New Task"
}
}
]
},
"Status": {
"select": {
"name": "Not Started"
}
},
"Priority": {
"select": {
"name": "Medium"
}
},
"Due Date": {
"date": {
"start": "2023-12-15"
}
},
"Notes": {
"rich_text": [
{
"text": {
"content": "This is a new task created via the API"
}
}
]
}
}
}
}
If tools aren't showing up, check the Claude for Desktop logs:
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
Ensure your Notion API key is correctly set and that your integration has been granted access to the pages you want to interact with.
If you see "Unexpected token" errors in the logs, console.log statements might be interfering with the MCP protocol.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.