Notion API MCP server

Bridges to the Notion API for searching content, querying databases, and managing pages and comments without requiring complex API interaction code
Back to servers
Setup instructions
Provider
Notion
Release date
Apr 11, 2025
Language
TypeScript
Package
Stats
141.0K downloads
2.6K stars

The Notion MCP Server provides an implementation of the Model Context Protocol (MCP) for the Notion API, allowing AI assistants to interact with your Notion workspace through natural language commands. This integration lets you search, create content, and manipulate your Notion data seamlessly.

Installation

Setting Up Integration in Notion

  1. Go to Notion Integrations and create a new internal integration or select an existing one.

  2. For security reasons, consider limiting the capabilities of your integration. You can create a read-only integration by selecting only "Read content" access in the "Configuration" tab.

Connecting Content to Integration

You need to connect your Notion pages and databases to your integration:

  1. Visit the Access tab in your internal integration settings
  2. Edit access and select the pages you want to use

Alternatively, you can grant access individually by:

  1. Visiting the target page
  2. Clicking the 3 dots menu
  3. Selecting "Connect to integration"

Adding MCP Config to Your Client

Using npm

For Cursor & Claude:

Add the following to your .cursor/mcp.json or claude_desktop_config.json (MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "notionApi": {
      "command": "npx",
      "args": ["-y", "@notionhq/notion-mcp-server"],
      "env": {
        "OPENAPI_MCP_HEADERS": "{\"Authorization\": \"Bearer ntn_****\", \"Notion-Version\": \"2022-06-28\" }"
      }
    }
  }
}

For Zed:

Add the following to your settings.json:

{
  "context_servers": {
    "some-context-server": {
      "command": {
        "path": "npx",
        "args": ["-y", "@notionhq/notion-mcp-server"],
        "env": {
          "OPENAPI_MCP_HEADERS": "{\"Authorization\": \"Bearer ntn_****\", \"Notion-Version\": \"2022-06-28\" }"
        }
      },
      "settings": {}
    }
  }
}

Using Docker

Option 1: Using the official Docker Hub image:

Add the following to your .cursor/mcp.json or claude_desktop_config.json:

{
  "mcpServers": {
    "notionApi": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e", "OPENAPI_MCP_HEADERS",
        "mcp/notion"
      ],
      "env": {
        "OPENAPI_MCP_HEADERS": "{\"Authorization\":\"Bearer ntn_****\",\"Notion-Version\":\"2022-06-28\"}"
      }
    }
  }
}

Option 2: Building the Docker image locally:

First, build the Docker image:

docker-compose build

Then, add the following to your configuration:

{
  "mcpServers": {
    "notionApi": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "OPENAPI_MCP_HEADERS={\"Authorization\": \"Bearer ntn_****\", \"Notion-Version\": \"2022-06-28\"}",
        "notion-mcp-server"
      ]
    }
  }
}

Important: In all configurations, replace ntn_**** with your integration secret from the integration configuration tab.

Installing via Smithery

You can also install Notion API Server for Claude Desktop automatically using Smithery:

npx -y @smithery/cli install @makenotion/notion-mcp-server --client claude

Usage Examples

Here are some examples of how to use the Notion MCP Server with natural language commands:

Example 1: Commenting on a Page

Using the instruction:

Comment "Hello MCP" on page "Getting started"

The AI will correctly plan two API calls, v1/search and v1/comments, to accomplish this task.

Example 2: Creating a New Page

With the instruction:

Add a page titled "Notion MCP" to page "Development"

The system will create a new page named "Notion MCP" under the parent page "Development".

Example 3: Direct ID Reference

You can also reference content by ID directly:

Get the content of page 1a6b35e6e67f802fa7e1d27686f017f2

This will retrieve the content from the specified page ID.

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 "notionApi" '{"command":"npx","args":["-y","@notionhq/notion-mcp-server"],"env":{"OPENAPI_MCP_HEADERS":"{\"Authorization\": \"Bearer ntn_****\", \"Notion-Version\": \"2022-06-28\" }"}}'

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": {
        "notionApi": {
            "command": "npx",
            "args": [
                "-y",
                "@notionhq/notion-mcp-server"
            ],
            "env": {
                "OPENAPI_MCP_HEADERS": "{\"Authorization\": \"Bearer ntn_****\", \"Notion-Version\": \"2022-06-28\" }"
            }
        }
    }
}

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": {
        "notionApi": {
            "command": "npx",
            "args": [
                "-y",
                "@notionhq/notion-mcp-server"
            ],
            "env": {
                "OPENAPI_MCP_HEADERS": "{\"Authorization\": \"Bearer ntn_****\", \"Notion-Version\": \"2022-06-28\" }"
            }
        }
    }
}

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