Notion MCP server

Integrates Notion workspaces, enabling seamless interaction with Notion's API for tasks like automated note-taking and knowledge base management.
Back to servers
Provider
suekou
Release date
Feb 01, 2025
Language
TypeScript
Stats
4 stars

This MCP server allows Claude to interact with Notion workspaces through the Notion API. It provides tools for creating, retrieving, updating, and deleting content in Notion, enabling seamless integration between Claude and your Notion documents, pages, and databases.

Installation

To set up the Notion MCP server, follow these steps:

1. Create a Notion Integration

  • Visit the Notion Your Integrations page
  • Click "New Integration"
  • Name your integration and select appropriate permissions (such as "Read content", "Update content")

2. Get Your Secret Key

  • Copy the "Internal Integration Token" from your newly created integration
  • Keep this token secure as it will be used for authentication

3. Connect the Integration to Your Workspace

  • Open the specific Notion page or database you want to access
  • Click the navigation button in the top right corner
  • Click "Connect to" button and select your integration

4. Configure Claude Desktop

Add the following to your claude_desktop_config.json file:

{
  "mcpServers": {
    "notion": {
      "command": "node",
      "args": ["your-built-file-path"],
      "env": {
        "NOTION_API_TOKEN": "your-integration-token"
      }
    }
  }
}

Replace "your-built-file-path" with the path to the Notion MCP server file and "your-integration-token" with the integration token you copied earlier.

Available Tools

The Notion MCP server provides the following tools for interacting with your Notion workspace:

Working with Blocks

  • notion_append_block_children: Add child blocks to a parent block
  • notion_retrieve_block: Get information about a specific block
  • notion_retrieve_block_children: Get a list of a block's children
  • notion_delete_block: Remove a block

Working with Pages

  • notion_retrieve_page: Get information about a specific page
  • notion_update_page_properties: Update a page's properties

Working with Databases

  • notion_create_database: Create a new database
  • notion_query_database: Query data from a database
  • notion_retrieve_database: Get information about a specific database
  • notion_update_database: Update a database's properties
  • notion_create_database_item: Add a new item to a database

Usage Examples

Retrieving a Notion Page

To retrieve information about a specific page:

const result = await notion_retrieve_page({
  page_id: "your-page-id-here"
});

Creating a Database Item

To create a new item in a database:

const result = await notion_create_database_item({
  database_id: "your-database-id-here",
  properties: {
    "Name": {
      "title": [
        {
          "text": {
            "content": "New task"
          }
        }
      ]
    },
    "Status": {
      "select": {
        "name": "In progress"
      }
    }
  }
});

Querying a Database

To query items from a database with filtering:

const result = await notion_query_database({
  database_id: "your-database-id-here",
  filter: {
    property: "Status",
    select: {
      equals: "In progress"
    }
  },
  sorts: [
    {
      property: "Created time",
      direction: "descending"
    }
  ],
  page_size: 50
});

Troubleshooting

If you encounter permission errors:

  • Ensure your integration has the required permissions in Notion
  • Verify that the integration is connected to the specific pages or databases you're trying to access
  • Check that your token is correctly set in the claude_desktop_config.json file
  • Make sure you're using the correct IDs for blocks, pages, and databases

For more detailed guidance, refer to:

How to add this MCP server to 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 > MCP and click "Add new global MCP server".

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

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

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

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