notion-memory-mcp
Enables AI agents to use Notion as a persistent memory tier by providing tools to search, read, save (upsert) pages, append to pages, and query databases.
README
Notion Memory MCP š§
A Model Context Protocol server that turns Notion into a programmable memory tier for AI agents.
Give any MCP-compatible agent (Hermes, Claude Desktop, Cursor, custom agents) five clean tools to search, read, save, append, and query your Notion workspace ā making Notion the persistent "disk" layer of an agent's 3-tier memory architecture.
ā” L1 cache ā agent built-in memory (always in context)
š§® RAM ā mem0 / vector store (auto recall)
š¾ DISK ā Notion via this MCP ā you are here
Why
Agent memory solutions (mem0, honcho...) are opaque ā great for reflexive recall, invisible to humans. Notion is the opposite: fully visible and editable by humans, but not natively tool-callable.
This server bridges them: agents get programmatic access; humans keep full visual control.
Tools exposed
| Tool | What it does |
|---|---|
notion_search(query) |
Find pages/databases by title or content |
notion_read(page_id) |
Read a page as structured plain text |
notion_save(title, content) |
Upsert page by exact title (markdown-ish ā blocks) |
notion_append(page_id, text) |
Append to a page (running logs) |
notion_query_db(db_id) |
Query database rows with optional select-filter |
Setup
pip install -r requirements.txt
export NOTION_API_TOKEN=ntn_your_integration_token # notion.so/my-integrations
python3 server.py # stdio transport
Hermes Agent
hermes mcp add notion-memory -- python3 /path/to/server.py
# with env: NOTION_API_TOKEN set in ~/.hermes/.env
Claude Desktop / Cursor
Add to your MCP config:
{
"mcpServers": {
"notion-memory": {
"command": "python3",
"args": ["/path/to/server.py"],
"env": { "NOTION_API_TOKEN": "ntn_..." }
}
}
}
Design decisions
- Upsert-by-title (
notion_save): agents think in names, not UUIDs. Re-saving replaces the body ā idempotent writes. - Markdown-ish ā blocks: headings (#), bullets (-), paragraphs map to native Notion blocks. No complex AST.
- Read-open, write-scoped: reads hit whatever the integration can see; create/update only. No delete tool by design ā destructive ops stay human-only.
- stdlib + httpx + mcp: minimal dependencies, easy audit.
Skills demonstrated
MCP server development Ā· async Python (httpx + asyncio) Ā· Notion API (search/blocks/databases) Ā· protocol design for LLM tool use Ā· defensive API error mapping
License
MIT ā built by Shahjalal Shanto
Part of an agent-memory architecture: built-in cache + mem0 RAM + Notion disk.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.