# Notion

```json
{
  "name": "Notion",
  "slug": "notion",
  "url": "https://composio.dev/toolkits/notion",
  "markdown_url": "https://composio.dev/toolkits/notion.md",
  "logo_url": "https://logos.composio.dev/api/notion",
  "categories": [
    "productivity & project management"
  ],
  "is_composio_managed": true,
  "updated_at": "2026-11-06T09:38:04.624Z"
}
```

![Notion logo](https://logos.composio.dev/api/notion)

## Description

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Notion MCP or direct API to search workspaces, create pages, update databases, and manage tasks through natural language.

## Summary

Notion is a collaborative workspace for notes, docs, wikis, and tasks. It streamlines team knowledge, project tracking, and workflow customization in one place.

## Categories

- productivity & project management

## Toolkit Details

- Tools: 57
- Triggers: 8
- Managed auth: Managed by Composio

## Images

- Logo: https://logos.composio.dev/api/notion

## Authentication

- **Oauth2**
  - Type: `oauth2`
  - Description: Oauth2 authentication for Notion.
  - Setup:
    - Configure Oauth2 credentials for Notion.
    - Use the credentials when creating an auth config in Composio.
- **Api Key**
  - Type: `api_key`
  - Description: Api Key authentication for Notion.
  - Setup:
    - Configure Api Key credentials for Notion.
    - Use the credentials when creating an auth config in Composio.

## Suggested Prompts

- Add meeting notes to project wiki page
- Create a new task database for Q3
- Archive completed sprint summary pages
- Duplicate onboarding checklist for new hire

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `NOTION_ADD_MULTIPLE_PAGE_CONTENT` | Add multiple content blocks (bulk, user-friendly) | Bulk-add content blocks as children of a Notion page or supported parent block, optionally after an existing child. Accepts simplified or full block formats and parses markdown in simplified text; long text handling varies by format, and simplified text segments may be truncated. |
| `NOTION_APPEND_CODE_BLOCKS` | Append code blocks (code, quote, equation) | Append code and technical blocks (code, quote, equation) to a Notion page. Use for: - Code snippets and programming examples (code) - Citations and highlighted quotes (quote) - Mathematical formulas and equations (equation) Supported block types: - code: Code with syntax highlighting (70+ languages including Python, JavaScript, Go, Rust, etc.) - quote: Block quotes for citations - equation: LaTeX/KaTeX mathematical expressions ⚠️ Code content is limited to 2000 characters per text.content field. For longer code, split into multiple code blocks. For other block types, use specialized actions: - append_text_blocks: paragraphs, headings, lists - append_task_blocks: to-do, toggle, callout - append_media_blocks: image, video, audio, files - append_layout_blocks: divider, columns, TOC - append_table_blocks: tables |
| `NOTION_APPEND_LAYOUT_BLOCKS` | Append layout blocks (divider, TOC, columns) | Append layout blocks (divider, TOC, breadcrumb, columns) to a Notion page. Supported types: - divider: Horizontal line separator - table_of_contents: Auto-generated from headings - breadcrumb: Page hierarchy navigation - column_list: Multi-column layout (requires 2+ columns, each with 1+ child block) For multi-column layouts, create column_list with column children in one request. Each column must contain at least 1 child block. For other blocks, use: append_text_blocks, append_task_blocks, append_code_blocks, append_media_blocks, or append_table_blocks. |
| `NOTION_APPEND_MEDIA_BLOCKS` | Append media blocks (image, video, audio, files) | Append media blocks (image, video, audio, file, pdf, embed, bookmark) to a Notion page. Use for: - Images and screenshots (image) - YouTube/Vimeo videos or direct video URLs (video) - Audio files and podcasts (audio) - File downloads (file) - PDF documents (pdf) - Embedded content from Twitter, Figma, CodePen, etc. (embed) - Link previews with metadata (bookmark) All media blocks require external URLs. For other block types, use specialized actions: - append_text_blocks: paragraphs, headings, lists - append_task_blocks: to-do, toggle, callout - append_code_blocks: code, quote, equation - append_layout_blocks: divider, columns, TOC - append_table_blocks: tables |
| `NOTION_APPEND_TABLE_BLOCKS` | Append table blocks | Append table blocks to a Notion page. Use for structured tabular data like spreadsheets, comparison charts, and status trackers. Example: { "table_width": 3, "has_column_header": true, "rows": [ {"cells": [[{"type": "text", "text": {"content": "Col1"}}], [...], [...]]} ] } ⚠️ Cell content limited to 2000 chars per text.content field. |
| `NOTION_APPEND_TASK_BLOCKS` | Append task blocks (to-do, toggle, callout) | Append to-do, toggle, and callout blocks to a Notion page or block that supports children. Text content is limited to 2,000 characters per text item, with at most 100 blocks per request. |
| `NOTION_APPEND_TEXT_BLOCKS` | Append text blocks (paragraphs, headings, lists) | Append text blocks (paragraphs, headings, lists) to a Notion page. This is the most commonly used action for adding content to Notion. Use for: documentation, notes, articles, outlines, lists. Supported block types: - paragraph: Regular text - heading_1, heading_2, heading_3: Section headers - bulleted_list_item: Bullet points - numbered_list_item: Numbered lists ⚠️ Text content is limited to 2000 characters per text.content field. For other block types, use specialized actions: - append_task_blocks: to-do, toggle, callout - append_code_blocks: code, quote, equation - append_media_blocks: image, video, audio, files - append_layout_blocks: divider, columns, TOC - append_table_blocks: tables |
| `NOTION_ARCHIVE_NOTION_PAGE` | Archive Notion Page | Archives (moves to trash) or unarchives (restores from trash) a specified Notion page. Limitation: Workspace-level pages (top-level pages with no parent page or database) cannot be archived via the API and must be archived manually in the Notion UI. |
| `NOTION_CREATE_COMMENT` | Create comment | Adds a comment to a Notion page (via `parent_page_id`) OR to an existing discussion thread (via `discussion_id`); cannot create new discussion threads on specific blocks (inline comments). |
| `NOTION_CREATE_DATABASE` | Create Notion Database | Creates a new Notion database as a subpage under a specified parent page with a defined properties schema. IMPORTANT NOTES: - The parent page MUST be shared with your integration, otherwise you'll get a 404 error - If you encounter conflict errors (409), retry the request as Notion may experience temporary save conflicts - For relation properties, you MUST provide the database_id of the related database - Parent ID must be a valid UUID format (with or without hyphens), not a template variable Use this action exclusively for creating new databases. |
| `NOTION_CREATE_FILE_UPLOAD` | Create Notion file upload | Creates a Notion FileUpload object for a direct, multipart, or external URL upload. Direct uploads require subsequent steps to send file contents and attach the uploaded file. |
| `NOTION_CREATE_NOTION_PAGE` | Create Notion page | Creates a new page in a Notion workspace under a specified parent page or database. Supports creating pages with markdown content using the native markdown parameter, or as an empty page that can be populated later. PREREQUISITES: - Parent page/database must exist and be accessible in your Notion workspace - Use search_pages or list_databases first to obtain valid parent IDs LIMITATIONS: - Cannot create root-level pages (must have a parent) - May encounter conflicts if creating pages too quickly - Title-based parent search is less reliable than using UUIDs - The markdown parameter is mutually exclusive with children/content parameters |
| `NOTION_CREATE_VIEW` | Create Notion view | Create a Notion view. |
| `NOTION_CREATE_VIEW_QUERY` | Create Notion view query | Create a Notion view query and return the first page of page references. |
| `NOTION_DELETE_BLOCK` | Delete a block | Archives a Notion block, page, or database by ID, moving it to Trash for possible later restoration. The connection requires update content capability; an archived ancestor may need to be restored before a descendant can be archived. |
| `NOTION_DELETE_VIEW` | Delete Notion view | Delete a Notion view. |
| `NOTION_DELETE_VIEW_QUERY` | Delete Notion view query | Delete a cached Notion view query. |
| `NOTION_DUPLICATE_PAGE` | Duplicate page | Duplicates a Notion page under a specified parent page or database, copying supported content and writable properties. Page parents receive only the title property; some blocks and properties are skipped, block retrieval may be incomplete, and failure can leave a partial copy. |
| `NOTION_FETCH_ALL_BLOCK_CONTENTS` | Fetch All Notion Block Contents | Fetches child blocks of a Notion block or page across result pages, with optional recursive expansion. Recursive results may be partial due to depth or block limits or inaccessible nested blocks; limit information is returned when recursion is used. |
| `NOTION_FETCH_BLOCK_CONTENTS` | Fetch Notion Block Children | Retrieves a paginated list of direct child blocks for a Notion block or page. Use returned block IDs to access nested content; for an unsupported block-type error, the result is an empty list with an explanatory message. |
| `NOTION_FETCH_BLOCK_METADATA` | Fetch Notion block metadata | Fetches metadata for a Notion block (including pages, which are special blocks) using its UUID. Returns block type, properties, and basic info but not child content. Prerequisites: 1) Block/page must be shared with your integration, 2) Use valid block_id from API responses (not URLs). For child blocks, use fetch_block_contents instead. Common 404 errors mean the block isn't accessible to your integration. |
| `NOTION_FETCH_COMMENTS` | Fetch comments | Fetches a page of unresolved comments for a specified Notion block or page ID. The block or page must be shared with the integration, which must have Read comments capability enabled. |
| `NOTION_FETCH_DATA` | Fetch Notion Data | Search accessible Notion pages and/or databases by title or list them without a query. Returns one page of results with simplified IDs, titles and types, plus a cursor when more results are available; simplified titles use only the first rich-text segment. |
| `NOTION_FETCH_DATABASE` | Fetch Database | Fetches a Notion database's structural metadata (properties, title, etc.) via its `database_id`, not the data entries; `database_id` must reference an existing database. |
| `NOTION_FETCH_ROW` | Fetch database row | Retrieves a Notion database row's properties and metadata; use fetch_block_contents for page content blocks. |
| `NOTION_GET_ABOUT_USER` | Get about user | Retrieves detailed information about a specific Notion user, such as their name, avatar, and email, based on their unique user ID. |
| `NOTION_GET_PAGE_MARKDOWN` | Get page markdown | Retrieve a Notion page as Notion-flavored Markdown in a single API call without recursive block-children fetching. The response indicates whether content was truncated and identifies blocks that could not be rendered. |
| `NOTION_GET_PAGE_PROPERTY_ACTION` | Get page property | Call this to get a specific property from a Notion page when you have a valid `page_id` and `property_id`; handles pagination for properties returning multiple items. |
| `NOTION_GET_PLUGIN` | Get plugin | Get a temporary download URL for one Notion Agent Skills plugin. |
| `NOTION_GET_VIEW_QUERY_RESULTS` | Get Notion view query results | Get a page of results from a cached Notion view query. |
| `NOTION_INSERT_ROW_DATABASE` | Insert row database | Creates a page (row) in a specified Notion database with optional properties and child blocks. The database must be shared with the integration and cannot have multiple data sources; long child-block text segments may be truncated, and additional blocks are appended after page creation. |
| `NOTION_INSERT_ROW_FROM_NL` | Insert Row From Natural Language | Creates a new row (page) in a Notion database from a natural language description. Fetches the database schema at runtime, uses an LLM to generate the correctly-formatted property payload, and creates the page. |
| `NOTION_LIST_DATA_SOURCE_TEMPLATES` | List data source templates | Lists a page of accessible templates for a Notion data source, including their IDs and names. Use the returned cursor to retrieve further pages. |
| `NOTION_LIST_FILE_UPLOADS` | List Notion file uploads | Tool to retrieve file uploads for the current bot integration, sorted by most recent first. Use when you need to list all file uploads or paginate through file upload history. |
| `NOTION_LIST_PLUGINS` | List plugins | List one cursor page of Agent Skills plugins shared with the connected Notion integration. Follow next_cursor until has_more is false. |
| `NOTION_LIST_USERS` | List users | Retrieves a paginated list of users (excluding guests) from the Notion workspace; the number of users returned per page may be less than the requested `page_size`. |
| `NOTION_LIST_VIEWS` | List Notion views | List Notion views for a database or data source. |
| `NOTION_MOVE_PAGE` | Move Page | Moves a Notion page to a new parent page or database data source. For a database destination, provide the data source ID. |
| `NOTION_QUERY_DATABASE` | Query database | Query a shared Notion database for paginated entries, with sorting by database properties or page timestamps. Supply a database UUID and use the returned cursor to retrieve further results. |
| `NOTION_QUERY_DATABASE_WITH_FILTER` | Query database with filter | Tool to query a Notion database with server-side filtering, sorting, and pagination. Use when you need to retrieve a subset of rows by property, date, status, or other conditions. |
| `NOTION_QUERY_DATA_SOURCE` | Query data source | Query a Notion data source for pages or child data sources using filters, sorts, and optional property selection. Results support cursor pagination, with a requested page size of 1 to 100. |
| `NOTION_REPLACE_PAGE_CONTENT` | Replace page content (with backup) | Replaces a page's child blocks by optionally backing up current content, archiving existing children, and appending new children in batches. The workflow is not atomic and failures can leave partial changes; backups omit some block types and nested content. |
| `NOTION_RETRIEVE_COMMENT` | Retrieve Comment | Tool to retrieve a specific comment by its ID. Use when you have a comment ID and need to fetch its details. |
| `NOTION_RETRIEVE_DATABASE_PROPERTY` | Retrieve Database Property | Tool to retrieve a specific property object of a Notion database. Use when you need to get details about a single database column/property. |
| `NOTION_RETRIEVE_FILE_UPLOAD` | Retrieve Notion file upload | Tool to retrieve details of a Notion File Upload object by its identifier. Use when you need to check the status or details of an existing file upload. |
| `NOTION_RETRIEVE_PAGE` | Retrieve page | Retrieve a Notion page's properties and metadata by page ID, rather than its block content. The input must be a UUID, not a full page URL. |
| `NOTION_RETRIEVE_VIEW` | Retrieve Notion view | Retrieve a Notion view and its configuration. |
| `NOTION_SEARCH_NOTION_PAGE` | Search Notion pages and databases | Search Notion pages and databases by title, with an object-type filter that defaults to pages. Search indexing can lag and results may be incomplete; an empty query can help find accessible items, and optional client-side property filtering reduces page response size. |
| `NOTION_SEND_FILE_UPLOAD` | Send file upload | Tool to transmit file contents to Notion for a file upload object. Use after creating a file upload object to send the actual file data. |
| `NOTION_UPDATE_BLOCK` | Update block | Updates existing Notion block's text content. ⚠️ CRITICAL: Content limited to 2000 chars. Cannot change block type or archive blocks. Content exceeding 2000 chars will fail with validation error. For longer content, split across multiple blocks using add_multiple_page_content. |
| `NOTION_UPDATE_PAGE` | Update Page | Update page properties, icon, cover, or archive status. IMPORTANT: Property names are workspace-specific and case-sensitive. Use NOTION_FETCH_ROW or NOTION_FETCH_DATABASE first to discover exact property names and valid select/status options. Common errors: - "X is not a property that exists": Discover properties with NOTION_FETCH_ROW - "Invalid status option": Check valid options with NOTION_FETCH_DATABASE - "should be defined": Wrap values: {'Field': {'type': value}} Property formats: title/rich_text use {'text': {'content': 'value'}}, select/status use {'name': 'option'} |
| `NOTION_UPDATE_PAGE_MARKDOWN` | Update page markdown | Apply synchronous targeted edits or replace a Notion page using Markdown. |
| `NOTION_UPDATE_ROW_DATABASE` | Update Database Row (Page) | Updates a specific row/page within a Notion database by its page UUID (row_id). IMPORTANT CLARIFICATION: This action updates INDIVIDUAL ROWS (pages) in a database, NOT the database structure. - To update a ROW/PAGE: Use THIS action with `row_id` (the page UUID) - To update DATABASE SCHEMA (columns, properties, title): Use NOTION_UPDATE_SCHEMA_DATABASE with `database_id` REQUIRED: `row_id` is MANDATORY. This is the UUID of the specific page/row to update. Do NOT pass `database_id` to this action - that parameter does not exist here. Common issues: (1) Use UUID from page URL, not the full URL (2) Ensure page is shared with integration (3) Match property names exactly as in database (4) Use 'status' type for Status properties, not 'select' (5) Retry on 409 Conflict errors (concurrent updates) Supports updating properties, icon, cover, or archiving the row. |
| `NOTION_UPDATE_SCHEMA_DATABASE` | Update database schema | Updates an existing Notion database's schema including title, description, and/or properties (columns). IMPORTANT NOTES: - At least one update (title, description, or properties) must be provided - The database must be shared with your integration - Property names are case-sensitive and must match exactly - When changing a property to 'relation' type, you MUST provide the database_id of the target database - Removing properties will permanently delete that column and its data - Use NOTION_FETCH_DATA first to get the exact property names and database structure Common errors: - 'database_id' missing: Ensure you're passing the database_id parameter (not page_id) - 'data_source_id' undefined: When changing to relation type, database_id is required in PropertySchemaUpdate - Property name mismatch: Names must match exactly including case and special characters |
| `NOTION_UPDATE_VIEW` | Update Notion view | Update a Notion view. |
| `NOTION_UPSERT_ROW_DATABASE` | Upsert database rows | Upserts Notion database rows in bulk by querying a filter for each item, then creating a row if none is returned or updating a match. Only the first query page is examined; multiple matches can update the first or produce an error, with per-item results. |
| `NOTION_WHO_AM_I` | Who Am I | Return the identity (workspace, owner) of the connected Notion account. |

## Supported Triggers

| Trigger slug | Name | Description |
|---|---|---|
| `NOTION_COMMENT_CREATED` | Comment Created | Triggers when a new comment is created in Notion. Optional `page_id` filter scopes to comments on a specific page. When omitted, fires for any new comment in the workspace the integration has access to. Requires the 'Read comments' capability on the Notion integration. If a connection was authorized before that capability was enabled, the user must re-authorize the connection for comment events to flow. |
| `NOTION_DATABASE_CREATED` | Database Created | Triggers when a new Notion database (the container) is created. A database is the post-2025-09-03 container that holds one or more data sources. This trigger fires for the container's creation event (`database.created`), distinct from `NOTION_DATASOURCE_CREATED` which fires when a new data source is added to an existing database. Most customers calling Notion's `POST /v1/databases` (the legacy API) or creating a database via the Notion UI will see this event. Adding a new data source to an existing database fires `data_source.created` instead — use `NOTION_DATASOURCE_CREATED` for that. Notion's payload puts `entity.type: "block"` (the container is a `child_database` block in the content tree) and `entity.id` is the database id. |
| `NOTION_DATASOURCE_CREATED` | Data Source Created | Triggers when a new Notion data source is created. Fires workspace-wide. The payload's `data.parent` carries the data source's tree parent (typically the teamspace) for downstream filtering. A single template-based database creation can fire multiple `data_source.created` events at once — one per data source the template instantiates. |
| `NOTION_DATASOURCE_SCHEMA_UPDATED` | Data Source Schema Updated | Triggers when a Notion data source's schema is updated. Fires on column add / remove / rename. Payload includes `data.updated_properties: [{id, name, action}]` so consumers can discriminate the kind of change downstream. Optional `data_source_id` filter scopes to schema changes on a single data source. When omitted, fires for any schema change in the workspace the integration has access to. Note: adding a column also fires `page.properties_updated` once per existing row in the data source. Customers wanting a single structural-change signal should use this trigger. |
| `NOTION_PAGE_CONTENT_UPDATED` | Page Content Updated | Triggers when the body content of a Notion page is updated. Customer optionally scopes with at most one of: - data_source_id: any row in this data source - page_id: this specific page - parent_page_id: any page whose immediate parent is this page With none set, fires for any page content edit in the workspace the integration has access to. Notion aggregates content edits within a short window (~60s typical). |
| `NOTION_PAGE_CREATED` | Page Created | Triggers when a new Notion page is created. Customer optionally scopes with at most one of: - data_source_id: new row in this data source - parent_page_id: new sub-page under this page (immediate parent only) With neither set, fires for any new page in the workspace the integration has access to. Notion sends ~60s aggregation latency on most events. |
| `NOTION_PAGE_PROPERTIES_UPDATED` | Page Properties Updated | Triggers when properties of a Notion page are updated. Customer optionally scopes with at most one of: - data_source_id: any row in this data source - page_id: this specific page - parent_page_id: any page whose immediate parent is this page With none set, fires for any property change in the workspace the integration has access to. Adding a column to a data source fires this trigger once per existing row. Customers can branch on `data.updated_properties` (array of property IDs) to filter downstream. |
| `NOTION_VIEW_CREATED` | View Created | Triggers when a new Notion view is created. Fires workspace-wide. The payload includes `data.view_type` (`table`, `board`, `gallery`, `calendar`, `list`, `timeline`, `gantt`) and `data.parent` pointing at the view's tree parent (typically the teamspace), so customers can filter downstream. |

## Installation and MCP Setup

### Path 1: SDK Installation

#### Path 1, Step 1: Install Composio

Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
```python
pip install composio composio_openai openai
```

```typescript
npm install @composio/core @composio/openai openai
```

#### Path 1, Step 2: Create a Composio session

Initialize Composio with the OpenAI Responses provider and create a session scoped to Notion
```python
import json
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
client = OpenAI()

session = composio.create(user_id="your-user-id", toolkits=["notion"])
tools = session.tools()
```

```typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["notion"] });
const tools = await session.tools();
```

#### Path 1, Step 3: Run Notion tools with your agent

Send a request, execute the Notion tool calls through the session, and print the final answer
```python
response = client.responses.create(
    model="gpt-5.6-sol",
    tools=tools,
    input=[{"role": "user", "content": "Summarize all tasks due this week in Notion"}],
)

while True:
    tool_calls = [o for o in response.output if o.type == "function_call"]
    if not tool_calls:
        break
    results = composio.provider.handle_tool_calls(response=response, session=session)
    response = client.responses.create(
        model="gpt-5.6-sol",
        tools=tools,
        previous_response_id=response.id,
        input=[
            {"type": "function_call_output", "call_id": call.call_id, "output": json.dumps(results[i])}
            for i, call in enumerate(tool_calls)
        ],
    )

print(response.output_text)
```

```typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Summarize all tasks due this week in Notion" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
```

### Path 2: MCP Server Setup

#### Path 2, Step 1: Install Composio

Install the Composio SDK and your agent framework
```python
pip install composio claude-agent-sdk
```

```typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
```

#### Path 2, Step 2: Create a session with MCP enabled

Create a session scoped to Notion and read its MCP URL and headers
```python
from composio import Composio

composio = Composio()
session = composio.create(user_id="your-user-id", toolkits=["notion"], mcp=True)
```

```typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["notion"],
  mcp: true,
});
```

#### Path 2, Step 3: Connect your agent to the MCP server

Pass the session's MCP URL and headers to your agent and run a Notion request
```python
import asyncio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions, AssistantMessage, TextBlock

options = ClaudeAgentOptions(
    mcp_servers={
        "composio": {
            "type": "http",
            "url": session.mcp.url,
            "headers": session.mcp.headers,
        }
    },
    system_prompt="You are a helpful assistant with access to Notion tools.",
    tools=[],
    allowed_tools=["mcp__composio__*"],
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query("Summarize all tasks due this week in Notion")
        async for message in client.receive_response():
            if isinstance(message, AssistantMessage):
                for block in message.content:
                    if isinstance(block, TextBlock):
                        print(block.text)

asyncio.run(main())
```

```typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Summarize all tasks due this week in Notion",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
```

## Why Use Composio?

### 1. AI Native Notion Integration

- Supports both Notion MCP and direct API based integrations
- Structured, LLM-friendly schemas for reliable tool execution
- Rich coverage for reading, writing, and querying your Notion data

### 2. Managed Auth

- Built-in OAuth handling with automatic token refresh and rotation
- Central place to manage, scope, and revoke Notion access
- Per user and per environment credentials instead of hard-coded keys

### 3. Agent Optimized Design

- Tools are tuned using real error and success rates to improve reliability over time
- Comprehensive execution logs so you always know what ran, when, and on whose behalf

### 4. Enterprise Grade Security

- Fine-grained RBAC so you control which agents and users can access Notion
- Scoped, least privilege access to Notion resources
- Full audit trail of agent actions to support review and compliance

## Use Notion with any AI Agent Framework

Choose a framework you want to connect Notion with:

- [Claude Code](https://composio.dev/toolkits/notion/framework/claude-code)
- [Cursor](https://composio.dev/toolkits/notion/framework/cursor)
- [ChatGPT](https://composio.dev/toolkits/notion/framework/chatgpt)
- [Claude Cowork](https://composio.dev/toolkits/notion/framework/claude-cowork)
- [Antigravity](https://composio.dev/toolkits/notion/framework/antigravity)
- [OpenAI Agents SDK](https://composio.dev/toolkits/notion/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/notion/framework/claude-agents-sdk)
- [Grok Bot](https://composio.dev/toolkits/notion/framework/grok-bot)
- [Muse](https://composio.dev/toolkits/notion/framework/muse)
- [Codex](https://composio.dev/toolkits/notion/framework/codex)
- [Kimi Code](https://composio.dev/toolkits/notion/framework/kimi)
- [Grok Build](https://composio.dev/toolkits/notion/framework/grok-build)
- [VS Code](https://composio.dev/toolkits/notion/framework/vscode)
- [OpenCode](https://composio.dev/toolkits/notion/framework/opencode)
- [OpenClaw](https://composio.dev/toolkits/notion/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/notion/framework/hermes-agent)
- [Atomic Agent](https://composio.dev/toolkits/notion/framework/atomic-agent)
- [CLI](https://composio.dev/toolkits/notion/framework/cli)
- [Google ADK](https://composio.dev/toolkits/notion/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/notion/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/notion/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/notion/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/notion/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/notion/framework/crew-ai)
- [Pydantic AI](https://composio.dev/toolkits/notion/framework/pydantic-ai)
- [AutoGen](https://composio.dev/toolkits/notion/framework/autogen)

## Related Toolkits

- [Google Sheets](https://composio.dev/toolkits/googlesheets) - Google Sheets is a cloud-based spreadsheet tool for real-time collaboration and data analysis. It lets teams work together from anywhere, updating information instantly.
- [Airtable](https://composio.dev/toolkits/airtable) - Airtable combines the flexibility of spreadsheets with the power of a database for easy project and data management. Teams use Airtable to organize, track, and collaborate with custom views and automations.
- [Asana](https://composio.dev/toolkits/asana) - Asana is a collaborative work management platform for teams to organize and track projects. It streamlines teamwork, boosts productivity, and keeps everyone aligned on goals.
- [Google Tasks](https://composio.dev/toolkits/googletasks) - Google Tasks is a to-do list and task management tool integrated into Gmail and Google Calendar. It helps you organize, track, and complete tasks across your Google ecosystem.
- [Linear](https://composio.dev/toolkits/linear) - Linear is a modern issue tracking and project planning tool for fast-moving teams. It helps streamline workflows, organize projects, and boost productivity.
- [Jira](https://composio.dev/toolkits/jira) - Jira is Atlassian’s platform for bug tracking, issue tracking, and agile project management. It helps teams organize work, prioritize tasks, and deliver projects efficiently.
- [Clickup](https://composio.dev/toolkits/clickup) - ClickUp is an all-in-one productivity platform for managing tasks, docs, goals, and team collaboration. It streamlines project workflows so teams can work smarter and stay organized in one place.
- [Monday](https://composio.dev/toolkits/monday) - Monday.com is a customizable work management platform for project planning and collaboration. It helps teams organize tasks, automate workflows, and track progress in real time.
- [Addressfinder](https://composio.dev/toolkits/addressfinder) - Addressfinder is a data quality platform for verifying addresses, emails, and phone numbers. It helps you ensure accurate customer and contact data every time.
- [Agiled](https://composio.dev/toolkits/agiled) - Agiled is an all-in-one business management platform for CRM, projects, and finance. It helps you streamline workflows, consolidate client data, and manage business processes in one place.
- [Aha!](https://composio.dev/toolkits/aha) - Aha! is a product management platform for setting strategy, prioritizing ideas, and planning roadmaps. It helps product teams align goals with development work and make better decisions.
- [AirOps MCP](https://composio.dev/toolkits/airops_mcp) - AirOps MCP is AirOps' managed content platform exposing brand context, knowledge bases, and workflows. Use it to give agents brand-aware content, automate content workflows, and track Brand Kit edits.
- [Amazing Marvin](https://composio.dev/toolkits/amazing_marvin) - Amazing Marvin is a personal productivity app for tasks, projects, habits, planning, time tracking, and rewards. It helps you build a flexible workflow that matches how you actually work.
- [Ambiguous MCP](https://composio.dev/toolkits/ambiguous_mcp) - Ambiguous MCP is a provider-hosted workspace service for documents, spreadsheets, tasks, CRM, calendar, mail, chat, and administration. It provides one workspace-scoped connection for managing these resources through natural language.
- [AnyDB](https://composio.dev/toolkits/any_db) - AnyDB is a flexible collaborative database platform for organizing records, files, and automated workflows. It helps teams centralize data, collaborate on records, and automate routine tasks.
- [ApptiveGrid](https://composio.dev/toolkits/apptivegrid) - ApptiveGrid is a collaborative no-code database and app platform for spaces, grids, forms, and structured records. It helps teams organize operational data, collect inputs, and build lightweight business apps without custom backend work.
- [Ascora](https://composio.dev/toolkits/ascora) - Ascora is a cloud-based field service management platform for service businesses. It streamlines scheduling, invoicing, and customer operations in one place.
- [Atlassian MCP](https://composio.dev/toolkits/atlassian_mcp) - Atlassian Rovo MCP connects agents to Jira, Jira Service Management, Confluence, Bitbucket, Compass, and Teamwork Graph workflows. It lets teams surface and act on Atlassian data while respecting existing user permissions.
- [Basecamp](https://composio.dev/toolkits/basecamp) - Basecamp is a project management and team collaboration tool by 37signals. It helps teams organize tasks, share files, and communicate efficiently in one place.
- [Beeminder](https://composio.dev/toolkits/beeminder) - Beeminder is an online goal-tracking platform that uses monetary pledges to keep you motivated. Stay accountable and hit your targets with real financial incentives.

## Frequently Asked Questions

### Do I need my own developer credentials to use Notion with Composio?

No, you can get started immediately using Composio's built-in Notion app. For production, we recommend configuring your own OAuth credentials.

### Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. [Learn more](https://docs.composio.dev/tool-router/overview).

### Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. [Learn more](https://trust.composio.dev).

### What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
