A better Notion integration for AI agents
Project description
better-notion-mcp
A powerful Model Context Protocol (MCP) server that connects your AI agents (Claude, Cursor, etc.) directly to your Notion workspace.
Introduction
better-notion-mcp turns your Notion workspace into a semantic long-term memory and functional toolset for AI. Instead of just reading pages, it allows your agent to:
- Remember facts in a local database for instant recall.
- Search & Query your entire knowledge base.
- Create & Edit pages with rich content (markdown, tables, mermaid, code).
- Notify you via Telegram when important updates happen.
Features
- 🔌 Standard MCP Support: Seamless integration with Claude Desktop, Cursor, and any MCP-compatible client.
- 🧱 Rich Block Support: Create and edit paragraphs, headings, code blocks, tables, and lists.
- 🧠 Dual Memory: Combines Notion's structured storage with a fast, local SQLite "agent memory" for facts.
- 🔔 Real-time Alerts: Optional Telegram integration for push notifications from your agent.
- 🌍 Cross-Platform: Configurable for Mac, Windows, and Linux.
Configuration
1. Prerequisites
- Notion Token: My Integrations -> New Integration -> Copy Secret.
- Page ID: Copy ID from the URL of your root page -> Connect page to your integration.
2. Add to Claude Desktop / Cursor
Add the following to your claude_desktop_config.json (Claude) or mcp.json (VS Code/Cursor).
Using uvx (Fastest, no install needed)
{
"mcpServers": {
"notion": {
"command": "uvx",
"args": ["better-notion-mcp"],
"env": {
"NOTION_API_KEY": "secret_...",
"NOTION_PAGE_ID": "page_id_...",
"TELEGRAM_BOT_TOKEN": "bot_token_...",
"TELEGRAM_CHAT_ID": "chat_id_...",
"AGENT_MEMORY_PATH": "/path/to/db"
}
}
}
}
Using pipx (Alternative)
{
"mcpServers": {
"notion": {
"command": "pipx",
"args": ["run", "better-notion-mcp"],
"env": {
"NOTION_API_KEY": "..."
}
}
}
}
Note: You can also
pip install better-notion-mcpglobally if you prefer, then just usebetter-notion-mcpas the command.
Tools
The server exposes the following tools to your AI agent:
📚 Page Management
-
create_page(title, content)- Creates a new sub-page under your configured root page.
- Args:
title(str),content(str, optional)
-
list_sub_pages(parent_id)- Lists all sub-pages for a given page ID (or root).
- Args:
parent_id(str, optional)
-
read_page_content(page_id)- extraction of page content as simplified Markdown.
- Args:
page_id(str)
✍️ Content Editing
-
update_page(page_id, title, content, type, language)- Appends new blocks to a page.
- Args:
type: 'paragraph', 'bulleted_list_item', 'code', 'table'language: for code blocks (e.g. 'python', 'mermaid')
-
log_to_notion(title, content)- Quick-create wrapper to append daily logs/notes to the root page.
🧠 Memory & Search
-
remember_fact(fact)- Stores a snippet in the local vector-like SQL store.
-
search_memory(query)- Semantic-like search over stored facts.
-
get_recent_memories(limit)- Retrieves the latest N stored facts.
🔔 Utilities
send_alert(message)- Sends a push notification to your configured Telegram chat.
Development
To contribute or run locally:
- Clone:
git clone https://github.com/shubhamomar/better-notion-mcp.git - Dev Install:
uv pip install -e .(orpip install -e .) - Run:
export NOTION_API_KEY=... better-notion-mcp
License
This project is licensed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file better_notion_mcp-0.1.1.tar.gz.
File metadata
- Download URL: better_notion_mcp-0.1.1.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b0980a8a5e87ec655da307fb2b6e5084012a78c144300c37ea625ef025f4388
|
|
| MD5 |
b011f8a241ecdcaad384de18e6fa0f5f
|
|
| BLAKE2b-256 |
80dcd77d5979e99e91bf74451c7f48746842bf936bb53088fc207c895bcf6d66
|
File details
Details for the file better_notion_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: better_notion_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81237bdb3247e8c3f442dfa8d125d7564bf414733eff3145685f485caec2ca6a
|
|
| MD5 |
9c50787e082f61f70d45fa05558df97c
|
|
| BLAKE2b-256 |
3c8c0db3c4840957034bc0a2e1334f396a2555be5cd98ba64148a788d56ee1bb
|
File details
Details for the file better_notion_mcp-0.1.1-py2.py3-none-any.whl.
File metadata
- Download URL: better_notion_mcp-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b804646c8560e169abf74669fc7f3ef1a255f94d317e46075a0b715b1416f50
|
|
| MD5 |
41bb9953c402b007ba188231e83130a7
|
|
| BLAKE2b-256 |
ce3846604d9bf16dd7e8d676a08988ba2ba2884868c8697b823d63092a21cdc0
|