Skip to main content
Glama

notion-bank-mcp

Plan-bank MCP for AI agents — read and write Markdown implementation plans in Notion with line + section addressing, for Cursor, Claude, Codex, and other MCP hosts.

Auth: browser OAuth via mcp.notion.com. No CLIENT_ID / SECRET for end users. No integration token in mcp.json.

npx -y notion-bank-mcp@latest --version

Why use notion-bank-mcp?

Generic Notion MCPs are great for browsing a workspace. notion-bank-mcp is optimized for one job: keep implementation plans in Notion in a shape agents can reliably create, revise, and ship — without throwaway scripts.

Advantage

What you get

Plan-bank domain

First-class hierarchy: Plans root → service page → plan page. Agents follow one flow instead of inventing page structure every time.

Surgical edits

plan_update_range edits by section or line range, with expected_etag so concurrent overwrites fail safely.

Markdown in / Markdown out

Upsert from file or string; plan_get returns numbered lines + TOC so the model can point at exact slices.

No temp glue

Stop generating one-off Python/shell to patch Notion. The MCP is the stable API for plan migrate/sync.

Zero secrets for end users

Install with npx only. Browser OAuth via mcp.notion.com — no CLIENT_ID, no integration token in mcp.json.

Per-user workspace mapping

Each machine stores Plans root + service map under ~/.config/notion-bank/ — no shared workspace IDs in the repo.

Agent-ready first steps

plan_status → OAuth if needed → ask for Plans root once → ready. Predictable for Cursor / Claude / other MCP hosts.

Search with line hits

plan_search surfaces matches in context of the plan body, not only page titles.

Optional export

plan_sync pulls Notion → local markdown when you want a file in git or a PR.

When to prefer this over the official Notion MCP alone: you maintain a plan bank across services, you need section-level revisions with concurrency checks, and you want agents to do that in one tool surface instead of free-form page updates.


Related MCP server: Notion MCP Server

Quick start

  1. Add this to your MCP config (Cursor example — same shape works for Claude Desktop / Codex):

{
  "mcpServers": {
    "notion-bank": {
      "command": "npx",
      "args": ["-y", "notion-bank-mcp@latest"]
    }
  }
}
  1. Restart the host. Tools like plan_status and plan_upsert should appear.

  2. On the first Notion action, a browser opens → sign in with Notion.

  3. Tell the agent your Plans root Notion page URL once → it runs plan_configure.

That is enough for most users.


Install options

Method

When to use

npx -y notion-bank-mcp@latest

Recommended — always latest, no global install

npm i -g notion-bank-mcp then notion-bank-mcp

Frequent local use

Clone + make build

Developing the server itself

Check / update the CLI:

notion-bank-mcp --version          # or: notion-bank-mcp version
notion-bank-mcp update             # checks npm only — does not auto-install
notion-bank-mcp --help

If update reports a newer version:

npm i -g notion-bank-mcp@latest
# or keep using npx -y notion-bank-mcp@latest

CLI

Command

Purpose

(default) / --stdio

MCP over stdio (hosts)

serve / --http

Streamable HTTP (optional hosted URL)

version / --version / -V

Print package version

update

Compare local version to npm latest

help / --help / -h

Short usage

Env (optional)

Env

Description

NOTION_BANK_CONFIG_PATH

Override path to config.json

NOTION_BANK_CREDENTIALS_PATH

Override path to OAuth credentials

NOTION_BANK_CACHE_TTL_MS

In-process cache TTL (default 60000)

NOTION_BANK_CACHE_MAX_ENTRIES

Cache LRU cap (default 256)

NOTION_BANK_MODE

Set http to force HTTP serve

NOTION_BANK_LOCAL_CALLBACK_PORT

OAuth callback port (default 8765)

HTTP-only (operators): NOTION_BANK_PUBLIC_URL, NOTION_BANK_HOST, NOTION_BANK_PORT, NOTION_BANK_HTTP_IDLE_MS. See docs/OPERATOR.md.

Local from source

make install && make check && make build
make stdio
# or: node dist/index.js

From a local clone before publishing:

{
  "mcpServers": {
    "notion-bank": {
      "command": "node",
      "args": ["/absolute/path/to/notion-bank-mcp/dist/index.js"]
    }
  }
}

Host compatibility

Primary transport is stdio. Same command + args pattern as other MCP servers. No env tokens required.

Host

Config

Notes

Cursor

.cursor/mcp.json or Settings → MCP

See mcp.json.example

Claude Desktop

claude_desktop_config.json

Same mcpServers JSON

Claude Code

MCP settings

Stdio; optional skill under .claude/skills/

Codex

MCP / tools config

Same pattern

Windsurf / OpenCode

MCP command/args

Prefer stdio

Agent flow

npx notion-bank-mcp@latest  (host starts stdio)
        │
        ▼
plan_status
        │
        ├─ no auth → browser OAuth (localhost callback :8765)
        │            tokens → ~/.config/notion-bank/credentials.json
        │
        └─ no root → ask Plans root URL → plan_configure
                     config → ~/.config/notion-bank/config.json
        │
        ▼
plan_upsert / plan_get / plan_update_range / …

Hierarchy:

Plans / Superpowers          ← root (plan_configure)
  └── <Service>              ← plan_ensure_service
        └── <Plan title>     ← plan_upsert / plan_migrate

Tools

Tool

Purpose

plan_status

Auth + workspace readiness

plan_oauth_login / plan_oauth_wait / plan_oauth_logout

Browser OAuth lifecycle

plan_configure

Persist Plans root (+ optional service map)

plan_ensure_service

Ensure service page under root

plan_create_child

Create a subpage under any parent page id/URL

plan_upsert / plan_migrate

Create/update plan from markdown or file

plan_get

Read with optional L00N| lines, TOC, etag

plan_update_range

Surgical edit by section / lines + expected_etag

plan_search

Search with line hits

plan_sync

Export Notion plan → local markdown

Resources

  • notion-bank://docs/workflow

  • notion-bank://docs/instructions

  • notion-bank://config

Config (per user / machine)

Stored outside the git repo:

Path

Contents

~/.config/notion-bank/config.json

Plans root + service map

~/.config/notion-bank/credentials.json

OAuth access / refresh tokens

~/.config/notion-bank/oauth-pending.json

Short-lived login state (auto-cleared)

Do not put Notion tokens or OAuth client secrets in the repo or in committed mcp.json. Access tokens expire (~8h); the server refreshes automatically when possible. If refresh fails, run plan_oauth_login again.


HTTP serve

Optional hosted URL mode for teams that want "url": "https://host/mcp" instead of stdio:

npm run serve
# or: notion-bank-mcp serve

Details: docs/OPERATOR.md. Not required for normal users.


Skills

MCP tools and skills are separate. The skill teaches the agent when/how to document in Notion; the server only registers tools.

Shipped skill: skills/notion-bank/SKILL.md
Slash name: /notion-bank

Copy into your host skills directory (with notion-bank MCP enabled):

Host

Typical path

Cursor

.cursor/skills/notion-bank/ or user skills

Claude Code

.claude/skills/notion-bank/

Codex / agents

.agents/skills/notion-bank/

The skill chains superpowers (brainstorming → writing-plans) and optimize-goal when applicable, uses an in-skill engineering checklist, and always returns the Notion URL.


Developers

make check          # typecheck + biome + tests (coverage fail <75%, warn <90%)
make test-coverage
make release VERSION=1.5.0   # bump package.json, commit, create annotated tag v1.5.0
git push && git push origin v1.5.0   # triggers GitHub Actions → npm publish

Coverage policy: CI fails below 75% (lines/statements/functions/branches). Below 90% emits a warning annotation only.

Release: git tag vX.Y.Z is the source of truth. The release workflow syncs package.json version from the tag, runs checks, then npm publish. Requires repo secret NPM_TOKEN.

Docs

License

MIT

Available Tools

12 tools
plan_configureA

Persist per-user workspace settings (NOT in repo .env). Pass the user's Plans root Notion URL or UUID. Optional services map slug→page_id. Merges services by default. Call after plan_status when root_page_id missing. Ask the user for their root page — never invent IDs.

Inputs: services, export_dir, root_page_id, root_page_url, +1 more.

plan_ensure_serviceA

Ensure a service page exists under the configured Plans root. Creates if missing. Requires plan_configure + NOTION_TOKEN.

Inputs: service (required), dry_run.

plan_getA

Fetch a plan as addressable markdown with L00N| line numbers, TOC, and etag. Always call before plan_update_range. Requires plan_configure + NOTION_TOKEN.

Inputs: service (required), title, page_id, sections, +2 more.

plan_migrateB

Migrate a local markdown file into Notion plan bank (upsert under service → title). Requires plan_configure + NOTION_TOKEN. Chunking handled inside MCP.

Inputs: path (required), title (required), service (required), mode, +1 more.

plan_oauth_loginA

Open browser for Notion login (mcp.notion.com). Auto-runs on first Notion tool if not logged in. No CLIENT_ID/SECRET.

Inputs: wait, timeout_ms, open_browser.

plan_oauth_logoutA

Clear saved OAuth credentials for this user (credentials.json). Does not revoke at Notion end.

Inputs: no named parameters.

plan_oauth_waitB

Finish a pending plan_oauth_login(wait=false) after the user approves in the browser.

Inputs: timeout_ms.

plan_statusA

Show auth + workspace status. Call first. End users need no CLIENT_ID — browser OAuth opens automatically.

Inputs: no named parameters.

plan_syncB

Export a Notion plan (canonical) to a local markdown file. Requires plan_configure + NOTION_TOKEN.

Inputs: service (required), path, title, dry_run, +1 more.

plan_update_rangeB

Surgical update by section (preferred) or start_line/end_line. Pass expected_etag from plan_get. Errors if neither section nor lines given (no silent full replace). Requires plan_configure + NOTION_TOKEN.

Inputs: service (required), new_markdown (required), title, dry_run, +6 more.

plan_upsertB

Create or update a plan from a markdown string. Upserts by exact title under the service page. Requires plan_configure + NOTION_TOKEN.

Inputs: title (required), service (required), markdown (required), mode, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 12 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: configure, ensure_service, get, migrate, OAuth login/logout/wait, search, status, sync, update_range, upsert. No overlap.

    Naming Consistency5/5

    All tools follow consistent 'plan_' prefix with verb_noun pattern in snake_case (e.g., plan_ensure_service, plan_update_range). No mixing of conventions.

    Tool Count5/5

    12 tools is well within the ideal 3-15 range, covering auth, CRUD, search, sync, and migration without unnecessary bloat.

    Completeness4/5

    Covers configuration, service management, plan retrieval, updates, upserts, search, sync, and OAuth flow. Minor gap: no explicit deletion tool, but upsert can override and sync handles export. Still quite complete.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      A
      maintenance
      Gives AI agents headless, token-authenticated read/write access to a Notion workspace through MCP, using three context-efficient tools that cover 47 operations across pages, databases, blocks, templates, comments, users, and files. Supports creating and editing pages, querying and filtering databases, batch mutations with rollback and idempotency, markdown round-trips, and image/file uploads, runnable over stdio or HTTP in CI and self-hosted deployments.
      5,360 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Gives MCP clients like Claude, Cursor and Codex read/write access to Notion through a single token, letting agents search, create and edit pages, query databases, comment and upload files in plain language. It uses only three lightweight tools, supports batched idempotent writes, and runs headless in CI or self-hosted environments.
      5,360 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Gives MCP clients like Claude, Cursor, VS Code and Codex token-authenticated read/write access to Notion, so agents can search, create and edit pages, query databases, comment and upload files in plain language. It supports batched, idempotent writes with rollback, markdown round-tripping, and headless use in CI or self-hosted environments.
      5,360 npm
      MIT