Cloud ServicesΒ·
intermediate
Β·10 min readΒ·Apr 4, 2026

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.

Notionworkspaceknowledge basenotesdatabasesproductivity
Interactive Tool
1-Click Export

Generate & Test Notion MCP Server Config

One-click export with environment variables & path locators for Claude Desktop, Cursor, Windsurf, and OpenAI Codex CLI.

Open in Generator

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

  1. β–ΈGo to notion.so/my-integrations.
  2. β–ΈClick New integration.
  3. β–ΈName it (e.g., "MCP AI Agent") and select your target workspace.
  4. β–ΈSet capabilities: Read content, Update content, Insert content.
  5. β–Έ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.

  1. β–ΈOpen the page or database in Notion.
  2. β–ΈClick Share (top right corner).
  3. β–ΈSearch for your integration name (e.g., "MCP AI Agent").
  4. β–Έ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:

json
{
  "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 Found Error: 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:

bash
codex mcp add --name notion --command "npx -y @modelcontextprotocol/server-notion" --env NOTION_API_KEY=your_integration_token

For a full list of recommended servers, see Best MCP Servers for OpenAI Codex.

Ready to Deploy?

Build your full agent toolstack in the Visual Generator

Combine Notion with databases, search APIs, and memory graphs in a single configuration file.

Customize in Generator

Related Guides