Notion Private API MCP logo

Notion Private API MCP

by kirvigen

Reads and edits Notion through the private token_v2 API, with page, block, Markdown, and workspace content tools.

Install Notion Private API MCP

Run the project’s own setup commands, in order.

Setup steps from the project

kirvigen/notion-private-api-mcp installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    git clone https://github.com/kirvigen/notion-private-api-mcp.git
    
  2. 2. Run
    cd notion-private-api-mcp
    
  3. 3. Install
    npm install
    
  4. 4. Start the server
    npm start
    
  5. 5. Sign in
    1. Log in to Notion in your browser: <https://www.notion.so>
    
  6. 6. Configure
    cp .env.example .env   # then edit .env
    

Overview

kirvigen/notion-private-api-mcp MCP server connects MCP clients to Notion through the undocumented private API and a browser session's token_v2 cookie. It exposes tools for reading page and block data, creating and editing content, deleting blocks, and syncing local Markdown files. Written content can use simplified block JSON or a supported Markdown subset. Reach for it when an agent needs access to pages your Notion account can see without creating an integration or sharing pages individually.

Use cases

  • Read and summarize a visible Notion page
  • Create child pages with structured notes
  • Append tasks or meeting notes to an existing page
  • Replace a page with content from a local Markdown file

Key features

  • Read page and block data
  • Create and edit Notion pages
  • Append, replace, update, and archive blocks
  • Convert supported Markdown to blocks
  • Sync local Markdown files
  • Use browser session authentication

Tools11

What Notion Private API MCP lets your agent do. Expand a tool for its parameters.

Self-reported~188 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

23/23 checks healthy over the last 111d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars4Stargazers on the source repository.
Last commit6mo agoMost recent push to the default branch.
Tools exposed11Callable tools this server registers over MCP.
Directory activity7 viewsConfig copies, upvotes, and views on AllMCPs.

How Notion Private API MCP works

What kirvigen/notion-private-api-mcp MCP server does

The kirvigen/notion-private-api-mcp MCP server provides read and write operations for a Notion workspace through Notion's private API. It can inspect page metadata and individual blocks, retrieve direct children, create child pages, append content, replace page contents, update block text, and archive direct child blocks. A separate tool can create or replace a page from a local Markdown file.

The server uses Notion permissions associated with the supplied browser session, so it can operate on pages visible to that account rather than only pages explicitly shared with an integration. It is an unofficial implementation and is not affiliated with Notion.

How it works

The process runs as an MCP server over stdio using the official MCP SDK. The client launches the Node.js server and passes configuration through environment variables. Requests are sent to Notion's internal API at the configured base URL, with the token_v2 browser cookie used for authentication.

Writing tools accept either simplified block JSON or Markdown. Supported simplified blocks include paragraphs, three heading levels, bulleted and numbered list items, to-do items, toggles, quotes, callouts, code, and dividers. The Markdown parser handles headings, paragraphs, ordinary and task lists, blockquotes, fenced code, and horizontal rules. Nested lists, tables, and inline formatting are not implemented. get_style_documentation returns the machine-readable catalog of supported block types and annotations, while markdown_to_blocks lets a client inspect Markdown conversion before writing.

Setup and configuration

To run the kirvigen/notion-private-api-mcp MCP server, clone the repository, install its Node.js dependencies, set the required environment variable, and start the process with npm start. The project requires Node.js 18 or newer.

NOTION_TOKEN_V2 must contain the token_v2 cookie from an authenticated Notion browser session. It should be kept like a password: use a shell environment or an untracked .env file, and do not commit it. NOTION_PRIVATE_API_BASE is optional and defaults to https://www.notion.so; it can change the private API base URL.

Claude Desktop configuration supplies the server command and token in its MCP configuration.

Tools and capabilities

  • Read a page and its metadata with get_page.
  • Inspect a block or its direct children with get_block and get_block_children.
  • Create child pages from blocks or Markdown.
  • Append or replace page content, including insertion after a specified block.
  • Replace plain text in a block, such as a code block.
  • Archive direct child blocks.
  • Preview Markdown parsing and consult supported style documentation.
  • Synchronize a local Markdown file into a new or existing page.

Limitations and notes

The kirvigen/notion-private-api-mcp MCP server depends on Notion's undocumented internal API, including the /api/v3 endpoint. Notion may change or disable that interface, and the server may stop working without notice. The session cookie can expire after logout, a password change, or extended inactivity, requiring a new value.

Because the cookie effectively grants account-level access, use the server only with your own account and data and protect the credential carefully. The README warns that private API use may conflict with Notion's Terms of Service and is not intended for production or multi-tenant applications. Transient MemcachedCrossCellError responses may require retrying the operation.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Notion Private API MCP

Clone the repository, run `npm install`, set `NOTION_TOKEN_V2`, and start it with `npm start`. Node.js 18 or newer is required.

Yes. The README provides a Claude Desktop MCP configuration using the Node.js server entry point and `NOTION_TOKEN_V2`.

Set `NOTION_TOKEN_V2` to the `token_v2` cookie from your logged-in Notion browser session. Treat it as a password and do not commit it.

Yes. Its `sync_markdown_file` tool can create or replace a page from a local Markdown file.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewNotion Private API MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/kirvigen-notion-private-api-mcp?style=directory)](https://allmcps.com/mcp/kirvigen-notion-private-api-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/kirvigen-notion-private-api-mcp"><img src="https://allmcps.com/api/badge/kirvigen-notion-private-api-mcp?style=directory" alt="Notion Private API MCP on AllMCPs" /></a>