Node based Notion MCP server
What is Sjotie notionMCP
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"
- Logo: Optional
- 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"
- Once downloaded, extract the ZIP file to a location on your computer
- Windows: Right-click the ZIP file and select "Extract All"
- Mac: Double-click the ZIP file to extract
Option B: Clone with Git (For users familiar with Git)
- Open a command prompt or terminal
- Windows: Press
Win+R
, typecmd
, and press Enter - Mac: Open Terminal from Applications > Utilities
- Windows: Press
- 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, you need to navigate to the project folder using the cd
(change directory) command:
If you downloaded the ZIP (Option A):
-
Open a command prompt or terminal
-
Use the
cd
command to navigate to where you extracted the ZIP file:cd path/to/extracted/folder/notionMCP
For example:
- On Windows:
cd C:\Users\YourName\Downloads\notionMCP
- On Mac:
cd /Users/YourName/Downloads/notionMCP
- On Windows:
If you cloned with Git (Option B):
- The repository should have been cloned into a folder named "notionMCP"
- If you're still in the same terminal window after cloning, simply type:
cd notionMCP
How to know you're in the right directory:
- After using the
cd
command, you can check your current location:- On Windows: Type
dir
and press Enter - you should see files likeserver.js
- On Mac: Type
ls
and press Enter - you should see files likeserver.js
- On Windows: Type
Install Dependencies
Once you're in the notionMCP directory, install the required dependencies:
npm install
This will install all the necessary Node.js packages. You should see a progress bar and eventually a message indicating the installation is finished. It might say something along the lines of "X Packages are looking for funding" - this is completely normal and means it worked.
3. Connecting to Notion Pages
For security, Notion requires you to explicitly grant access to each page or database:
- Open Notion and navigate to a page or database you want the AI to access
- Click the "•••" (three dots) in the top-right corner
- Select "Add connections"
- Find and select the integration you created earlier
- Repeat for any other pages or databases you want to make accessible
4. Connecting to Claude Desktop
-
Locate your Claude Desktop configuration file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
(Type this path in File Explorer address bar) - Mac:
~/Library/Application Support/Claude/claude_desktop_config.json
(In Finder, press Cmd+Shift+G and paste this path)
- Windows:
-
Open the file in a text editor. If it doesn't exist, create it with the following content:
{ "mcpServers": { "notion": { "command": "node", "args": [ "C:\\path\\to\\notion-mcp-server\\server.js" ], "env": { "NOTION_API_KEY": "your_notion_api_key_here" } } } }
-
Replace:
C:\\path\\to\\notion-mcp-server\\server.js
with the actual path to the server.js file- Windows: Use double backslashes (\\) in the path
- Mac: Use forward slashes (/)
your_notion_api_key_here
with your Notion API key
-
Save the file and restart Claude Desktop
5. Testing the Connection
- Start a new conversation in Claude
- Ask Claude 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
- Make sure the server path in claude_desktop_config.json is correct
- Check that your Notion API key is valid
- Ensure Node.js is installed
-
"Access denied" when accessing Notion content
- Make sure you've shared the page/database with your integration
- Check that your API key has the necessary permissions
-
Server won't start
- Ensure all dependencies are installed (
npm install
) - Check that the .env file exists with your API key
- Ensure all dependencies are installed (
Getting Help
If you encounter issues not covered here, please:
- Check the console output for error messages
- Ensure your Notion API key is valid
- Verify that your integration has access to the pages/databases
License
MIT
Leave a Comment
Frequently Asked Questions
What is MCP?
MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.
What are MCP Servers?
MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.
How do MCP Servers work?
MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.
Are MCP Servers secure?
Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.
Related MCP Servers
chrisdoc hevy mcp
sylphlab pdf reader mcp
An MCP server built with Node.js/TypeScript that allows AI agents to securely read PDF files (local or URL) and extract text, metadata, or page counts. Uses pdf-parse.
aashari mcp server atlassian bitbucket
Node.js/TypeScript MCP server for Atlassian Bitbucket. Enables AI systems (LLMs) to interact with workspaces, repositories, and pull requests via tools (list, get, comment, search). Connects AI directly to version control workflows through the standard MCP interface.
aashari mcp server atlassian confluence
Node.js/TypeScript MCP server for Atlassian Confluence. Provides tools enabling AI systems (LLMs) to list/get spaces & pages (content formatted as Markdown) and search via CQL. Connects AI seamlessly to Confluence knowledge bases using the standard MCP interface.
prisma prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
Zzzccs123 mcp sentry
mcp sentry for typescript sdk
zhuzhoulin dify mcp server
zhongmingyuan mcp my mac
zhixiaoqiang desktop image manager mcp
MCP 服务器,用于管理桌面图片、查看详情、压缩、移动等(完全让Trae实现)
zhixiaoqiang antd components mcp
An MCP service for Ant Design components query | 一个减少 Ant Design 组件代码生成幻觉的 MCP 服务,包含系统提示词、组件文档、API 文档、代码示例和更新日志查询
Submit Your MCP Server
Share your MCP server with the community
Submit Now