Notion. Agent-Native.
Query databases. Export pages as markdown. Create entries. Full Notion control from the terminal.
Notion is where your team stores everything — deals, docs, SOPs, sprint logs, and CRM data. But agents can't browse a dashboard. They hit the API directly, hand-parse nested property objects, and lose context every time a schema changes.
So we built notion-agent — 29 commands across 7 groups, all as MCP tools, wired for autonomous workspace access from day one.

Why notion-agent Exists
Without notion-agent
- No CLI — Notion only offers a REST API and browser dashboard
- Raw API returns deeply nested property objects — agents struggle to parse them reliably
- Schema changes break hardcoded property names silently
- No markdown export — agents can't read page content without parsing block arrays
- Every workflow requires knowing page IDs upfront — no dynamic search
With notion-agent
- 29 commands with clean, flat JSON output — no nested parsing needed
- Schema inspection built in — agents check property names before writing
- Markdown export in one command — full page content in agent context
- Dynamic search by keyword — no hardcoded IDs required
- 29 MCP tools — plug directly into Claude Code, Claude Desktop, or Cursor
What Your Agent Can Do
29 commands across 7 groups — every Notion operation your agent needs.
Database Query & Filtering
Query any Notion database with full filter and sort support — by date, select, checkbox, relation, and more. Returns structured JSON rows your agent can reason over without touching the dashboard.
Page Markdown Export
Export any Notion page as clean markdown — perfect for feeding docs, SOPs, or deal briefs directly into agent context windows. One command returns the full page content as agent-ready text.
Create & Update Pages
Create new pages in any database or parent page, update properties on existing entries, archive and restore pages — your agent writes research, meeting notes, or deal updates directly into Notion.
Block Manipulation
Append paragraphs, code blocks, dividers, and more to any page. Get, update, or delete individual blocks. Agents can build structured notes, append findings to running logs, or scaffold entire docs programmatically.
Workspace Search
Full-text search across your entire Notion workspace — pages and databases. Filter by type. Your agent finds the right doc, deal, or contact in seconds without knowing the exact page ID.
Database Schema Inspection
Get the full schema of any database — property names, types, options, and relations. Agents understand the structure before writing, eliminating type mismatches and failed property updates.
User & Team Lookup
List workspace members, look up individual users by ID, or get the bot identity. Agents know who is in the workspace for @mentions, task assignment, or team coordination workflows.
MCP Server Mode
29 MCP tools registered for direct AI agent connectivity. Run notion-agent as an MCP server and give Claude, Cursor, or any MCP-compatible agent full Notion workspace access with one config entry.
Agent Workflows
Real use cases — what your agent can run autonomously today.
CRM Query — Pull Pipeline by Stage
“Show me all deals in the "Proposal Sent" stage from my Notion CRM.”
Agent inspects the database schema first to confirm property names, then queries with a filter. Returns every deal row as structured JSON — no dashboard, no manual export, no copy-paste.
notion-agent databases listList all databases and find your CRM ID
notion-agent databases schema --database-id "abc123"Inspect schema — confirm the stage property name
notion-agent databases query --database-id "abc123" --filter '{"property":"Stage","select":{"equals":"Proposal Sent"}}'Query deals at this stage — returns full row JSON
Doc Export — Feed SOP Into Agent Context
“Read our onboarding SOP and summarize the key steps for a new SDR.”
Agent searches the workspace for the doc by keyword, then exports the full page as markdown. Clean text lands directly in the context window — no PDF, no browser, no copy-paste.
notion-agent search all --query "SDR onboarding SOP"Find the doc by keyword across the workspace
notion-agent pages content --page-id "def456"Get raw block content of the page
notion-agent pages markdown --page-id "def456"Export as clean markdown for agent context
Deal Update — Write Research Back Into Notion
“I just finished a discovery call with Acme Corp. Log the call notes and update their deal stage.”
Agent creates a structured call notes page in the CRM database, then updates the deal stage property — all from terminal output. Your Notion stays current without manual data entry.
notion-agent pages create --parent-id "abc123" --title "Acme Corp — Discovery Call 2026-03-27" --content "Key pain points: [...]"Create call notes page inside the CRM database
notion-agent pages property --page-id "ghi789" --property "Stage" --value "Discovery Complete"Update deal stage on the account record
notion-agent blocks append --block-id "ghi789" --type "paragraph" --text "Next step: send proposal by 2026-04-03"Append next-action block to the deal page
Workspace Search — Find Any Page Without the ID
“Find the Q1 2026 board meeting notes and give me a summary.”
Most agent Notion integrations require hardcoded page IDs. notion-agent search commands return IDs dynamically — agents navigate workspaces just like a human would, by typing what they're looking for.
notion-agent search pages --query "Q1 2026 board meeting"Search pages only — returns ID + title + last edited
notion-agent pages get --page-id "jkl012"Get page metadata and properties
notion-agent pages markdown --page-id "jkl012"Export full content as markdown for summarization
Sprint Log — Agent Appends Daily Standups
“Log today's standup: shipped email validation, blocked on Clay webhook timeout.”
Agents maintaining a running sprint log or standup tracker can append structured blocks to an existing Notion page every session. No new page each time — just a clean append to the right place.
notion-agent search pages --query "Sprint Log March 2026"Locate the sprint log page
notion-agent blocks append --block-id "mno345" --type "paragraph" --text "2026-03-27 — Shipped: email validation. Blocked: Clay webhook timeout."Append today's standup as a new block
notion-agent pages get --page-id "mno345"Confirm the block was appended correctly
Quick Start
1Install
npm install -g notion-agent
# Or run without installing
npx notion-agent databases list2Authenticate
Create a Notion integration at notion.so/my-integrations and grab your integration token.
# Option A — environment variable (recommended)
export NOTION_TOKEN=secret_xxxxxxxxxx
# Option B — save to config file
notion-agent login --token secret_xxxxxxxxxx
# Option C — per-command flag
notion-agent databases list --token secret_xxxxxxxxxx3First commands
# List all databases in your workspace
notion-agent databases list
# Search for a page
notion-agent search all --query "Q1 pipeline"
# Export a page as markdown
notion-agent pages markdown --page-id PAGE_ID
# Query a database with a filter
notion-agent databases query --database-id DB_ID --filter '{"property":"Status","select":{"equals":"Active"}}'Commands Reference
29 commands across 7 groups.
databases7 commandsdatabases listList all databases in the workspacedatabases getGet a database by IDdatabases schemaGet full schema — property names, types, optionsdatabases propertiesList all properties of a databasedatabases queryQuery rows with filter and sort supportdatabases createCreate a new databasedatabases updateUpdate database title or propertiespages8 commandspages getGet page metadata and propertiespages createCreate a new page in a database or parent pagepages updateUpdate page propertiespages archiveArchive (soft-delete) a pagepages restoreRestore an archived pagepages propertyGet or update a single property valuepages contentGet all block content of a pagepages markdownExport page as clean markdownblocks5 commandsblocks getGet a block by IDblocks childrenList all child blocks of a page or blockblocks appendAppend paragraph, code, divider, or other blocksblocks updateUpdate block contentblocks deleteDelete a blockusers3 commandsusers listList all workspace membersusers getGet a user by IDusers meGet the bot/integration identitycomments2 commandscomments listList comments on a page or blockcomments createCreate a new commentsearch3 commandssearch allSearch across all pages and databasessearch pagesSearch pages onlysearch databasesSearch databases onlyworkspace1 commandsworkspace infoGet workspace name, ID, and domainMCP Server Setup
Add notion-agent as an MCP server to give Claude or Cursor full Notion access — all 29 commands available as native tools.
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"notion-agent": {
"command": "notion-agent",
"args": ["mcp"],
"env": {
"NOTION_TOKEN": "secret_xxxxxxxxxx"
}
}
}
}Claude Code (CLI)
claude mcp add notion-agent -- notion-agent mcpMake sure NOTION_TOKEN is set in your environment before running Claude Code.
Cursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"notion-agent": {
"command": "notion-agent",
"args": ["mcp"],
"env": {
"NOTION_TOKEN": "secret_xxxxxxxxxx"
}
}
}
}Want us to build this into your stack?
We set up notion-agent as part of your OpenClaw agent infrastructure — wired to your CRM, deal flow, and GTM motion. Your Notion becomes a live, agent-readable workspace.