Notion Connector
Connect PraisonAI agents to Notion pages and databases with official remote MCP and OAuth 2.1
Connect your PraisonAI agents to your Notion workspace to search company docs, summarize meeting notes, query databases, and draft pages through Notion’s official remote MCP server.
| Setting | Value |
|---|---|
| Catalog ID | notion |
| Endpoint | https://mcp.notion.com/mcp |
| Transport | Streamable HTTP (Remote) |
| Authentication | OAuth 2.1 (browser or --manual) |
from praisonaiagents import Agent, MCP
agent = Agent(
name="Knowledge Assistant",
instructions="Search Notion pages and answer questions with page titles.",
tools=MCP(
"https://mcp.notion.com/mcp",
oauth=True,
server_name="notion",
),
)
agent.start("Search my Notion workspace for Q3 launch checklists and summarize open items")The user asks for project documentation; PraisonAI queries authorized Notion pages via OAuth 2.1 and summarizes the findings.
graph LR
User["👤 User"] --> Agent["🤖 PraisonAI Agent"]
Agent --> Auth["🔐 OAuth 2.1 PKCE"]
Auth --> Notion["📝 Notion Remote MCP<br/>mcp.notion.com/mcp"]
Notion --> Result["✅ Pages & Databases"]
classDef input fill:#6366F1,stroke:#7C90A0,color:#fff
classDef agent fill:#8B0000,stroke:#7C90A0,color:#fff
classDef auth fill:#F59E0B,stroke:#7C90A0,color:#fff
classDef ok fill:#10B981,stroke:#7C90A0,color:#fff
class User input
class Agent agent
class Auth auth
class Notion,Result okHow It Works
During OAuth 2.1 sign-in, Notion lets you choose the exact workspace and pages your agent is allowed to access. Tokens are saved locally in ~/.praisonai/mcp-auth.json (0600) and shared across Python, CLI, and Dashboard.
sequenceDiagram
participant User
participant CLI as praisonai CLI
participant NAuth as Notion OAuth 2.1
participant Store as mcp-auth.json
participant NMCP as Notion MCP Server
participant Agent as PraisonAI Agent
User->>CLI: praisonai connectors add notion --auth
CLI->>NAuth: Open OAuth 2.1 consent flow
NAuth-->>User: Select workspace and allowed pages
NAuth-->>Store: Store OAuth token (0600)
User->>Agent: Search Notion docs
Agent->>Store: Load cached token
Agent->>NMCP: Call search and fetch tools
NMCP-->>Agent: Page content and database rows
Agent-->>User: Grounded summaryStep-by-Step Setup
- Prerequisites
- A Notion account with permission to authorize integrations in your workspace
- Know which top-level pages or databases you want to grant access to during consent
- Install PraisonAI with MCP support
bash pip install "praisonai[mcp]" - Add and authenticate Notion
CLI (Interactive OAuth)
bash praisonai connectors add notion --authIn the Notion consent screen, select the workspace and specific pages your agent should access.
Headless / SSH (–manual)
bash praisonai connectors add notion --auth --manualPraisonAI Dashboard
Enable catalog connectors in your PraisonAIUI
config.yaml:yaml mcp: enabled: true allow: catalog: trueRun
praisonai dashboard, open Connectors / MCP, and click Connect on Notion. - Verify and list available tools
bash praisonai mcp sync notion - Use Notion with your agent
python from praisonaiagents import Agent, MCP agent = Agent( name="Docs Search", instructions="Cite the exact Notion page title for every fact you return.", tools=MCP("https://mcp.notion.com/mcp", oauth=True, server_name="notion"), ) agent.start("Find our onboarding guide in Notion and list the Day 1 checklist")
Scope Tools for Safety
Limit knowledge-lookup agents to search/fetch tools and require approval before editing or creating pages:
from praisonaiagents import Agent, MCP
agent = Agent(
name="Notion Reader",
instructions="Read and summarize Notion pages without editing them.",
tools=MCP(
"https://mcp.notion.com/mcp",
oauth=True,
server_name="notion",
allowed_tools=["notion-search", "notion-fetch"],
),
)Common Workflows
- Meeting Notes Action Items:
"Search Notion for this week's standup notes and extract every owner and due date." - Drafting Spec Pages:
"Fetch the Product Spec template in Notion and draft a new spec for our webhook retry feature."
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Search returns empty results | Pages were not selected during Notion OAuth consent | Re-authorize (praisonai connectors logout notion --yes then praisonai connectors auth notion) and select the parent pages |
401 Unauthorized on praisonai connectors test notion | connectors test does not attach stored OAuth tokens | Verify with praisonai mcp sync notion |
| Cannot create pages in a database | Agent only has read tools allowed or page is read-only | Check --allow / allowed_tools and Notion page permissions |
Best Practices
Grant access only to specific Notion folders
During OAuth consent, share only the project or wiki parent pages the agent needs rather than your entire company workspace.
Check exact tool names with praisonai mcp sync notion
Notion’s remote MCP tool names can evolve — run praisonai mcp sync notion to inspect exact tool names before configuring allowed_tools.
Use approval='always' before enabling page writes
Set approval="always" on MCP(...) whenever an agent is allowed to create or overwrite shared Notion documentation.