SuperAPIAI Directory

Notion-Desktop-MCP

github.com · AI developer platforms

Notion-Desktop-MCP is an MCP server that lets AI agents control the local Notion desktop app. It connects to the app through Notion's debug mode (remote debugging port localhost:9222) and drives the interface with Playwright, similar to how browser automation tools control Chrome. The project is released as a Claude Code plugin and also supports connecting to any MCP client via npx (such as Cursor, VS Code, Codex CLI, Gemini CLI, etc.). Its distinguishing feature is that no official connector approval is required; as long as the local Notion desktop version is logged in, it can operate. It supports writing an entire block of content in a single call, creating a database in one step, deletion and restoration with backup, and more. The project is an independent open-source project, not affiliated with Notion Labs or Anthropic, and use is at your own risk.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS · Linux

About this tool

Purpose

Notion-Desktop-MCP is an MCP server used to let AI agents control the Notion desktop app on the user's computer. It works through Notion's debug mode: Notion is started with a remote debugging port (localhost:9222), and the server drives the app through that port, in a manner similar to how browser automation tools drive Chrome.

The difference from the official Notion connector is that as long as the local Notion desktop version is logged in, the agent can work in it; it does not apply to Notion in the browser. The absence of approval is a technical fact, not authorization; organizational rules regarding automation and AI tools still apply.

Main capabilities

  • Whole-block writing: a single notion_insert call can write a content area containing 12 blocks, including headings, numbered lists, to-dos, code, and more.
  • One-step database creation: notion_create_database can paste a Markdown table and convert it into a database, for example generating a 6-row database in one call.
  • Launch and restart: notion_launch restarts the Notion desktop version with --remote-debugging-port=9222; Notion saves continuously, so restarting does not lose content.
  • Safe deletion and restoration: deleting blocks and trashing pages requires passing confirm: true to execute; before that, it only previews. Deleted blocks are first saved as Markdown, and notion_restore_blocks can put them back in their original position.
  • Shared space protection: in guest or shared workspaces, or when the server cannot identify the workspace, deletion is refused unless allow_shared: true is also passed.
  • Insertion verification: each insertion compares the state of the entire page before and after; if any pre-existing blocks are missing, the paste is undone.
  • Code execution: notion_run_code can run arbitrary code against Notion; Claude Code requests permission before execution by default.

Usage

All installations require Node.js 18 or higher and the Notion desktop app.

Claude Code plugin method: perform the two-step installation within Claude Code, restart Claude Code, and then ask it to "in debug modeLaunch Notion", Claude will call notion_launch; on first launch it will also install the server's npm package, which takes about 30 seconds. The install script installs dependencies, registers the MCP server, links the skill to ~/.claude/skills/notion-desktop-mcp, and adds two desktop shortcuts: Notion (Claude debug) and Notion (normal). If the plugin is already installed, you can run install.ps1 -ShortcutsOnly in the cloned repository to get only the shortcuts.

Other AI agents: npx will fetch and run the server from GitHub, so no separate download is needed, but in addition to Node.js it also requires Git. Just register that command as an MCP server in your client. Clients that use JSON config files (Cursor: ~/.cursor/mcp.json; Windsurf: ~/.codeium/windsurf/mcp_config.json; Claude Desktop: claude_desktop_config.json) use the corresponding entry. On Windows, if the client cannot start npx, you can use "command": "cmd" with "args": ["/c", "npx", "-y", "github:felixhorobot/Notion-Desktop-MCP"]. Then ask the agent to launch Notion in debug mode (notion_launch). Each client receives the server's security notes when connecting; for the full guide, you can add skills/notion-desktop-mcp/SKILL.md to the agent's own instruction files (such as AGENTS.md, GEMINI.md, or Cursor rules).

So far only Claude Code and the npx launch method have been tested; the commands for other clients are written based on the MCP setup in their respective documentation.

When to use

Suitable for users who need to batch-write structured content in Notion Desktop, quickly create databases, organize pages, and want to retain the ability to recover deletions; also suitable for developers using MCP clients such as Claude Code and Cursor.

Limitations and risks

  • Unofficial interface: The server drives the UI through a debug port that Notion does not provide as an automation API, and Notion updates may break it at any time.
  • AI can make mistakes: The agent may edit, move, or delete unintended content; backups only cover blocks deleted via notion_delete_blocks, and there is no backup for edits to existing text, property changes, and notion_run_code operations. It is recommended to try it first on a private test page, and to review the plan first in shared workspaces.
  • Local security: While debug mode is on, any program on the machine can connect to localhost:9222 and operate Notion as the user, including reading sessions; the port only accepts local connections. After use, you should switch back to normal mode (pass mode: "normal" to notion_launch).
  • Recovery limitations: Restored blocks get new ids; colors, toggle state, and code languages other than Mermaid are not preserved. Subpages and databases go to the Notion trash and are kept for 30 days; notion_restore_page can restore them.
  • Privacy: Everything runs locally; the project has no servers, no telemetry, and no analytics, and sends no data to the author or third parties; Notion content is only passed between Notion Desktop and the connected AI agent, and how the agent handles the content is governed by its own terms. Block backups are stored locally in ~/.notion-desktop-mcp/deletions.jsonl, and you can delete that file at any time.
  • macOS support: The server, relay, and skill are pure Node.js and can run on any system; keyboard shortcuts use Playwright's ControlOrMeta. The Mac launcher launcher/notion.sh restarts Notion with --remote-debugging-port=9222, but whether Notion for Mac accepts that parameter and whether Mac UI differences affect the selectors remain to be confirmed.
  • No warranty: The software is provided "as is" under the MIT License, and the author is not responsible for data loss or other damages. The project is independent and is not affiliated with, endorsed by, or supported by Notion Labs, Inc. or Anthropic; "Notion" is Notion Labs, Inc. Trademark. Before use, confirm that the automated Notion application complies with Notion's terms and your organization's or workspace's policies.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools