What is Notion MCP is a remote MCP server with easy installation and powerful tools for AI agents.?
Notion MCP Server is a remote MCP server designed for the Notion API, offering easy installation via standard OAuth and powerful tools optimized for AI agents. It supports both STDIO and Streamable HTTP transport modes, allowing for flexible integration with various clients. Users can configure their integrations and manage access to their Notion workspace securely.
Documentation
Notion MCP Server
[!NOTE]
We’ve introduced Notion MCP, a remote MCP server with the following improvements:
Easy installation via standard OAuth. No need to fiddle with JSON or API token anymore.
Powerful tools tailored to AI agents. These tools are designed with optimized token consumption in mind.
While we limit the scope of Notion API's exposed (for example, you will not be able to delete databases via MCP), there is a non-zero risk to workspace data by exposing it to LLMs. Security-conscious users may want to further configure the Integration's Capabilities.
For example, you can create a read-only integration token by giving only "Read content" access from the "Configuration" tab:
2. Connecting content to integration:
Ensure relevant pages and databases are connected to your integration.
To do this, visit the Access tab in your internal integration settings. Edit access and select the pages you'd like to use.
Alternatively, you can grant page access individually. You'll need to visit the target page, and click on the 3 dots, and select "Connect to integration".
3. Adding MCP config to your client: Using npm:
Cursor & Claude:
Add the following to your .cursor/mcp.json or claude_desktop_config.json (MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json)
For web-based applications or clients that prefer HTTP communication, you can use the Streamable HTTP transport:
npx @notionhq/notion-mcp-server --transport http
# Run on a custom port
npx @notionhq/notion-mcp-server --transport http --port 8080
# Run with a custom authentication token
npx @notionhq/notion-mcp-server --transport http --auth-token "your-secret-token"
When using Streamable HTTP transport, the server will be available at http://0.0.0.0:<port>/mcp.
Authentication
The Streamable HTTP transport requires bearer token authentication for security. You have three options:
Option 1: Auto-generated token (recommended for development)
npx @notionhq/notion-mcp-server --transport http
The server will generate a secure random token and display it in the console:
Generated auth token: a1b2c3d4e5f6789abcdef0123456789abcdef0123456789abcdef0123456789ab
Use this token in the Authorization header: Bearer a1b2c3d4e5f6789abcdef0123456789abcdef0123456789abcdef0123456789ab
Option 2: Custom token via command line (recommended for production)
The command line argument --auth-token takes precedence over the AUTH_TOKEN environment variable if both are provided.
Making HTTP Requests
All requests to the Streamable HTTP transport must include the bearer token in the Authorization header:
curl -H "Authorization: Bearer your-token-here" \
- H "Content-Type: application/json" \
- H "mcp-session-id: your-session-id" \
- d '{"jsonrpc": "2.0", "method": "initialize", "params": {}, "id": 1}' \
http://localhost:3000/mcp
Note: Make sure to set either the NOTION_TOKEN environment variable (recommended) or the OPENAPI_MCP_HEADERS environment variable with your Notion integration token when using either transport mode.
Examples
Using the following instruction
Comment "Hello MCP" on page "Getting started"
AI will correctly plan two API calls, v1/search and v1/comments, to achieve the task
Similarly, the following instruction will result in a new page named "Notion MCP" added to parent page "Development"
Add a page titled "Notion MCP" to page "Development"
You may also reference content ID directly
Get the content of page 1a6b35e6e67f802fa7e1d27686f017f2