Notion MCP server

Integrates with Notion to enable creating, reading, updating, and deleting pages and databases for automated note-taking, task management, and knowledge base maintenance.
Back to servers
Setup instructions
Provider
Ankit Arre
Release date
Dec 06, 2024
Language
TypeScript

This MCP server allows you to integrate Claude with Notion, enabling you to query and modify Notion pages directly through Claude. The server acts as a bridge between Claude's AI capabilities and your Notion workspace.

Installation

First, clone the repository and navigate to the project directory:

git clone https://github.com/arre-ankit/notion-mcp-server.git
cd notion-mcp-server

Then install the required dependencies:

npm install

Once dependencies are installed, build the server:

npm run build

Configuration

Setting Up Notion Integration

  1. Go to https://www.notion.so/my-integrations
  2. Click on "New integration"
  3. Name it "Claude MCP Server"
  4. Select "Read" and "Write" permissions for "Pages"
  5. Copy the "Integration Token" (you'll need this in the next step)

Connecting Claude to the MCP Server

Create or edit your claude_desktop_config.json file with the following configuration:

{
  "mcpServers": {
    "notion-mcp-server": {
      "command": "node",
      "args": [
        "Path/to/your/notion-mcp-server/dist/index.js"
      ],
      "env": {
        "NOTION_API_TOKEN": "Your Notion Token"
      }
    }
  }
}

Make sure to:

  • Replace "Path/to/your/notion-mcp-server/dist/index.js" with the actual path to the built server file
  • Replace "Your Notion Token" with the Integration Token you copied from Notion

Usage Examples

Querying Notion Pages

You can ask Claude to retrieve information from a specific Notion page by including the page link in your prompt:

Can you summarize the content of this Notion page?
Page link: https://www.notion.so/your-page-id

Creating Content in Notion

You can ask Claude to create new content in Notion. For example, to create a new database:

Make a new Database entry in notion with a list of movies to watch in 2024
Page link: https://www.notion.so/your-page-id

Updating Existing Pages

To update existing content, simply provide the page link and specify what needs to be changed:

Update the meeting notes on this page with today's discussion summary
Page link: https://www.notion.so/your-page-id

When you send these prompts to Claude, the MCP server will process the request and make the appropriate changes to your Notion workspace. The changes will appear directly in your Notion pages.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "notion-mcp-server" '{"command":"node","args":["Copy Path"],"env":{"NOTION_API_TOKEN":"Your Notion Token"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

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.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "notion-mcp-server": {
            "command": "node",
            "args": [
                "Copy Path"
            ],
            "env": {
                "NOTION_API_TOKEN": "Your Notion Token"
            }
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "notion-mcp-server": {
            "command": "node",
            "args": [
                "Copy Path"
            ],
            "env": {
                "NOTION_API_TOKEN": "Your Notion Token"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later