Notion (MCP)
This tutorial is a community contribution and is not supported by the Open WebUI team. It serves as a demonstration on how to customize Open WebUI for your specific use case. Want to contribute? Check out the contributing tutorial.
This guide enables Open WebUI to interact with your Notion workspaceβsearching pages, reading content, creating docs, and managing databasesβusing the Model Context Protocol (MCP).
This integration utilizes the official Notion MCP server, which specializes in automatic Markdown conversion. When the AI reads a Notion page, it receives clean, structured Markdown rather than raw JSON blocks, significantly improving the model's ability to understand and summarize your notes.
Method 1: Streamable HTTP (Recommended)β
This method connects directly to Notion's hosted MCP endpoint (https://mcp.notion.com/mcp). It utilizes standard OAuth and is natively supported by Open WebUI without extra containers.
Streamable HTTP is preferred for its simplicity and enhanced security. It handles authentication via Notion's official OAuth flow, meaning you do not need to manually manage secrets or integration tokens.
You MUST set the WEBUI_SECRET_KEY environment variable in your Docker setup to a persistent value.
If you do not, your Notion OAuth session will become invalid every time you restart the container, forcing you to re-authenticate repeatedly.
1. Configure Toolβ
You can automatically prefill the connection settings by importing the JSON configuration below.
- Navigate to Admin Panel > Settings > External Tools.
- Click the + (Plus) button to add a new tool.
- Click Import (top right of the modal).
- Paste the following JSON snippet:
[
{
"type": "mcp",
"url": "https://mcp.notion.com/mcp",
"spec_type": "url",
"spec": "",
"path": "openapi.json",
"auth_type": "oauth_2.1",
"key": "",
"info": {
"id": "ntn",
"name": "Notion",
"description": "A note-taking and collaboration platform that allows users to create, organize, and share notes, databases, and other content."
}
}
]
auth_type can also be set to oauth_2.1_static if you are using pre-created OAuth client credentials instead of dynamic client registration.
- Register: Click the Register Client button (next to the Auth dropdown).
- Click Save.

2. Authenticate & Grant Accessβ
Once the tool is added, you must authenticate to link your specific workspace.
- Open any chat window.
- Click the + (Plus) button in the chat input bar.
- Navigate to Integrations > Tools.
- Toggle the Notion switch to ON.

- Authorize: You will be redirected to a "Connect with Notion MCP" screen.
- Ensure the correct Workspace is selected in the dropdown.
- Click Continue.
For security reasons, Notion's OAuth session may expire after a period of inactivity or if you restart your Open WebUI instance. If this happens, you will see a Failed to connect to MCP server 'ntn' error.
This is intended behavior by Notion to keep your workspace secure. To refresh your session, revisit the steps above to complete the "Connect with Notion MCP" authorization flow again.

Method 2: Self-Hosted via MCPO (Advanced)β
This method is for advanced users who prefer to run the MCP server locally within their own infrastructure using MCPO. Unlike Streamable HTTP, this method requires you to manually manage your own credentials.
Direct local execution (stdio) of MCP servers is not natively supported in Open WebUI. To run the Notion MCP server locally (using Docker or Node.js) within your infrastructure, you must use MCPO to bridge the connection.
To use this method, you must first create an internal integration to obtain a Secret Key. Please complete the Creating an Internal Integration section below before proceeding with the configuration steps here.
1. Configure MCPOβ
Follow the installation instructions in the MCPO Repository to get it running. Configure your MCPO instance to run the Notion server using one of the runtimes below by adding the JSON block to your mcpo-config.json file.
Note: Replace secret_YOUR_KEY_HERE with the secret obtained from the Creating an Internal Integration section.
- Node (npx)
- Docker
This configuration uses the official Node.js package.
{
"mcpServers": {
"notion": {
"command": "npx",
"args": [
"-y",
"@notionhq/notion-mcp-server"
],
"env": {
"NOTION_TOKEN": "secret_YOUR_KEY_HERE"
}
}
}
}
This configuration uses the official Docker image.
{
"mcpServers": {
"notion": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"NOTION_TOKEN",
"mcp/notion"
],
"env": {
"NOTION_TOKEN": "secret_YOUR_KEY_HERE"
}
}
}
}
2. Connect Open WebUIβ
Once MCPO is running and configured with Notion:
- Navigate to Admin Panel > Settings > External Tools.
- Click the + (Plus) button.
- Click Import (top right of the modal).
- Paste the following JSON snippet (update the URL with your MCPO address):
[
{
"type": "openapi",
"url": "http://<YOUR_MCPO_IP>:<PORT>/notion",
"spec_type": "url",
"spec": "",
"path": "openapi.json",
"auth_type": "none",
"info": {
"id": "notion-local",
"name": "Notion (Local)",
"description": "Local Notion integration via MCPO"
}
}
]
- Click Save.
Creating an Internal Integrationβ
Required for Method 2, creating an internal integration within Notion ensures you have the necessary credentials and permission scopes readily available.
1. Create Integrationβ
- Navigate to Notion My Integrations.
- Click the + New integration button.
- Fill in the required fields:
- Integration Name: Give it a recognizable name (e.g., "Open WebUI MCP").
- Associated workspace: Select the specific workspace you want to connect.
- Type: Select Internal.
- Logo: Uploading a logo is optional but helps identify the integration.
- Click Save.
You must select Internal for the integration type. Public integrations require a different OAuth flow that is not covered in this guide.

2. Configure Capabilities & Copy Secretβ
Once saved, you will be directed to the configuration page.
- Copy Secret: Locate the Internal Integration Secret field. Click Show and copy this key. You will need it for MCPO configuration.
- Review Capabilities: Ensure the following checkboxes are selected under the "Capabilities" section:
- β Read content
- β Update content
- β Insert content
- (Optional) Read user information including email addresses.
- Click Save changes if you modified any capabilities.
While the Notion MCP server limits the scope of the API (e.g., databases cannot be deleted), exposing your workspace to LLMs carries a non-zero risk.
Security-conscious users can create a safer, Read-Only integration by unchecking Update content and Insert content. The AI will be able to search and answer questions based on your notes but will be physically unable to modify or create pages.
Your Internal Integration Secret allows access to your Notion data. Treat it like a password. Do not share it or commit it to public repositories.

3. Grant Page Access (Manual)β
By default, your new internal integration has zero access to your workspace. It cannot see any pages until you explicitly invite it. If you skip this step, the AI will return "Object not found" errors.
You can grant access centrally or on a per-page basis.
Method A: Centralized Access (Recommended)β
Still in the Notion Integration dashboard:
- Click the Access tab (next to Configuration).
- Click the Edit access button.
- A modal will appear allowing you to select specific pages or "Select all" top-level pages.
- Check the pages you want the AI to read/edit and click Save.

Method B: Page-Level Accessβ
- Go to a specific Notion Page or Database you want the AI to access.
- Click the ... (three dots) menu in the top right corner of the page.
- Select Connections (in the "Add connections" section).
- Search for your integration name (e.g., "Open WebUI MCP") and click Connect.
- You must repeat this for every root page or database you want the AI to be able to search or edit.
