MCP HubMCP Hub
suekou

mcp-notion-server

by: suekou

mcp notion server

324created 30/11/2024
Visit
notion

📌Overview

Purpose: To enable Claude to interact seamlessly with Notion workspaces using the MCP Server for the Notion API.

Overview: The Notion MCP Server facilitates the integration of Claude with Notion, allowing users to manage and manipulate Notion content programmatically. This server provides a straightforward setup process, making it easy to authenticate and configure necessary tools for enhanced interaction with Notion's features.

Key Features:

  • Integration Setup: Simplifies creating a Notion integration, retrieving API tokens, and adding the integration to the workspace, enhancing accessibility and ease of use.

  • Experimental Markdown Conversion: Offers an option to convert responses to Markdown format, reducing token consumption and improving readability for viewing content while maintaining the capability to retrieve data in JSON for modifications.


Notion MCP Server

MCP Server for the Notion API, enabling Claude to interact with Notion workspaces.

Setup

Create a Notion Integration

  1. Visit the Notion Integrations page.
  2. Click "New Integration".
  3. Name your integration and select appropriate permissions (e.g., "Read content", "Update content").

Retrieve the Secret Key

  • Copy the "Internal Integration Token" from your integration. This token will be used for authentication.

Add the Integration to Your Workspace

  1. Open the page or database you want the integration to access in Notion.
  2. Click the "···" button in the top right corner.
  3. Click the "Connections" button, and select your integration.

Configure Claude Desktop

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "notion": {
      "command": "npx",
      "args": ["-y", "@suekou/mcp-notion-server"],
      "env": {
        "NOTION_API_TOKEN": "your-integration-token"
      }
    }
  }
}

Environment Variables

  • NOTION_API_TOKEN: Your Notion API integration token (required).
  • NOTION_MARKDOWN_CONVERSION: Set to "true" to enable experimental Markdown conversion.

Advanced Configuration

Markdown Conversion

You can enable experimental Markdown conversion to reduce token consumption:

{
  "mcpServers": {
    "notion": {
      "command": "npx",
      "args": ["-y", "@suekou/mcp-notion-server"],
      "env": {
        "NOTION_API_TOKEN": "your-integration-token",
        "NOTION_MARKDOWN_CONVERSION": true
      }
    }
  }
}

When NOTION_MARKDOWN_CONVERSION is set to "true", responses will be converted to Markdown format, enhancing readability and reducing token consumption.

Troubleshooting

If you encounter permission errors:

  1. Ensure the integration has the required permissions.
  2. Verify that the integration is invited to the relevant pages or databases.
  3. Confirm that your token and configuration in claude_desktop_config.json are correct.

Tools

All tools support the following optional parameter:

  • format: Controls the response format ("json" or "markdown", default: "markdown").

Available Tools

  1. notion_append_block_children

    • Appends child blocks to a parent block.
  2. notion_retrieve_block

    • Retrieves information about a specific block.
  3. notion_retrieve_block_children

    • Retrieves children of a specific block.
  4. notion_delete_block

    • Deletes a specific block.
  5. notion_retrieve_page

    • Retrieves information about a specific page.
  6. notion_update_page_properties

    • Updates properties of a page.
  7. notion_create_database

    • Creates a new database.
  8. notion_query_database

    • Queries a database.
  9. notion_retrieve_database

    • Retrieves information about a specific database.
  10. notion_update_database

    • Updates information about a database.
  11. notion_create_database_item

    • Creates a new item in a Notion database.
  12. notion_search

    • Searches pages or databases by title.
  13. notion_list_all_users

    • Lists all users in the Notion workspace.
  14. notion_retrieve_user

    • Retrieves a specific user by user_id.
  15. notion_retrieve_bot_user

    • Retrieves the bot user associated with the current token.
  16. notion_create_comment

    • Creates a comment in Notion.
  17. notion_retrieve_comments

    • Retrieves a list of unresolved comments from a Notion page or block.

License

This MCP server is licensed under the MIT License. You are free to use, modify, and distribute the software, subject to the terms of the MIT License.