Get the FREE Ultimate OpenClaw Setup Guide →

notion

Official Notion MCP Server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio makenotion-notion-mcp-server npx -y @notionhq/notion-mcp-server \
  --env NOTION_TOKEN="your Notion integration token (recommended)" \
  --env OPENAPI_MCP_HEADERS="optional: JSON string with Authorization and Notion-Version headers"

How to use

This MCP server provides remote access to the Notion API via the Notion MCP server. It enables AI tools to interact with Notion content by exposing data-source related operations such as querying data sources (databases), retrieving metadata, creating and updating data sources, and managing page placement within the hierarchy. Notably, the v2.0 Notion MCP introduces data-sources as the primary abstraction, replacing older database-focused tools. When you start the server, clients will discover tools like query-data-source, retrieve-a-data-source, update-a-data-source, create-a-data-source, list-data-source-templates, move-page, and retrieve-a-database, each with parameters aligned to data_source_id and related fields. To use it, configure your client (e.g., AI agent) to call these tools via the MCP server endpoint, providing credentials through NOTION_TOKEN or OPENAPI_MCP_HEADERS as appropriate. The server handles OAuth and token management, allowing your agents to edit Notion content in markdown and perform other data-source operations with optimized token usage.

How to install

Prerequisites:

  • Node.js and npm installed on your system
  • A Notion integration token with appropriate permissions

Option A: Run via npm/npx (recommended for quick start)

  1. Install and run the MCP server using npx:
# Ensure you have an active Notion integration and environment ready
# Start the Notion MCP server (notionApi)
npm --version
node --version

# Launch via npx (will install the package temporarily and start the server)
npx -y @notionhq/notion-mcp-server
  1. Provide credentials (token) when configuring the MCP client, for example:
{
  "mcpServers": {
    "notionApi": {
      "command": "npx",
      "args": ["-y", "@notionhq/notion-mcp-server"],
      "env": {
        "NOTION_TOKEN": "ntn_****"
      }
    }
  }
}

Option B: Run via Docker

  1. Pull and run the official Notion MCP Docker image (using NOTION_TOKEN):
docker run --rm -i \
  -e NOTION_TOKEN=ntn_**** \
  mcp/notion
  1. Or run with OPENAPI_MCP_HEADERS for advanced usage:
docker run --rm -i \
  -e OPENAPI_MCP_HEADERS='{"Authorization": "Bearer ntn_****", "Notion-Version": "2025-09-03" }' \
  mcp/notion
  1. If you prefer building locally, you can use Docker compose to build and run the image as documented in the repository.

Prerequisites summary:

  • Node.js and npm or Docker installed
  • Notion integration with a valid token (NOTION_TOKEN) or appropriate headers (OPENAPI_MCP_HEADERS)
  • Optional: Docker Compose for local builds if provided by the repo

Additional notes

Tips and common considerations: - Keep NOTION_TOKEN secure; use environment variables in your config. - When upgrading to v2.0, existing prompts may reference old tool names; migrate to the new data-source tools (query-data-source, retrieve-a-data-source, update-a-data-source, create-a-data-source). - If you encounter Notion API version issues, set Notion-Version via OPENAPI_MCP_HEADERS to align with the 2025-09-03 release. - For Docker deployments, using the official image is recommended for consistency and reliability. - The MCP server discovers tools automatically on startup; you may not need to manually register every tool. - If issues arise, consult the Notion MCP documentation linked in the repository readme and ensure the integration’s capabilities (read content, etc.) are configured as needed for your use case.

Related MCP Servers

Sponsor this space

Reach thousands of developers