notionMCP
by: Sjotie
Node based Notion MCP server
📌Overview
Purpose: To facilitate seamless integration between AI assistants and Notion workspaces, enabling efficient interaction with databases, pages, and content blocks.
Overview: The Notion MCP Server is a Model Context Protocol server that serves as a bridge connecting AI assistants, like Claude, to your Notion workspace. This integration enhances productivity by allowing AI to directly access and manage Notion content.
Key Features:
-
Database Management: AI assistants can view, search, and query databases, enhancing the ability to retrieve relevant information quickly.
-
Page and Block Control: The server enables AI to create, update, and manage Notion pages and blocks efficiently, allowing for quick content modifications and updates.
Notion MCP Server
A Model Context Protocol (MCP) server that connects Claude and other AI assistants to your Notion workspace. This integration allows AI assistants to interact with your Notion databases, pages, and blocks.
What is this?
This tool acts as a bridge between AI assistants (like Claude) and your Notion workspace. It allows the AI to:
- View and search your Notion databases
- Create and update pages
- Manage content blocks
- And much more!
Step-by-Step Setup Guide
Prerequisites
- Node.js (version 14 or higher)
- A Notion account
- Claude Desktop app (if using with Claude)
1. Getting Your Notion API Key
- Go to https://www.notion.so/my-integrations
- Click the blue "+ New integration" button
- Fill in the details:
- Name: Choose a name like "Claude Assistant" or "AI Helper"
- Associated workspace: Select your Notion workspace
- Click "Submit"
- On the next page, find the "Internal Integration Token" section
- Click "Show" and copy the token (it starts with
secret_
)
2. Setting Up This Server
Download the Repository
Option A: Download as ZIP (Recommended for beginners)
- Go to the GitHub repository: https://github.com/Sjotie/notionMCP/
- Click the green "Code" button at the top right
- Select "Download ZIP"
- Extract the ZIP file to a location on your computer
Option B: Clone with Git (For users familiar with Git)
- Open a command prompt or terminal
- Navigate to where you want to store the repository
cd path/to/desired/location
- Clone the repository
git clone https://github.com/Sjotie/notionMCP/
Navigate to the Project Directory
After downloading or cloning, navigate to the project folder:
If you downloaded the ZIP:
cd path/to/extracted/folder/notionMCP
If you cloned with Git:
cd notionMCP
You can verify you are in the right directory by checking for files like server.js
.
Install Dependencies
Once in the project directory, run:
npm install
This installs all necessary Node.js packages.
3. Connecting to Notion Pages
Notion requires you to explicitly grant access to each page or database:
- Open Notion and navigate to a page or database
- Click the "•••" (three dots) in the top-right corner
- Select "Add connections"
- Find and select the integration you created
- Repeat for other pages or databases you want accessible
4. Connecting to Claude Desktop
-
Locate your Claude Desktop configuration file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Mac:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
-
Open the file in a text editor. If it doesn't exist, create it with this content:
{
"mcpServers": {
"notion": {
"command": "node",
"args": [
"C:\\path\\to\\notion-mcp-server\\server.js"
],
"env": {
"NOTION_API_KEY": "your_notion_api_key_here"
}
}
}
}
-
Replace paths and API key accordingly:
- For Windows: Use double backslashes in the path
- For Mac: Use forward slashes
- Replace
"your_notion_api_key_here"
with your actual Notion API key
-
Save the file and restart Claude Desktop
5. Testing the Connection
Start a new conversation in Claude and ask it to interact with your Notion workspace, for example:
- "Show me a list of my Notion databases"
- "Create a new page in my Tasks database with title 'Test Task'"
Available Tools
The server provides these tools to AI assistants:
- list-databases: View all accessible databases
- query-database: Get entries from a database
- create-page: Add a new page to a database
- update-page: Modify an existing page
- create-database: Create a new database
- update-database: Modify a database structure
- get-page: View a specific page
- get-block-children: View content blocks
- append-block-children: Add content to a page
- update-block: Edit content blocks
- get-block: View a specific block
- search: Find content across your workspace
Troubleshooting
Common Issues
-
"Connection failed" in Claude
- Ensure the server path in
claude_desktop_config.json
is correct - Verify your Notion API key is valid
- Confirm Node.js is installed
- Ensure the server path in
-
"Access denied" when accessing Notion content
- Make sure you've shared the page/database with your integration
- Check that your API key has necessary permissions
-
Server won't start
- Ensure dependencies are installed by running
npm install
- Check that the
.env
file exists with your API key
- Ensure dependencies are installed by running
Getting Help
If issues persist:
- Check console output for errors
- Verify your Notion API key validity
- Confirm integration access to pages/databases
License
MIT