Skip to main content
Back to the Notion MCP server

MCP Gateway · OpenCode

Notion icon

Connect Notion to OpenCode

OpenCode users can tidy the engineering side of Notion from the terminal. The agent archives specs for shipped work, builds a database view for the bugs a team cares about, and adjusts its filters as priorities change. The OpenCode plugin sends each prompt and Notion tool call to Speakeasy, which allows or denies it before it runs.

Category
Productivity
Tools
14
Authentication
OAuth
OpenCode
Terminal

Behind the MCP Gateway

Run Notion MCP behind the MCP Gateway

One URL for every agent, sign-in through your IdP, RBAC down to the tool, and every Notion call inspected and logged.

Deploy on MCP Gateway

Set up

Add Notion to OpenCode in 4 steps

  1. 01

    Add Notion from the catalog

    An admin finds Notion in the MCP Catalog (MCP Gateway > MCP > Catalog) and clicks Add. Speakeasy registers the vendor's server as a remote MCP server and proxies sessions to it. Nothing is copied or re-hosted.

    Notion uses OAuth. Servers that support dynamic client registration get their OAuth configuration applied automatically.

    Where MCP-scoped policies are enabled, the install offers a recommended risk policy for the new server that detects secrets and PII and inspects tool requests and responses.

  2. 02

    Choose who can use Notion

    Give teams the mcp:connect scope on the Notion server through team access or a role. OpenCode connects to the Notion server's own URL, and the server's authorization decides who can connect and which tools they can call.

  3. 03

    Connect OpenCode

    Add the server to OpenCode's own mcp config block as a remote server.

    Copy the server's URL from its hosted install page in Speakeasy.

    Add it to the mcp block of your OpenCode config with type set to remote.

    Restart OpenCode and sign in when prompted.

    {
      "mcp": {
        "<server slug>": {
          "type": "remote",
          "url": "<URL from the hosted install page>"
        }
      }
    }
  4. 04

    Sign in and use Notion from OpenCode

    The first time OpenCode connects, it opens a browser so the person can sign in to Speakeasy through your identity provider.

    Notion needs its own OAuth grant, so each person connects it once. Until they do, Notion calls fail while the rest of the gateway keeps working.

    From then on, Notion's tools appear in OpenCode, limited to what the person's access allows, and every call lands in the gateway's tool logs.

OpenCode doesn't receive MCP servers from plugins. The observability package is installed separately, from a ZIP or with speakeasy-hooks install --provider=opencode, and the device agent can maintain it.

Use cases

What OpenCode users do with Notion

Archive specs for shipped work

When a feature ships, OpenCode moves its spec and related pages under the team's archive page, so the active specs list only shows work in progress.

notion-move-pages

Build a bug board view

OpenCode fetches the team's bug database and adds a board view grouped by status and filtered to the component you work on.

notion-fetchnotion-create-view

Adjust a view's filters

When priorities change, ask OpenCode to update the view's filters and sort order, such as showing only high-severity bugs sorted by date.

notion-update-view

Tools

14 tools

Each Notion tool can be allowed or denied per team and role at the MCP Gateway before OpenCode sees it.

notion-fetch

Retrieves details about a Notion entity (page, database, or data source) by URL or ID. Provide URL or ID in id parameter. Make multiple calls to fetch multiple entities. Pages use enhanced Markdown format.

notion-create-pages

Overview Creates one or more Notion pages, with the specified properties and content. Parent All pages created with a single call to this tool will have the same parent. The parent can be a Notion page ("page_id") or data source ("data_source_id").

notion-update-page

Overview Update a Notion page's properties or content. Properties Notion page properties are a JSON map of property names to SQLite values. For pages in a database: - ALWAYS use the "fetch" tool first to get the data source schema and the exact property names.

notion-move-pages

Move one or more Notion pages or databases to a new parent.

notion-duplicate-page

Duplicate a Notion page. The page must be within the current workspace, and you must have permission to access it. The duplication completes asynchronously, so do not rely on the new page identified by the returned ID or URL to be populated immediately.

See all 14 tools

Control

What Speakeasy can see and stop in OpenCode

The gateway covers every client the same way. The rest depends on what OpenCode exposes to Speakeasy.

Tool logs

Gateway

Every Notion call is logged with the person and the client that made it.

Access by role

Gateway

People reach only the Notion tools their team or role allows.

Request and response blocking

Gateway

A risk policy scoped to Notion can reject a tool request before it reaches the server, or withhold a result from OpenCode. MCP-scoped policies are enabled per organization.

Prompt and tool-call blocking

OpenCode

The OpenCode plugin sends each prompt and tool call to Speakeasy, which allows or denies it before it runs.

Usage telemetry

OpenCode

Token and cost totals flow through the plugin, reported per turn.

Device agent

OpenCode

The device agent installs and maintains the observability package.

  • OpenCode has no OpenTelemetry exporter, so session data comes through the plugin.
  • Tool output is blocked at the gateway rather than in OpenCode's hooks.

Questions

Frequently asked questions

Does OpenCode report Notion sessions without OpenTelemetry?
Yes. OpenCode has no OpenTelemetry exporter, so session data comes through the Speakeasy plugin, with token and cost totals reported per turn.
Does the Speakeasy plugin add Notion to OpenCode?
No. OpenCode doesn't receive MCP servers from plugins. You add Notion to the mcp block of your OpenCode config as a remote server, and the observability package is installed separately.
How do OpenCode users get Notion?
An admin adds Notion from the Speakeasy MCP Catalog and grants access by team or role. Add the server to OpenCode's own mcp config block as a remote server. Each person then sees only the Notion tools their access allows.
Are Notion calls from OpenCode logged?
Yes. Notion calls go through the MCP Gateway, which logs each tool call and attributes it to the person and the client that made it.

Connect more

Notion in other clients

AI everywhere.

Control here.