How to Set Up the Notion MCP Server for Workspace Integration
Connect your Notion workspace to AI agents. Search pages, read databases, create content, and manage your Notion knowledge base through MCP.
Generate & Test Notion MCP Server Config
One-click export with environment variables & path locators for Claude Desktop, Cursor, Windsurf, and OpenAI Codex CLI.
Set Up the Notion MCP Server
The Notion MCP server connects AI agents to your Notion workspace, acting as an automated librarian. It enables your agents to search across documentation, read tabular databases, and create or append new content directly to your pages without you leaving your chat interface.
Prerequisites
- βΈA Notion account with workspace-level access.
- βΈA Notion API Integration Token.
- βΈNode.js 18+ installed on your host machine.
Creating a Notion Integration
- βΈGo to notion.so/my-integrations.
- βΈClick New integration.
- βΈName it (e.g., "MCP AI Agent") and select your target workspace.
- βΈSet capabilities: Read content, Update content, Insert content.
- βΈSave and copy the Internal Integration Token.
Sharing Pages with the Integration
[!IMPORTANT] Your integration token has zero access by default. You must explicitly share pages and databases with your integration before the MCP server can see them.
- βΈOpen the page or database in Notion.
- βΈClick Share (top right corner).
- βΈSearch for your integration name (e.g., "MCP AI Agent").
- βΈClick Invite. (Tip: Sharing a parent page automatically cascades access to all nested sub-pages!)
Configuration Setup
Add the following to your MCP client config file:
{
"mcpServers": {
"notion": {
"command": "npx",
"args": ["-y", "@suekou/mcp-notion-server"],
"env": {
"NOTION_API_TOKEN": "ntn_your_internal_token_here"
}
}
}
}Available Tools
Once running, your agent gains access to:
- βΈ
search_pagesβ Search across all shared pages using semantic keywords. - βΈ
get_pageβ Retrieve a specific page's content as Markdown. - βΈ
create_pageβ Create brand new Notion pages. - βΈ
update_pageβ Modify existing page blocks. - βΈ
query_databaseβ Query Notion databases with complex property filters. - βΈ
create_database_itemβ Add rows to Notion databases.
Example Workflows
- βΈMeeting Notes Summary: "Search my Notion for all meeting notes from this week, summarize the action items, and create a new page titled 'Weekly Digest'."
- βΈProject Tracking: "Query my 'Engineering Projects' database for all items with the status 'In Progress' and list their due dates."
- βΈDocumentation Retrieval: "Search my Notion for any documentation about our staging deployment process and explain it to me."
Troubleshooting
- βΈ
Page Not FoundError: The agent tried to read a page ID that hasn't been shared with the integration. Go into Notion and manually share the page. - βΈ
429 Too Many Requests: Notion has strict rate limits (averaging 3 requests per second). If the agent attempts to fetch too many pages simultaneously, it will hit a rate limit. Instruct the agent to add slight delays between tool calls.
Using with OpenAI Codex
You can use this MCP server with the OpenAI Codex CLI by adding it to your configuration:
codex mcp add --name notion --command "npx -y @modelcontextprotocol/server-notion" --env NOTION_API_KEY=your_integration_tokenFor a full list of recommended servers, see Best MCP Servers for OpenAI Codex.
Build your full agent toolstack in the Visual Generator
Combine Notion with databases, search APIs, and memory graphs in a single configuration file.
Related Guides
How to Use the Google Drive MCP Server for Document Access
Connect Google Drive to your AI agent for searching, reading, and managing documents, spreadsheets, and files stored in your Drive.
Cloud ServicesHow to Use the Cloudflare MCP Server for Edge Infrastructure
Manage Cloudflare Workers, KV stores, R2 buckets, and DNS settings through your AI agent using the Cloudflare MCP server.
Cloud ServicesManaging Kubernetes & Helm Administration Directly from Your AI Host
Connect your Kubernetes clusters and Helm releases to AI agents via MCP. Run safe container diagnostics, view cluster logs, and perform rollbacks.