Purpose
notion-private-api-mcp is an unofficial Notion MCP server whose goal is to let LLM agents quickly connect to your own Notion workspace. Unlike servers based on the official Notion API, it authenticates using the browser session cookie (token_v2), so you do not need to create an integration in Notion or grant page-by-page sharing permissions to let the agent search, read, create, and edit any page your account can see.
Main capabilities
- Communicates withhttps://www.notion.so/api/v3)与 Notion via the private API, rather than the official public API.
- Authenticates using the token_v2 browser cookie, equivalent to the account password.
- Provides full read and write access for Claude Desktop, Claude Code, Cursor, and other MCP clients.
- Based on the official @modelcontextprotocol/sdk, using stdio transport.
- Supports searching, reading, creating, and editing pages.
- Write tools accept a simplified plain JSON block format; supported types include: paragraph, heading_1/2/3, bulleted_list_item, numbered_list_item, to_do, toggle, quote, callout, code, divider.
- Also supports passing in a stable subset of Markdown: headings, paragraphs, bulleted/numbered lists, task items, blockquotes, fenced code, horizontal rules.
- The authoritative machine-readable catalog can be obtained by calling get_style_documentation from the client.
Usage
- Get token_v2: log in in the browser to https://www.notion.so,打开开发者工具(F12)→ Application → Cookies → https://www.notion.so,复制 the value of token_v2.
- Treat token_v2 as a password, store it in a shell environment variable or an untracked .env, and never commit it to a repository.
- Configure the server via environment variables and register it in an MCP client (such as Claude Desktop / Claude Code).
- Tool parameters are defined in src/server.js.
- The helper scripts ./run-desktop.sh and ./run-codex.sh automatically resolve the repository path and log to /tmp.
- Add the configuration in claude_desktop_config.json.
Once connected, you can give instructions directly to the agent, for example:
- "Find my 'Q3 Roadmap' page in Notion and summarize it."
- "Under [a page], create a subpage titled 'Meeting notes' containing today's action items."
- "Append a TODO list containing these three tasks to [a page]..."
- "Sync the local CHANGELOG.md to the release-notes page."
Use cases
Suitable for individual users who want an agent to quickly operate their own Notion workspace without dealing with integration permissions. The official documentation states that if you just want an agent to access your own workspace, this is the fastest path; but for production environments or multi-tenant applications, you should use the official Notion MCP server.
Limitations and risks
- Uses an undisclosed internal API, which Notion may change or break at any time.
- Using this private API may violate Notion's Terms of Service.
- Inherently fragile, not suitable for production environments, use at your own risk, and only for your own data.
- token_v2 expires when the Notion session ends (logout, password change, long inactivity), requiring you to obtain a new cookie and update it.
- You may encounter MemcachedCrossCellError (a temporary routing error on multi-cell workspaces); the client has retried and fallen back to loadPageChunk, and if it still occurs you can retry the call.
- Nested lists, tables, and inline formatting are not yet implemented.
- Not affiliated with Notion Labs, Inc.
License
MIT © kir.vigen。