> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 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`) |

> [!TIP]
>
> Prefer a local Python wrapper with a `NOTION_API_KEY`? See the [Notion Tool](https://praison.ai/docs/tools/external/notion.md).

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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 ok
```

***

## How 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.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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 summary
```

***

## Step-by-Step Setup

**1. 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

**2. Install PraisonAI with MCP support**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
pip install "praisonai[mcp]"
```

**3. Add and authenticate Notion**

> [tab] CLI (Interactive OAuth)
>
> ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> praisonai connectors add notion --auth
> ```
>
> In the Notion consent screen, select the workspace and specific pages your agent should access.

> [tab] Headless / SSH (--manual)
>
> ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> praisonai connectors add notion --auth --manual
> ```

> [tab] PraisonAI Dashboard
>
> Enable catalog connectors in your PraisonAIUI `config.yaml`:
>
> ```yaml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> mcp:
>   enabled: true
>   allow:
>     catalog: true
> ```
>
> Run `praisonai dashboard`, open **Connectors / MCP**, and click **Connect** on **Notion**.

**4. Verify and list available tools**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai mcp sync notion
```

**5. Use Notion with your agent**

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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:

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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

> [accordion] 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.

> [accordion] 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`.

> [accordion] Use approval='always' before enabling page writes
>
> Set `approval="always"` on `MCP(...)` whenever an agent is allowed to create or overwrite shared Notion documentation.

***

## Related

> [card] [List of Connectors](https://praison.ai/docs/features/connectors-list.md)
>
> Browse all popular connectors and step-by-step guides

> [card] [Remote MCP Connectors](https://praison.ai/docs/features/connectors.md)
>
> CLI commands, --manual sign-in, and Dashboard setup

> [card] [Notion Tool (Python)](https://praison.ai/docs/tools/external/notion.md)
>
> Local Python wrapper using NOTION\_API\_KEY

> [card] [MCP OAuth Authentication](https://praison.ai/docs/mcp/mcp-oauth.md)
>
> OAuth 2.1 PKCE flow and token management


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.