# notion-mcp-server

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 179
- Author: awkoy
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/awkoy/notion-mcp-server
- Updated: 2026-10-21
- HTML: https://affpapa.org/en/nevibecode/mcp/notion-mcp-server

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `NOTION_TOKEN`, `NOTION_PAGE_ID` — keys and tokens: ask the human for the values, never commit them or put them in shared files.
- Works with: Notion

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env NOTION_TOKEN=<NOTION_TOKEN> --env NOTION_PAGE_ID=<NOTION_PAGE_ID> --transport stdio notion-mcp-server -- npx -y notion-mcp-server
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add notion-mcp-server --env NOTION_TOKEN=<NOTION_TOKEN> --env NOTION_PAGE_ID=<NOTION_PAGE_ID> -- npx -y notion-mcp-server
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e NOTION_TOKEN=<NOTION_TOKEN> -e NOTION_PAGE_ID=<NOTION_PAGE_ID> notion-mcp-server npx -y notion-mcp-server
```
Replace <…> with your own values

## When to use it
- 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
- 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.

## Similar
- [Reactive Resume](https://affpapa.org/en/nevibecode/mcp/reactive-resume.md) — MCP server · ★ 44874
- [screenpipe](https://affpapa.org/en/nevibecode/mcp/screenpipe.md) — MCP server · ★ 22053
- [Inbox Zero](https://affpapa.org/en/nevibecode/mcp/inbox-zero.md) — MCP server · ★ 12791
- [kaneo](https://affpapa.org/en/nevibecode/mcp/kaneo.md) — MCP server · ★ 9602
- [Mindwtr](https://affpapa.org/en/nevibecode/mcp/mindwtr.md) — MCP server · ★ 2318
- [Azure DevOps (ADO)](https://affpapa.org/en/nevibecode/mcp/azure-devops-ado.md) — MCP server · ★ 2067

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
