# How to integrate Notion MCP with OpenCode

```json
{
  "title": "How to integrate Notion MCP with OpenCode",
  "toolkit": "Notion",
  "toolkit_slug": "notion",
  "framework": "OpenCode",
  "framework_slug": "opencode",
  "url": "https://composio.dev/toolkits/notion/framework/opencode",
  "markdown_url": "https://composio.dev/toolkits/notion/framework/opencode.md",
  "updated_at": "2026-05-06T08:21:42.664Z"
}
```

## Introduction

### How to integrate Notion MCP with OpenCode
This guide explains how to connect Notion MCP to OpenCode using Composio Connect, which simplifies OAuth, API changes, and reliability concerns.
There are two ways to set this up:
- Via [Composio Connect MCP](https://dashboard.composio.dev/)
- Via the [Composio CLI](https://dashboard.composio.dev/)

## Also integrate Notion with

- [ChatGPT](https://composio.dev/toolkits/notion/framework/chatgpt)
- [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)
- [Claude Code](https://composio.dev/toolkits/notion/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/notion/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/notion/framework/codex)
- [Cursor](https://composio.dev/toolkits/notion/framework/cursor)
- [VS Code](https://composio.dev/toolkits/notion/framework/vscode)
- [OpenClaw](https://composio.dev/toolkits/notion/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/notion/framework/hermes-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)

## TL;DR

### Why use Composio?
Composio provides a single MCP server or CLI tool that exposes a set of meta-tools, allowing you to:
- Connect to 1,000+ apps with on-demand tool loading, so you do not fill your LLM context window with unnecessary tool definitions.
- Use programmatic tool calling through a remote Bash tool, letting LLMs write their own code to handle complex tool chaining. This reduces back-and-forth for frequent tool calls.
- Handle large tool responses outside the LLM context to keep conversations lean.

## Connect Notion to OpenCode

### Connect Notion with OpenCode
### Option 1: Using Composio CLI
### 1. Install Composio CLI
Install the Composio CLI, authenticate, and initialize your project:

```bash
# Install the Composio CLI
curl -fsSL https://composio.dev/install | bash

# Authenticate with Composio
composio login
```

## What is the Notion MCP server, and what's possible with it?

The Notion MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Notion account. It provides structured and secure access to your notes, docs, wikis, and tasks, so your agent can perform actions like creating pages, managing databases, adding content, commenting, and organizing your Notion workspace for you.
- Bulk content creation and formatting: Let your agent efficiently add and format multiple blocks of text, lists, or markdown content to Notion pages in one go.
- Automated page and database management: Have your agent create new pages, duplicate existing ones, or set up entire databases with custom properties—no manual setup required.
- Smart commenting and collaboration: Enable your agent to add comments to pages or discussion threads, making real-time collaboration smoother.
- Workspace organization and cleanup: Ask your agent to archive, delete, or restore pages and blocks, keeping your workspace tidy and up to date.
- Deep block and structure retrieval: Direct your agent to fetch metadata, list child blocks, or dig into nested content for analysis, reporting, or workflow automation.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `NOTION_ADD_MULTIPLE_PAGE_CONTENT` | Add multiple content blocks (bulk, user-friendly) | Efficiently adds multiple standard content blocks to a notion page in a single api call with automatic markdown parsing. the 'content' field in notionrichtext blocks now automatically detects and parses markdown formatting including headers (# ## ###), bold (**text**), italic (*text*), strikethrough (~~text~~), inline code (`code`), links ([text](url)), and more. ideal for bulk content creation, ai agents, and replacing multiple individual add page content calls. supports automatic text formatting, content splitting, and up to 100 blocks per request. |
| `NOTION_APPEND_BLOCK_CHILDREN` | Append complex blocks (advanced, full control) | Appends complex blocks with full notion block structure to a parent block or page. use for advanced scenarios requiring precise control: code blocks, tables, embeds, nested children within blocks, or when working with pre-built notion block objects. requires full notion api block schema - use add multiple page content for simpler content creation. |
| `NOTION_ARCHIVE_NOTION_PAGE` | Archive Notion Page | Archives (moves to trash) or unarchives (restores from trash) a specified notion page. |
| `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; use this action exclusively for creating new databases. |
| `NOTION_CREATE_NOTION_PAGE` | Create Notion page | Creates a new empty page in a notion workspace. |
| `NOTION_DELETE_BLOCK` | Delete a block | Archives a notion block, page, or database using its id, which sets its 'archived' property to true (like moving to "trash" in the ui) and allows it to be restored later. |
| `NOTION_DUPLICATE_PAGE` | Duplicate page | Duplicates a notion page, including all its content, properties, and nested blocks, under a specified parent page or workspace. |
| `NOTION_FETCH_BLOCK_CONTENTS` | Fetch Notion Block Children | Retrieves a paginated list of direct, first-level child block objects along with contents for a given parent notion block or page id; use block ids from the response for subsequent calls to access deeply nested content. |
| `NOTION_FETCH_BLOCK_METADATA` | Fetch Notion block metadata | Fetches metadata for a notion block (or page, as pages are blocks) using its valid uuid; if the block has children, use fetch block contents to fetch their contents. |
| `NOTION_FETCH_COMMENTS` | Fetch comments | Fetches unresolved comments for a specified notion block or page id. |
| `NOTION_FETCH_DATA` | Fetch Notion Data | Fetches notion items (pages and/or databases) from the notion workspace, use this to get minimal data about the items in the workspace with a query or list all items in the workspace with minimal data |
| `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_ME` | Get About Me | Retrieves the user object for the bot associated with the current notion integration token, typically to obtain the bot's user id for other api operations. |
| `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_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_INSERT_ROW_DATABASE` | Insert row database | Creates a new page (row) in a specified notion database. |
| `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_QUERY_DATABASE` | Query database | Queries a notion database for pages (rows), where rows are pages and columns are properties; ensure sort property names correspond to existing database properties. |
| `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_SEARCH_NOTION_PAGE` | Search Notion page | Searches notion pages and databases by title; an empty query lists all accessible items, useful for discovering ids or as a fallback when a specific query yields no results. |
| `NOTION_UPDATE_BLOCK` | Update block | Updates an existing notion block's textual content or type-specific properties (e.g., 'checked' status, 'color'), using its `block id` and the specified `block type`. |
| `NOTION_UPDATE_PAGE` | Update Page | Tool to update the properties, icon, cover, or archive status of a page. use when you need to modify existing page attributes. |
| `NOTION_UPDATE_ROW_DATABASE` | Update row database | Updates or archives an existing notion database row (page) using its `row id`, allowing modification of its icon, cover, and/or properties; ensure the target page is accessible and property details (names/ids and values) align with the database schema and specified formats. |
| `NOTION_UPDATE_SCHEMA_DATABASE` | Update database schema | Updates an existing notion database's title, description, and/or properties; at least one of these attributes must be provided to effect a change. |

## Supported Triggers

| Trigger slug | Name | Description |
|---|---|---|
| `NOTION_ALL_PAGE_EVENTS_TRIGGER` | All Page Events | Triggers when any Notion page is created or updated across the workspace. |
| `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_COMMENTS_ADDED_TRIGGER` | New Comment | Triggers when a new comment is added to a specified Notion block or page. |
| `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_ADDED_TO_DATABASE` | New Page | Triggers when a new page is added to a Notion database. |
| `NOTION_PAGE_ADDED_TRIGGER` | Page Added to Page | Fires when a new subpage (a `child_page` type block) is added under a specified parent Notion page. |
| `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_PAGE_UPDATED_TRIGGER` | Page Updated | Triggers when any block within a specified Notion page is updated. |
| `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. |

## Creating MCP Server - Stand-alone vs Composio SDK

Once connected, OpenCode can access the Notion MCP server via Composio to run the app actions you authorize, directly from your coding workflow.

## Complete Code

None listed.

## Conclusion

### Way Forward
Now that Notion is connected, extend your setup by connecting the other apps you already use every day, so your agent can run true cross-app workflows end to end.
- Connect Calendar to turn threads into scheduled meetings automatically.
- Connect Slack or Teams to post summaries, approvals, and alerts where your team works.
- Connect Notion, Linear, Jira, or Asana to convert requests into tickets, tasks, and docs.
- Connect Drive, Dropbox, or OneDrive to fetch, file, and share attachments without manual steps.
Start with one workflow you do repeatedly, then keep adding apps as you find new handoffs. With everything behind a single MCP endpoint, your agent can coordinate multiple tools safely and reliably in one conversation.

## How to build Notion MCP Agent with another framework

- [ChatGPT](https://composio.dev/toolkits/notion/framework/chatgpt)
- [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)
- [Claude Code](https://composio.dev/toolkits/notion/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/notion/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/notion/framework/codex)
- [Cursor](https://composio.dev/toolkits/notion/framework/cursor)
- [VS Code](https://composio.dev/toolkits/notion/framework/vscode)
- [OpenClaw](https://composio.dev/toolkits/notion/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/notion/framework/hermes-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)

## 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.
- [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.
- [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.
- [Boxhero](https://composio.dev/toolkits/boxhero) - Boxhero is a cloud-based inventory management platform for SMBs, offering real-time updates, barcode scanning, and team collaboration. It helps businesses streamline stock tracking and analytics for smarter inventory decisions.
- [Breathe HR](https://composio.dev/toolkits/breathehr) - Breathe HR is cloud-based HR software for SMEs to manage employee data, absences, and performance. It simplifies HR admin, making it easy to keep employee records accurate and up to date.
- [Breeze](https://composio.dev/toolkits/breeze) - Breeze is a project management platform designed to help teams plan, track, and collaborate on projects. It streamlines workflows and keeps everyone on the same page.
- [Bugherd](https://composio.dev/toolkits/bugherd) - Bugherd is a visual feedback and bug tracking tool for websites. It helps teams and clients report website issues directly on live sites for faster fixes.
- [Canny](https://composio.dev/toolkits/canny) - Canny is a platform for managing customer feedback and feature requests. It helps teams prioritize product decisions based on real user insights.
- [Chmeetings](https://composio.dev/toolkits/chmeetings) - Chmeetings is a church management platform for events, members, donations, and volunteers. It streamlines church operations and improves community engagement.
- [ClickSend](https://composio.dev/toolkits/clicksend) - ClickSend is a cloud-based SMS and email marketing platform for businesses. It streamlines communication by enabling quick message delivery and contact management.

## Frequently Asked Questions

### What are the differences in Tool Router MCP and Notion MCP?

With a standalone Notion MCP server, the agents and LLMs can only access a fixed set of Notion tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Notion and many other apps based on the task at hand, all through a single MCP endpoint.

### Can I use Tool Router MCP with OpenCode?

Yes, you can. OpenCode fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Notion tools.

### Can I manage the permissions and scopes for Notion while using Tool Router?

Yes, absolutely. You can configure which Notion scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

### How safe is my data with Composio Tool Router?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Notion data and credentials are handled as safely as possible.

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