{"type":"mcp_server","name":"notion-mcp-server","description":"Notion MCP Server: Manages Model Context Protocol for enhanced data integration & communication with Notion.","category":"Developer Tools","language":"TypeScript","stars":4473,"forks":204,"owner":"makenotion","github_url":"https://github.com/makenotion/notion-mcp-server","homepage":null,"setup":"## Setup\n\nThese instructions detail how to set up and install the Notion MCP Server.\n\n### Prerequisites\n\n*   A Notion account.\n*   Node.js and npm (Node Package Manager) installed (for npm installation).\n*   Docker installed (for Docker installation).\n*   Cursor or Claude Desktop client installed.\n\n### Installation Steps\n\n#### 1. Create a Notion Integration\n\n1.  Go to your Notion integrations page: [https://www.notion.so/profile/integrations](https://www.notion.so/profile/integrations).\n2.  Click \"Create new integration\".\n3.  Give your integration a name.  Choose an **Internal** integration.\n4.  Submit the form.\n5.  **Important:** Copy the \"Internal Integration Token\" (also referred to as the \"secret\"). You'll need this later.\n\n    ![Copying your Integration token from the Configuration tab in the developer portal](https://github.com/user-attachments/assets/67b44536-5333-49fa-809c-59581bf5370a)\n\n#### 2. Configure Integration Capabilities (Optional, but Recommended)\n\nFor security, limit the integration's capabilities.\n\n1.  In your integration settings (same page as the token), go to the \"Capabilities\" section.\n2.  Consider setting the integration to \"Read content\" only if you only need read access.  This minimizes potential risks.\n\n    ![Notion Integration Token Capabilities showing Read content checked](docs/images/integrations-capabilities.png)\n\n#### 3. Connect Notion Pages and Databases to Your Integration\n\nThe integration needs access to specific pages and databases.\n\n1.  **Method 1: Integration Settings:**\n    *   In your integration settings, go to the \"Access\" tab.\n    *   Click \"Edit access\".\n    *   Select the specific pages and databases you want to grant access to.\n\n    ![Integration Access tab](docs/images/integration-access.png)\n\n    ![Edit integration access](docs/images/page-access-edit.png)\n\n2.  **Method 2: Individual Page Access:**\n    *   Navigate to the specific Notion page.\n    *   Click the three dots (<code>...</code>) in the top right corner.\n    *   Select \"Connections\".\n    *   Find your integration in the list and connect it.\n\n    ![Adding Integration Token to Notion Connections](docs/images/connections.png)\n\n#### 4. Configure Your Client (Cursor or Claude Desktop)\n\nYou'll need to add the MCP server configuration to your client's configuration file. This file is typically located at `.cursor/mcp.json` for Cursor, or `~/Library/Application\\ Support/Claude/claude_desktop_config.json` for Claude Desktop (MacOS).\n\nChoose one of the following installation methods:\n\n##### Option 1: Using npm (Node Package Manager)\n\n1.  Add the following configuration to your client's configuration file (`.cursor/mcp.json` or `claude_desktop_config.json`):\n\n    ```json\n    {\n      \"mcpServers\": {\n        \"notionApi\": {\n          \"command\": \"npx\",\n          \"args\": [\"-y\", \"@notionhq/notion-mcp-server\"],\n          \"env\": {\n            \"OPENAPI_MCP_HEADERS\": \"{\\\"Authorization\\\": \\\"Bearer YOUR_NOTION_INTEGRATION_TOKEN\\\", \\\"Notion-Version\\\": \\\"2022-06-28\\\" }\"\n          }\n        }\n      }\n    }\n    ```\n\n2.  **Replace `YOUR_NOTION_INTEGRATION_TOKEN` with your actual Notion integration token (the \"secret\" you copied in step 1).**\n\n##### Option 2: Using Docker\n\n###### Option 2a: Using the Official Docker Hub Image\n\n1.  Add the following configuration to your client's configuration file (`.cursor/mcp.json` or `claude_desktop_config.json`):\n\n    ```json\n    {\n      \"mcpServers\": {\n        \"notionApi\": {\n          \"command\": \"docker\",\n          \"args\": [\n            \"run\",\n            \"--rm\",\n            \"-i\",\n            \"-e\", \"OPENAPI_MCP_HEADERS\",\n            \"mcp/notion\"\n          ],\n          \"env\": {\n            \"OPENAPI_MCP_HEADERS\": \"{\\\"Authorization\\\":\\\"Bearer YOUR_NOTION_INTEGRATION_TOKEN\\\",\\\"Notion-Version\\\":\\\"2022-06-28\\\"}\"\n          }\n        }\n      }\n    }\n    ```\n\n2.  **Replace `YOUR_NOTION_INTEGRATION_TOKEN` with your actual Notion integration token (the \"secret\" you copied in step 1).**\n\n###### Option 2b: Building the Docker Image Locally\n\n1.  Clone the repository (if you haven't already).\n2.  Build the Docker image:\n\n    ```bash\n    docker-compose build\n    ```\n\n3.  Add the following configuration to your client's configuration file (`.cursor/mcp.json` or `claude_desktop_config.json`):\n\n    ```json\n    {\n      \"mcpServers\": {\n        \"notionApi\": {\n          \"command\": \"docker\",\n          \"args\": [\n            \"run\",\n            \"--rm\",\n            \"-i\",\n            \"-e\",\n            \"OPENAPI_MCP_HEADERS={\\\"Authorization\\\": \\\"Bearer YOUR_NOTION_INTEGRATION_TOKEN\\\", \\\"Notion-Version\\\": \\\"2022-06-28\\\"}\",\n            \"notion-mcp-server\"\n          ]\n        }\n      }\n    }\n    ```\n\n4.  **Replace `YOUR_NOTION_INTEGRATION_TOKEN` with your actual Notion integration token (the \"secret\" you copied in step 1).**\n\n##### Option 3: Installing via Smithery\n\n1.  Run the following command in your terminal:\n\n    ```bash\n    npx -y @smithery/cli install @makenotion/notion-mcp-server --client claude\n    ```\n\n### Environment Variables\n\nThe primary environment variable is:\n\n*   `OPENAPI_MCP_HEADERS`: This variable contains the authentication information for the Notion API.  It's a JSON string containing the `Authorization` header (with your integration token) and the `Notion-Version` header.  This variable is set within the client configuration file (e.g., `.cursor/mcp.json` or `claude_desktop_config.json`).\n\n    Example:\n\n    ```json\n    \"env\": {\n      \"OPENAPI_MCP_HEADERS\": \"{\\\"Authorization\\\": \\\"Bearer YOUR_NOTION_INTEGRATION_TOKEN\\\", \\\"Notion-Version\\\": \\\"2022-06-28\\\" }\"\n    }\n    ```\n\n    **Important:** Replace `YOUR_NOTION_INTEGRATION_TOKEN` with your actual Notion integration token.","tools":"## Available Tools\n\nThe Notion MCP Server provides tools tailored for AI agents to interact with the Notion API, optimized for token consumption. Here's a breakdown of the available tools and their usage:\n\n*   **Search:**  Allows the AI agent to search for pages or databases within the connected Notion workspace.\n    *   Example Usage:  The AI agent can use this tool to find a specific page by its title before adding a comment.\n*   **Comments:** Enables the AI agent to add comments to specific pages in Notion.\n    *   Example Usage: `Comment \"Hello MCP\" on page \"Getting started\"` will result in the AI agent adding the comment \"Hello MCP\" to the page titled \"Getting started\".\n*   **Page Creation:**  Allows the AI agent to create new pages within the connected Notion workspace. The agent can specify the title and the parent page for the new page.\n    *   Example Usage: `Add a page titled \"Notion MCP\" to page \"Development\"` will create a new page titled \"Notion MCP\" under the page titled \"Development\".\n*   **Content Retrieval:** Enables the AI agent to retrieve the content of a specific page or database, given its ID.\n    *   Example Usage: `Get the content of page 1a6b35e6e67f802fa7e1d27686f017f2` will retrieve the content of the Notion page with the ID `1a6b35e6e67f802fa7e1d27686f017f2`.","faq":null,"created_at":"2025-03-10T18:09:08+00:00","updated_at":"2025-07-07T16:32:14+00:00","source_url":"https://model-context-protocol.com/servers/notion-mcp-server","related_articles":[]}