notion-cli
An agent-first Notion CLI and MCP server, purpose-built for the Notion API 2025-09-03+ data-source model. Three-tier MCP privilege model: read-only default, runtime writes, admin lifecycle.
Agenten stärken
Installation vom Herausgeber. Kein PlugMCP-Endpunkt.
Host a copy with our keys and logs.
Noch kein paketiertes Release in der Registry. Folgen Sie der README des Repositorys.
Remote-URL oder ein Befehl auf Ihrem Rechner? Worin sich die beiden Installationen unterscheiden
Auf PlugMCP ausführen
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
StartenVom Herausgeber
An agent-first Notion CLI and MCP server, purpose-built for the Notion API 2025-09-03+ data-source model. Three-tier MCP privilege model: read-only default, runtime writes, admin lifecycle.
Agent-First Notion CLI + MCP server (Rust). Fixes @notionhq/notion-mcp-server's create_a_data_source failure on Notion API 2025-09-03+.
--allow-write runtime CRUD (13 tools), --allow-admin lifecycle ops (18 tools)db create, db update (incl. parent move via PATCH), ds update (single-delta: add/remove/rename-property + add-option + bulk), ds add-relation (dual/single/self), page move via dedicated /move endpointusers me (MCP users_me RO tool) returns the bot's own identity without enumerating workspace PII--json <body> — zero-translation agent path on all 7 mutation commands; stdin / @file / literal modes; mutually exclusive with bespoke flags (exit 2 on mixed)--stream / --format=jsonl on 5 paginated commands (ds query, block list, search, users list, comments list) with explicit item / end / error frames--check-request --cost — API call count + rate-limit window preview without contacting Notionpage get --properties <ids> (Notion filter_properties) and page get-property <page> <prop-id> for paginated relation/rollup/people propertiesrequest_id propagated to audit log; tracing subscriber; OTel exporter behind cargo feature otelNOTION_CLI_CACHE_TTL; writes auto-invalidate by entityidempotency_key paramusers list/get, comments list/create (not exposed over MCP; privacy / scope)page create --children for one-shot page + body; page update --icon/--cover tristate (set / clear / leave)--raw for clean pipingRetry-After retry (configurable)notion-cli schema <type> emits JSON Schema for 22 property types, 12 block types, and moreNOTION_CLI_AUDIT_LOG for runtime writes + NOTION_CLI_ADMIN_LOG for admin ops; each entry carries a privilege field--yes. MCP admin destructive ops gated by confirm=true + NOTION_CLI_ADMIN_CONFIRMED=1 env (two-factor)--check-request — validate and preview request payloads locally without contacting Notion# Install
cargo install --git https://github.com/0xarkstar/notion-cli
# Set your integration token
export NOTION_TOKEN='ntn_...'
# Search across your workspace
notion-cli search 'meeting notes'
# Query a data source with filters
notion-cli ds query <data-source-id> \
--filter '{"property":"Done","checkbox":{"equals":false}}'
cargo install notion-cli-mcp
(The crate is published as notion-cli-mcp; the installed binary is notion-cli.)
curl -LsSf https://github.com/0xarkstar/notion-cli/releases/latest/download/notion-cli-installer.sh | sh
brew install 0xarkstar/tap/notion-cli
Published as notion-cli-mcp on ClawHub:
clawhub install 0xarkstar/notion-cli-mcp
The skill describes the full tool surface and example payloads for agent consumption.
cargo install --git https://github.com/0xarkstar/notion-cli
Requires Rust 1.85+. Run notion-cli --version to verify.
# Retrieve a page (accepts IDs or full Notion URLs)
notion-cli page get https://notion.so/My-Page-abcdef0123456789abcdef0123456789
# Create a page under a data source
notion-cli page create \
--parent-data-source <data-source-id> \
--properties '{
"Name": {"type":"title","title":[{"type":"text","text":{"content":"New page"}}]},
"Status": {"type":"status","status":{"name":"In Progress"}}
}'
# Update properties
notion-cli page update <page-id> \
--properties '{"Status":{"type":"status","status":{"name":"Done"}}}'
# Archive
notion-cli page archive <page-id>
# Retrieve schema and metadata
notion-cli ds get <data-source-id>
# Query with filter, sort, and pagination
notion-cli ds query <data-source-id> \
--filter '{"property":"Priority","select":{"equals":"High"}}' \
--sorts '[{"property":"Due","direction":"ascending"}]' \
--page-size 25
# Create a new data source in a database container
notion-cli ds create \
--parent <database-id> \
--title 'Tasks' \
--properties '{"Name":{"title":{}},"Done":{"checkbox":{}}}'
# Full-text search (filter by object type)
notion-cli search 'onboarding' \
--filter '{"property":"object","value":"page"}'
# Retrieve a database container (lists its data sources)
notion-cli db get <database-id>
# Print JSON Schema for property values (all 22 types)
notion-cli schema property-value --pretty
Preview what would be sent without making an API call:
notion-cli --check-request --pretty page create \
--parent-data-source <id> \
--properties '{"Name":{"type":"title","title":[{"type":"text","text":{"content":"test"}}]}}'
No token required for --check-request.
Start as an MCP stdio server for agent integration:
# Read-only (4 tools: get_page, get_data_source, query_data_source, search)
notion-cli mcp
# Full access (7 tools: above + create_page, update_page, create_data_source)
notion-cli mcp --allow-write
# With audit logging
notion-cli mcp --allow-write --audit-log ./notion-audit.jsonl
mcp_servers:
notion:
command: notion-cli
args: [mcp, --allow-write, --audit-log, /var/log/notion-audit.jsonl]
env:
NOTION_TOKEN: ntn_xxx
enabled: true
Responses are wrapped in a trust-demarcation envelope by default:
{
"source": "notion",
"trust": "untrusted",
"api_version": "2026-03-11",
"content": { ... }
}
This signals to consuming agents that content originates from an external source and should be treated as data, not instructions. Use --raw to strip the envelope, and --pretty for indented output.
Create an integration at notion.so/my-integrations, then share target pages/databases with it via the Connections menu.
cargo test # 130 tests
cargo clippy --all-targets -- -D warnings
cargo llvm-cov --all-targets --summary-only # 80%+ line coverage
cargo audit # 0 advisories
# Live smoke test against a real workspace
export NOTION_TOKEN='ntn_...'
cargo run --example smoke -- <database-url>
--fields response field masksAgent-First Notion CLI + MCP server (Rust). Fixes @notionhq/notion-mcp-server's create_a_data_source failure on Notion API 2025-09-03+.
Tools
Noch keine Tool-Liste. Remote-Server erhalten eine nach dem ersten Health-Check.
FAQ
Kopieren Sie auf dieser Seite die stdio-Konfiguration für Cursor, Claude Desktop, Claude Code oder VS Code. Sie nutzt die Installation des Herausgebers, keinen PlugMCP-Proxy.
In diesem Eintrag ist keine erforderliche Umgebungsvariable aufgeführt.
Notion Cli läuft lokal über stdio.
Zuletzt geprüft: 2026-10-26. Agent-First Notion CLI + MCP server (Rust). Fixes @notionhq/notion-mcp-server's create_a_data_source failure on Notion API 2025-09-03+.