Notion MCP
Provides tools for searching, reading, creating, and appending Notion pages, as well as managing project context, logging decisions, and generating prompts from Notion data.
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 MCPsearch for launch checklist"
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 MCP
A secure, open-source Model Context Protocol server for connecting AI agents and apps to Notion.
We built this because the existing hosted/default Notion MCP flow was down or unreliable when we needed it. Instead of waiting on a black-box integration, this project gives teams a simple Notion bridge they can own, run locally, deploy privately, customize, and audit.
Notion MCP is designed to work with any app or team setup:
No agent architecture yet: use it as a clean local Notion MCP server for search, read, create, and append workflows.
Intermediate agent setup: connect it to Codex, Claude Desktop, Cursor, or your own assistant as a safe documentation bridge.
Advanced multi-agent architecture: use it as the Notion knowledge layer behind a lead agent, task agents, product agents, release agents, or app-specific orchestration.
The goal is easy, useful, accommodating infrastructure: Notion stays your source of truth, and agents only get the tools you intentionally expose.
What It Does
V1 includes:
Search Notion pages.
Retrieve Notion page metadata, blocks, and readable plain text.
Create new Notion pages under a configured root page.
Append content to existing Notion pages.
List configured apps/projects.
Retrieve lightweight app/project context.
Log decisions to Notion.
Generate simple Codex-ready prompts from project context.
Audit-log every tool call.
Enforce risk levels for every tool.
V1 intentionally does not include destructive tools, production-control tools, billing actions, auth changes, email sending, deployments, or unrestricted app control.
Architecture
AI Client or Agent
|
| calls approved MCP tools
v
Notion MCP
|
| uses a scoped Notion integration token
v
Notion Workspace or Page TreeFor more advanced teams, you can add app connectors behind the same permission model:
Lead Agent
|
v
Notion MCP / App Gateway
|
|-------------------------------
| | | |
Notion App API CI Tool Support ToolThe important rule: agents should call approved MCP tools, not receive unrestricted direct access to every system.
Quick Start
npm install
npm run build
cp .env.example .envCreate a Notion integration at:
https://www.notion.com/my-integrations
Then:
Copy the integration secret into
NOTION_TOKEN.Open the Notion page you want this server to access.
Use Notion's page menu to connect/share the page with your integration.
Copy the page ID into
NOTION_ROOT_PAGE_ID.
.env:
NOTION_TOKEN=
NOTION_ROOT_PAGE_ID=
SUPABASE_URL=
SUPABASE_SERVICE_ROLE_KEY=
MCP_GATEWAY_API_KEY=
OPENAI_API_KEY=
NODE_ENV=development
AUDIT_LOG_FILE=.audit/tool-calls.jsonlOnly NOTION_TOKEN and NOTION_ROOT_PAGE_ID are required for the core Notion tools. Supabase is optional.
Run Locally
Development:
npm run devBuilt server:
npm run build
npm startStdio wrapper for MCP clients:
./scripts/run-mcp.shThe wrapper loads .env from the repo so you do not need to copy secrets into global client config files.
Connect To Codex
./scripts/register-codex-mcp.sh notion_mcp
codex mcp listRestart Codex or open a fresh session after registration.
Equivalent config:
[mcp_servers.notion_mcp]
command = "/absolute/path/to/notion-mcp/scripts/run-mcp.sh"
args = []
cwd = "/absolute/path/to/notion-mcp"
startup_timeout_sec = 120Connect To Other MCP Clients
Generic MCP client config:
{
"mcpServers": {
"notion-mcp": {
"command": "/absolute/path/to/notion-mcp/scripts/run-mcp.sh",
"args": []
}
}
}This works best for desktop/local agent clients. Hosted deployments can be added later with HTTP transport, auth, and tenancy controls.
Tools
notion_search
Search the connected Notion workspace/page tree.
{ "query": "launch checklist" }Returns:
{
"results": [
{
"title": "Launch Checklist",
"pageId": "notion-page-id",
"type": "page",
"url": "https://notion.so/...",
"lastEditedTime": "timestamp",
"summary": "Notion page titled \"Launch Checklist\"."
}
]
}notion_get_page
Retrieve a Notion page and block content.
{ "pageId": "notion-page-id" }Returns pageId, title, url, raw blocks, and extracted plainText.
notion_create_page
Create a new page under NOTION_ROOT_PAGE_ID or a provided parent page.
{
"title": "New Project Decision",
"content": "Content to add to the page",
"parentPageId": "optional-page-id"
}Create-only. It does not overwrite existing pages.
notion_append_to_page
Append content to an existing page.
{
"pageId": "notion-page-id",
"content": "New decision or note to append"
}Append-only. It does not delete or replace page content.
project_list_apps
Returns project/app names configured in src/tools/projectTools.ts.
project_get_context
{ "projectName": "Example App" }Use this to give agents a lightweight local context map before they search deeper in Notion.
mission_log_decision
{
"projectName": "Example App",
"decisionTitle": "Use MCP as the documentation bridge",
"decisionDetails": "Agents can write safe append-only documentation through MCP.",
"category": "architecture"
}codex_generate_prompt
{
"projectName": "Example App",
"goal": "Implement the next safe documentation workflow",
"constraints": ["Use existing app architecture", "Prioritize safe implementation"]
}Security Model
Every tool has a risk level.
Executable in V1:
read: search, retrieve, list context.safe_write: create or append documentation without deleting or replacing content.
Prepared but blocked in V1:
operational: non-destructive live app operations.restricted: destructive, sensitive, financial, production, auth, access, or security-changing actions.
Human approval should be required before any future tool can:
Delete content.
Change user access.
Change billing or license state.
Lock users out.
Send external emails.
Modify production settings.
Trigger production deployments.
Change security policies.
Change secrets, API keys, or auth settings.
Recommended security practices:
Use a dedicated Notion integration token for each deployment.
Share only the specific Notion pages/databases the server needs.
Keep
.envout of git.Rotate tokens if they are exposed.
Prefer local/file audit logs for prototypes and Supabase/Postgres audit logs for teams.
Add new tools behind explicit schemas, risk levels, and tests.
Audit Logging
Every tool call is logged with:
idtimestamptoolNameriskLevelinputSummarysuccesserrorMessagerequestingAgentprojectNamenotionPageIddurationMs
If Supabase is configured, logs are inserted into tool_calls. Otherwise logs are written to .audit/tool-calls.jsonl.
Optional Supabase table:
create table if not exists tool_calls (
id uuid primary key,
timestamp timestamptz not null,
tool_name text not null,
risk_level text not null,
input_summary text not null,
success boolean not null,
error_message text,
requesting_agent text,
project_name text,
notion_page_id text,
duration_ms integer not null
);Works With Any App Maturity Level
No app architecture:
Use Notion MCP as your first bridge between AI and project docs.
Keep decisions, prompts, checklists, notes, and roadmaps in Notion.
Intermediate app architecture:
Configure your projects in
src/tools/projectTools.ts.Use
mission_log_decisionandcodex_generate_promptto keep implementation work tied to Notion context.
Advanced agent architecture:
Add connector folders under
src/connectors/.Keep app-specific APIs behind approved tools.
Require human approval for operational and restricted actions.
Use audit logs to review what each agent did.
Customize
Edit:
src/tools/projectTools.tsto define your own apps/projects.
Add future connectors under:
src/connectors/When adding a new tool:
Define a Zod input schema.
Assign a risk level.
Wrap execution with
runLoggedTool.Keep restricted actions blocked unless you add an explicit human approval workflow.
Add focused tests.
Test
npm test
npm run typecheck
npm run buildManual tests:
Run
notion_searchwith a known query.Run
notion_get_pagewith a valid page ID.Run
notion_create_pagewithoutparentPageIdand confirm it appears underNOTION_ROOT_PAGE_ID.Run
notion_append_to_pageand confirm existing page content is preserved.Remove Supabase env vars and confirm
.audit/tool-calls.jsonlreceives entries.Remove
NOTION_TOKENand confirm Notion tools fail with a clear missing environment error.Use an invalid Notion page ID and confirm the tool fails and logs the failure.
Confirm operational/restricted risk levels throw in tests.
Deployment Notes
V1 is a local stdio MCP server. That is the simplest and safest first shape for personal agents, desktop clients, and local developer workflows.
For hosted use, add:
HTTP or Streamable HTTP transport.
API key or OAuth auth.
Per-tenant Notion tokens.
Rate limiting.
Centralized audit logging.
Deployment-specific secret management.
Do not deploy a public shared instance with one global Notion token. Each user/team should bring their own Notion integration and credentials.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Limelight-Management-Group/notion-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server