Allows interaction with Notion's API to search for pages and databases, retrieve page details, query database rows, create and update pages, and append content blocks.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Notion Remote MCP Serversearch for '2024 Project Roadmap' and summarize the content"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Notion Remote MCP Server (OAuth + PKCE)
Remote MCP server that connects to Notion via OAuth and exposes a practical, enterprise-friendly tool surface. It implements Streamable HTTP transport over POST /mcp, MCP-compatible OAuth endpoints, PKCE, token refresh, and encrypted token storage.
Quick Start (5 minutes)
Create a Notion integration
Create a public integration in Notion.
Add the OAuth redirect URL:
http://localhost:8787/oauth/callbackEnable capabilities (least-privilege):
Read content
Update content
Insert content
Read user info
Configure env
Generate an encryption key and HMAC secret:
Set:
TOKEN_ENC_KEYto the generated base64 keySTATE_SIGNING_KEYto another random secret(Optional)
TOKEN_ENC_KEY_FILE/STATE_SIGNING_KEY_FILEfor file-based secrets (defaults under./data/)NOTION_CLIENT_ID/NOTION_CLIENT_SECRETBASE_URL(if not localhost)ALLOWED_REDIRECT_URISfor your MCP clientNOTION_VERSION(default: 2025-09-03)
Run
Server: http://localhost:8787
OAuth for MCP Clients
This server is an OAuth 2.1 Authorization Server for MCP clients and uses Notion OAuth behind the scenes.
Authorization URL:
Token endpoint:
Supported scopes:
notion.readnotion.writenotion.admin
Token refresh is supported via grant_type=refresh_token.
Dynamic client registration example:
MCP Endpoint
POST /mcp(Streamable HTTP)GET /mcpreturns 405 (only POST is supported)
Headers:
Authorization: Bearer <access_token>MCP-Protocol-Version: 2025-11-25(optional; supported: 2025-11-25, 2025-06-18, 2025-03-26)Accept: application/json, text/event-stream
OAuth metadata:
/.well-known/oauth-protected-resource/.well-known/oauth-authorization-serverPOST /register(dynamic client registration)
Tool Surface
All tools validate inputs with JSON Schema and return JSON-encoded results.
Tool | Scope | Purpose |
|
| Search pages/databases |
|
| Retrieve a page |
|
| Retrieve a database/data source |
|
| Query database/data source rows |
|
| Create a page |
|
| Update page properties |
|
| Append blocks |
|
| Governance: list users |
|
| Governance: integration identity |
JSON Schemas
notion.search
Input:
Output:
notion.get_page
Input:
Output:
notion.get_database
Input:
Output:
notion.query_database
Input:
Output:
notion.create_page
Input:
Output:
notion.update_page
Input:
Output:
notion.append_block
Input:
Output:
notion.list_users
Input:
Output:
notion.whoami
Input:
Output:
Examples
List tools:
Search pages:
Create a page in a database:
Docker
Security Notes
OAuth 2.1 + PKCE enforced for MCP clients.
Token storage is AES-256-GCM encrypted via
TOKEN_ENC_KEY.Access tokens are short-lived; refresh tokens rotate access tokens.
Origin allowlist for browser clients via
ALLOWED_ORIGINS.Rate limiting: defaults are 120 requests/min for
/mcpand 30 requests/min for auth endpoints.If encryption/state keys are not set, they are auto-generated and stored under
./data/for local dev.
Trade-offs / Next Steps
Notion does not document PKCE support for its own OAuth; PKCE is enforced for MCP clients, and upstream Notion OAuth uses standard code exchange.
Dynamic client registration stores client metadata in the encrypted store; could add client secrets and approval workflows for stricter control.
Tool output is returned as JSON text; could add structured content types once supported.
Add rate limiting, audit logs, and per-tenant encryption keys for stronger governance.
For Notion API version 2025-09-03, prefer
data_source_idfor database-like operations;database_idis kept for backward compatibility.