Skip to content

Connect Notion (MCP token) to OpenCode

Notion's hosted MCP server, reached with a token instead of a browser sign-in, so agents can connect with nobody there to approve it. Needs a Business or Enterprise plan.

MCP serverOfficialChecked 2026-11-16

Before you start

  • OpenCode installed (see its MCP documentation (opens in a new tab)).
  • Notion (MCP token) is available on macOS, Windows, Linux and the web.
  • Only workspace owners on Business and Enterprise plans can create a token, with New MCP token in Notion's Developer portal. Set it as NOTION_MCP_TOKEN in your environment. On other plans, use the Notion entry, which signs in through your browser.
  1. Step 1: Add Notion (MCP token) to OpenCode

    Add it from the terminal

    Run this in your project folder. It saves the server to the project's opencode.json.

    Terminal
    opencode mcp add notion-token --url https://mcp.notion.com/mcp --header 'Authorization=Bearer {env:NOTION_MCP_TOKEN}'

    Or edit the config file

    Add this to opencode.json at the project root.

    opencode.json
    {
      "$schema": "https://opencode.ai/config.json",
      "mcp": {
        "notion-token": {
          "type": "remote",
          "url": "https://mcp.notion.com/mcp",
          "enabled": true,
          "oauth": false,
          "headers": {
            "Authorization": "Bearer {env:NOTION_MCP_TOKEN}"
          }
        }
      }
    }
    Good to know
    • OpenCode's background service reads NOTION_MCP_TOKEN when it starts, not from the terminal you're in. Set the variable, then run opencode service restart.
  2. Step 2: Check it's connected

    Terminal
    opencode mcp list

    Start OpenCode in the project; the server's tools are available to the agent straight away.

  3. Step 3: Try a first request

    Ask OpenCode something that only works with Notion (MCP token) connected:

    Say to OpenCode
    Find the Notion database that tracks our design tasks and list what's due this week.

If it doesn't work

  • OpenCode reads opencode.json from the project root, or ~/.config/opencode/opencode.json for every project.
  • Environment variables use the {env:NAME} syntax inside the config file.
  • Servers that need a sign-in: run opencode mcp auth <name>.