MCP server wrapping the Notion Python SDK (v2025-09-03)
Project description
notion-mcp
MCP (Model Context Protocol) server that wraps ldraney/notion-sdk — a Python SDK for the Notion API v2025-09-03.
Overview
This project exposes the full Notion Python SDK as MCP tools, allowing AI assistants (Claude, etc.) to interact with Notion workspaces through a standardized tool interface.
Why this over the official Notion MCP servers?
The problem
There are two official Notion MCP implementations:
- Open-source
makenotion/notion-mcp-server(TypeScript) — issues and PRs "not actively monitored," may be sunset in the future - Closed-source hosted MCP at
mcp.notion.com— what Claude Desktop's "Connections > Notion" uses
Neither works reliably. This is well-documented in issues like #142 ("Two Notion MCP servers, neither work well"). The open-source server was abandoned for 3.5 months after the v2025-09-03 breaking API change, shipped a broken v2.0.0 (Dec 2025), and still has open showstopper bugs in v2.1.0.
Comparison
| Official open-source | Official hosted | ldraney-notion-mcp |
|
|---|---|---|---|
| Status | "Not actively monitored" | Closed-source | Actively maintained |
| Language | TypeScript | N/A | Python |
| API version | 2025-09-03 (broken) | Unknown | 2025-09-03 (working) |
| Auth | Bearer token (version header trap) | OAuth only | Bearer token (correct headers always) |
| Serialization | Double-stringifies nested objects (#196) | N/A | Accepts both JSON strings and raw objects |
| Property updates | Blocked by additionalProperties: false (#184) |
Unknown | Works correctly |
| Database queries | retrieve-a-database was missing for 5 weeks |
Some tools gated to Enterprise | query_database auto-resolves data sources |
| Tool count | 22 | ~10 | 24 |
| Convenience tools | None | Limited | archive_page, archive_database, query_database |
| Install | npm | Claude Desktop only | PyPI (uvx), .mcpb (planned) |
Key advantages
- Correct API headers always — Built on
ldraney-notion-sdk, which always sends theNotion-Version: 2025-09-03header correctly - LLM-friendly parameter handling —
str | dictunion types so tools don't break when LLMs pass raw objects instead of JSON strings - Convenience tools — Operations like
archive_page,archive_database, andquery_database(with auto data-source resolution) reduce multi-step workflows to single calls - Works everywhere —
uvx,pip, Claude Code, any MCP-compatible client
SDK Coverage
Every method in notion-sdk maps to an MCP tool, organized by module:
Pages
| Tool | SDK Method | Notion Endpoint |
|---|---|---|
create_page |
create_page() |
POST /v1/pages |
get_page |
get_page() |
GET /v1/pages/{id} |
update_page |
update_page() |
PATCH /v1/pages/{id} |
archive_page |
archive_page() |
PATCH /v1/pages/{id} |
move_page |
move_page() |
POST /v1/pages/{id}/move |
Databases
| Tool | SDK Method | Notion Endpoint |
|---|---|---|
create_database |
create_database() |
POST /v1/databases |
get_database |
get_database() |
GET /v1/databases/{id} |
update_database |
update_database() |
PATCH /v1/databases/{id} |
archive_database |
archive_database() |
PATCH /v1/databases/{id} |
query_database |
query_database() |
auto-resolves data source, then POST /v1/data_sources/{id}/query |
Data Sources
| Tool | SDK Method | Notion Endpoint |
|---|---|---|
get_data_source |
get_data_source() |
GET /v1/data_sources/{id} |
update_data_source |
update_data_source() |
PATCH /v1/data_sources/{id} |
query_data_source |
query_data_source() |
POST /v1/data_sources/{id}/query |
list_data_source_templates |
list_data_source_templates() |
GET /v1/data_sources/{id}/templates |
Blocks
| Tool | SDK Method | Notion Endpoint |
|---|---|---|
get_block |
get_block() |
GET /v1/blocks/{id} |
get_block_children |
get_block_children() |
GET /v1/blocks/{id}/children |
append_block_children |
append_block_children() |
PATCH /v1/blocks/{id}/children |
update_block |
update_block() |
PATCH /v1/blocks/{id} |
delete_block |
delete_block() |
DELETE /v1/blocks/{id} |
Users
| Tool | SDK Method | Notion Endpoint |
|---|---|---|
get_users |
get_users() |
GET /v1/users |
get_self |
get_self() |
GET /v1/users/me |
Comments
| Tool | SDK Method | Notion Endpoint |
|---|---|---|
create_comment |
create_comment() |
POST /v1/comments |
get_comments |
get_comments() |
GET /v1/comments |
Search
| Tool | SDK Method | Notion Endpoint |
|---|---|---|
search |
search() |
POST /v1/search |
24 tools total covering the complete Notion API v2025-09-03 surface.
Architecture
notion-mcp/
├── src/
│ └── notion_mcp/
│ ├── server.py # MCP server entry point
│ ├── tools/
│ │ ├── pages.py # Page tools
│ │ ├── databases.py # Database & data source tools
│ │ ├── blocks.py # Block tools
│ │ ├── users.py # User tools
│ │ ├── comments.py # Comment tools
│ │ └── search.py # Search tools
│ └── ...
├── tests/
├── pyproject.toml
└── README.md
Each tool module mirrors the SDK's mixin structure, keeping a clean 1:1 mapping.
Prerequisites
- Python >= 3.10
- A Notion integration API key (
NOTION_API_KEY) notion-sdk(installed as a dependency)
Setup
# Clone
git clone https://github.com/ldraney/notion-mcp.git
cd notion-mcp
# Install
pip install -e .
# Configure
export NOTION_API_KEY="ntn_..."
Usage
With Claude Code
Add to your Claude Code MCP config (~/.claude/settings.json or project settings):
{
"mcpServers": {
"notion": {
"command": "python",
"args": ["-m", "notion_mcp"],
"env": {
"NOTION_API_KEY": "ntn_..."
}
}
}
}
Standalone
python -m notion_mcp
Related
ldraney/notion-sdk— The underlying Python SDK this server wraps
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 ldraney_notion_mcp-0.1.8.tar.gz.
File metadata
- Download URL: ldraney_notion_mcp-0.1.8.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba357a8018ddf23fc5a483f197b6e8806618d3d573c0f6a70bf9ad0a641859af
|
|
| MD5 |
2e466ad1ac4d83281df5e8d263cf0911
|
|
| BLAKE2b-256 |
16fe31069af5871fdd03fe8188b9f7ddcd2a6d761b7cd78afe3ed78104cd8f78
|
Provenance
The following attestation bundles were made for ldraney_notion_mcp-0.1.8.tar.gz:
Publisher:
publish.yml on ldraney/notion-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ldraney_notion_mcp-0.1.8.tar.gz -
Subject digest:
ba357a8018ddf23fc5a483f197b6e8806618d3d573c0f6a70bf9ad0a641859af - Sigstore transparency entry: 931485719
- Sigstore integration time:
-
Permalink:
ldraney/notion-mcp@1e10cbe1092c44e2ba6ce768c6f851f54e41f678 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ldraney
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1e10cbe1092c44e2ba6ce768c6f851f54e41f678 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ldraney_notion_mcp-0.1.8-py3-none-any.whl.
File metadata
- Download URL: ldraney_notion_mcp-0.1.8-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94d73f4f58dfc9adc61070069bc4544563f9516add695787299248b3913665e3
|
|
| MD5 |
eb17e6e060adad3a2729bbe27f6b6469
|
|
| BLAKE2b-256 |
c789436e6ffb0dc21036634f2a73c9ae1271b2456768ce4f506bf2a95d3dec97
|
Provenance
The following attestation bundles were made for ldraney_notion_mcp-0.1.8-py3-none-any.whl:
Publisher:
publish.yml on ldraney/notion-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ldraney_notion_mcp-0.1.8-py3-none-any.whl -
Subject digest:
94d73f4f58dfc9adc61070069bc4544563f9516add695787299248b3913665e3 - Sigstore transparency entry: 931485777
- Sigstore integration time:
-
Permalink:
ldraney/notion-mcp@1e10cbe1092c44e2ba6ce768c6f851f54e41f678 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ldraney
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1e10cbe1092c44e2ba6ce768c6f851f54e41f678 -
Trigger Event:
push
-
Statement type: