MCP HubMCP Hub
Sjotie

notionMCP

by: Sjotie

Node based Notion MCP server

8created 28/02/2025
Visit
Node
Notion

📌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

  1. Go to https://www.notion.so/my-integrations
  2. Click the blue "+ New integration" button
  3. Fill in the details:
    • Name: Choose a name like "Claude Assistant" or "AI Helper"
    • Associated workspace: Select your Notion workspace
  4. Click "Submit"
  5. On the next page, find the "Internal Integration Token" section
  6. 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)

  1. Go to the GitHub repository: https://github.com/Sjotie/notionMCP/
  2. Click the green "Code" button at the top right
  3. Select "Download ZIP"
  4. Extract the ZIP file to a location on your computer

Option B: Clone with Git (For users familiar with Git)

  1. Open a command prompt or terminal
  2. Navigate to where you want to store the repository
    cd path/to/desired/location
    
  3. 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:

  1. Open Notion and navigate to a page or database
  2. Click the "•••" (three dots) in the top-right corner
  3. Select "Add connections"
  4. Find and select the integration you created
  5. Repeat for other pages or databases you want accessible

4. Connecting to Claude Desktop

  1. Locate your Claude Desktop configuration file:

    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
  2. 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"
      }
    }
  }
}
  1. 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
  2. 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
  • "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

Getting Help

If issues persist:

  • Check console output for errors
  • Verify your Notion API key validity
  • Confirm integration access to pages/databases

License

MIT