The Notion MCP Server provides a way to connect AI assistants to your Notion workspace through the Model Context Protocol (MCP). It enables AI agents to interact with your Notion content through a standardized interface.
Go to Notion's integrations page and create a new internal integration or select an existing one.
For security, consider limiting the integration's capabilities. You can create a read-only integration by selecting only "Read content" access in the "Configuration" tab.
Ensure relevant pages and databases are connected to your integration by:
Alternatively, grant access to individual pages by:
For Cursor & Claude:
Add the following to your .cursor/mcp.json
or claude_desktop_config.json
(MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
)
Option 1: Using NOTION_TOKEN (recommended)
{
"mcpServers": {
"notionApi": {
"command": "npx",
"args": ["-y", "@notionhq/notion-mcp-server"],
"env": {
"NOTION_TOKEN": "ntn_****"
}
}
}
}
Option 2: Using OPENAPI_MCP_HEADERS (for advanced use cases)
{
"mcpServers": {
"notionApi": {
"command": "npx",
"args": ["-y", "@notionhq/notion-mcp-server"],
"env": {
"OPENAPI_MCP_HEADERS": "{\"Authorization\": \"Bearer ntn_****\", \"Notion-Version\": \"2022-06-28\" }"
}
}
}
}
For Zed:
Add the following to your settings.json
{
"context_servers": {
"some-context-server": {
"command": {
"path": "npx",
"args": ["-y", "@notionhq/notion-mcp-server"],
"env": {
"OPENAPI_MCP_HEADERS": "{\"Authorization\": \"Bearer ntn_****\", \"Notion-Version\": \"2022-06-28\" }"
}
},
"settings": {}
}
}
}
Option 1: Using the official Docker Hub image:
Add to your .cursor/mcp.json
or claude_desktop_config.json
:
{
"mcpServers": {
"notionApi": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e", "NOTION_TOKEN",
"mcp/notion"
],
"env": {
"NOTION_TOKEN": "ntn_****"
}
}
}
}
Option 2: Building the Docker image locally:
First, build the Docker image:
docker compose build
Then add to your .cursor/mcp.json
or claude_desktop_config.json
:
{
"mcpServers": {
"notionApi": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"NOTION_TOKEN=ntn_****",
"notion-mcp-server"
]
}
}
}
Remember to replace ntn_****
with your actual integration secret from the integration configuration tab.
To install Notion API Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @makenotion/notion-mcp-server --client claude
The default transport mode uses standard input/output:
# Run with default stdio transport
npx @notionhq/notion-mcp-server
# Or explicitly specify stdio
npx @notionhq/notion-mcp-server --transport stdio
For web-based applications or clients that prefer HTTP:
# Run with HTTP transport on default port 3000
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"
Three options for authentication:
Option 1: Auto-generated token (for development)
npx @notionhq/notion-mcp-server --transport http
Option 2: Custom token via command line (for production)
npx @notionhq/notion-mcp-server --transport http --auth-token "your-secret-token"
Option 3: Custom token via environment variable (for production)
AUTH_TOKEN="your-secret-token" npx @notionhq/notion-mcp-server --transport http
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
Using the instruction:
Comment "Hello MCP" on page "Getting started"
The AI will execute API calls to v1/search
and v1/comments
to complete this task.
Using the instruction:
Add a page titled "Notion MCP" to page "Development"
The AI will create a new page named "Notion MCP" under the "Development" page.
Using the instruction:
Get the content of page 1a6b35e6e67f802fa7e1d27686f017f2
The AI will retrieve the content of the specified page using its ID.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "notionApi" '{"command":"npx","args":["-y","@notionhq/notion-mcp-server"],"env":{"OPENAPI_MCP_HEADERS":"{\"Authorization\": \"Bearer ntn_****\", \"Notion-Version\": \"2022-06-28\" }"}}'
See the official Claude Code MCP documentation for more details.
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.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"notionApi": {
"command": "npx",
"args": [
"-y",
"@notionhq/notion-mcp-server"
],
"env": {
"OPENAPI_MCP_HEADERS": "{\"Authorization\": \"Bearer ntn_****\", \"Notion-Version\": \"2022-06-28\" }"
}
}
}
}
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.
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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"notionApi": {
"command": "npx",
"args": [
"-y",
"@notionhq/notion-mcp-server"
],
"env": {
"OPENAPI_MCP_HEADERS": "{\"Authorization\": \"Bearer ntn_****\", \"Notion-Version\": \"2022-06-28\" }"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect