notion-mcp-server — Claude Code MCP server: features and setup
Connects an AI agent to Notion pages and databases so it can search, create, and edit content. Token-based access also works in headless runs.
claude mcp add --env NOTION_TOKEN=<NOTION_TOKEN> --env NOTION_PAGE_ID=<NOTION_PAGE_ID> --transport stdio notion-mcp-server -- npx -y notion-mcp-serverWhat notion-mcp-server does
This MCP server lets an agent work with Notion pages and databases. It can search records, create or edit pages, add comments, and upload files. Page content can move in and out as Markdown.
Set the Notion token as NOTION_TOKEN before making calls. The server uses token authentication rather than browser sign-in, so it can run in CI and background agents. Calls fail with an authentication error if the token is missing.
What it helps with
- find database rows by status
- create a page from a template and fill it in
- rename multiple pages in a batched call
- comment on meeting notes
- upload a file to a Notion page
Example prompts for the agent
- Find rows in my Tasks database with status Doing and list the overdue ones.
- Create a page from my Weekly review template and add this summary.
- Rename these pages using the new naming convention.
How to install notion-mcp-server
Platform CLI
claude mcp add --env NOTION_TOKEN=<NOTION_TOKEN> --env NOTION_PAGE_ID=<NOTION_PAGE_ID> --transport stdio notion-mcp-server -- npx -y notion-mcp-serverReplace <…> with your own values
Platform CLI
codex mcp add notion-mcp-server --env NOTION_TOKEN=<NOTION_TOKEN> --env NOTION_PAGE_ID=<NOTION_PAGE_ID> -- npx -y notion-mcp-serverReplace <…> with your own values
Config file
{
"mcpServers": {
"notion-mcp-server": {
"command": "npx",
"args": [
"-y",
"notion-mcp-server"
],
"env": {
"NOTION_TOKEN": "<NOTION_TOKEN>",
"NOTION_PAGE_ID": "<NOTION_PAGE_ID>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"notion-mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"notion-mcp-server"
],
"env": {
"NOTION_TOKEN": "<NOTION_TOKEN>",
"NOTION_PAGE_ID": "<NOTION_PAGE_ID>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e NOTION_TOKEN=<NOTION_TOKEN> -e NOTION_PAGE_ID=<NOTION_PAGE_ID> notion-mcp-server npx -y notion-mcp-serverReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about notion-mcp-server
How do I install notion-mcp-server in Claude Code?
Run claude mcp add notion-mcp-server -e NOTION_TOKEN=<NOTION_TOKEN> -- npx -y notion-mcp-server, replacing the placeholder with your Notion token.
What does notion-mcp-server do?
It gives an AI agent access to Notion pages and databases for search and editing, as well as comments and file uploads.
What does notion-mcp-server need to run?
Provide a Notion token through NOTION_TOKEN. The server uses token authentication and can run without browser sign-in.