---
title: How to connect Notion MCP to Codex
description: Run codex mcp add notion --url https://mcp.notion.com/mcp, then codex mcp login notion. Approvals, a token for CI, team config and fixes.
canonical: https://mcp1.com/blog/notion-mcp-codex
last-updated: 2026-12-06
---

# How to connect Notion MCP to Codex

Run codex mcp add notion --url https://mcp.notion.com/mcp, then codex mcp login notion. Approvals, a token for CI, team config and fixes.

![](https://avatars.githubusercontent.com/u/1297371?s=96&v=4)Eldad FuxFounder and CEO, Appwrite

 \~/.codex/config.toml

[mcp_servers.notion]
url = "https://mcp.notion.com/mcp"

codex mcp login notionSigned in

 \~/.codex/config.toml

[mcp_servers.notion]
url = "https://mcp.notion.com/mcp"

codex mcp login notionSigned in

To connect Notion to Codex, run `codex mcp add notion --url https://mcp.notion.com/mcp`, then `codex mcp login notion` and approve the workspace in your browser. Notion hosts the server, so there is nothing to install and no key to paste. Codex can then search, read and edit your pages and databases with your own Notion permissions.

## How do I add the Notion MCP server to Codex?

The steps are the same for the Codex CLI, the IDE extension and the desktop app, which read one config file.

1. 1Add the server:  
Terminal  
```  
codex mcp add notion --url https://mcp.notion.com/mcp  
```
2. 2Sign in. Codex may start this after the add; if it didn’t, or the session expired, run it yourself:  
Terminal  
```  
codex mcp login notion  
```
3. 3Pick the Notion workspace in the browser and approve access. You need to be a member of it: guests can’t connect.
4. 4Start `codex` and run `/mcp`. `notion` should be listed with its tools.

The command writes this block to `~/.codex/config.toml`, which is also what Notion’s own instructions tell you to add by hand. The OAuth token isn’t stored in the file:

\~/.codex/config.toml

```
[mcp_servers.notion]
url = "https://mcp.notion.com/mcp"
```

Then try a prompt that reads Notion and your checkout together:

Prompt

```
Find our release checklist in Notion and compare it with
scripts/release.sh. List the steps the script skips. Don't edit anything.
```

Use /mcp, not /sse

Older guides point Codex at `https://mcp.notion.com/sse` or wrap the server in `mcp-remote`. Codex speaks Streamable HTTP, and Notion retires the SSE endpoint on February 23, 2027, so use the URL ending in `/mcp`.

## What can Codex do in Notion?

Whatever your Notion account can do. The connection acts as you and reaches every page you can reach; Notion has no setting to limit it to some pages. The tools a coding agent uses most:

ToolWhat it does

`notion-search`

Searches the workspace. Read.

`notion-fetch`

Reads a page or database by URL or ID. Read.

`notion-query-data-sources`

Queries a database with filters. Read.

`notion-create-pages`

Creates pages, like a design doc or release notes. Write.

`notion-update-page`

Changes a page’s content or properties. Write.

`notion-create-comment`

Comments on a page or discussion. Write.

`notion-delete-pages`

Moves pages to Trash. Write.

The exact set depends on your Notion plan and settings, so check `/mcp`. In Codex the useful pattern is pairing a spec with code: read the design doc for a feature, then check the branch against it, or write the release notes from `git log` straight into a Notion page.

## How do I make Codex ask before it edits Notion?

Set an approval mode on the server. Notion has no read-only URL or scope for its hosted server, so this is the main guard for a personal connection. With `writes`, Codex asks before any tool that isn’t marked read-only; `disabled_tools` removes a tool entirely:

\~/.codex/config.toml

```
[mcp_servers.notion]
url = "https://mcp.notion.com/mcp"
default_tools_approval_mode = "writes"
disabled_tools = ["notion-delete-pages"]
```

The other modes are `auto`, `prompt` (ask for every tool) and `approve`. Read the arguments in the approval before you accept: a `notion-update-page` call can rewrite the page it names, so check the page ID and the new content. Pages removed with `notion-delete-pages` go to Trash and can be restored. These settings live in a file anyone can edit, so treat them as a convenience. For controls that hold, see [how to stop agents from running destructive MCP tools](https://mcp1.com/blog/stop-destructive-mcp-tools).

## How do I use Notion MCP in codex exec or CI?

Use an MCP token instead of OAuth. On Business and Enterprise plans, a Notion workspace owner creates one with New MCP token in Notion’s developer portal, and Codex sends it as a bearer token read from an environment variable:

\~/.codex/config.toml

```
[mcp_servers.notion]
url = "https://mcp.notion.com/mcp"
bearer_token_env_var = "NOTION_MCP_TOKEN"
```

CI job

```
export NOTION_MCP_TOKEN=...   # from your CI secret store
codex exec "Summarize this week's merged PRs as a new page under Engineering / Changelog in Notion."
```

Every call made with the token acts as the token, not as a person, so keep it in your CI secret store, give each job its own, and revoke it when the job goes away. The [CI and headless agents](https://mcp1.com/blog/mcp-in-ci-and-headless-agents) post covers the rest of the setup. The old open-source `@notionhq/notion-mcp-server` package with an integration token is no longer maintained, so don’t build new jobs on it.

## How do I share Notion MCP with my team in Codex?

Commit the same `[mcp_servers.notion]` block to `.codex/config.toml` at the repository root, as Notion’s docs suggest. Codex reads project config only in projects you’ve marked as trusted. The block holds only the URL, so each teammate runs `codex mcp login notion` and signs in as themselves, and Notion shows their edits under their own names.

## What if Notion MCP doesn’t connect in Codex?

Terminal

```
codex mcp list
codex mcp login notion --no-browser
```

- No browser opens, on a remote machine or in a container. Use `--no-browser`, open the link on another device and paste the full redirect URL back into the terminal.
- Notion refuses the sign-in with a message about guests. Only workspace members can connect; ask an owner to make you a member.
- “Not approved” or an enterprise policy error. Your Notion Enterprise workspace allows approved clients only. An admin approves Codex under Settings, Notion MCP, Manage workspace clients.
- `rate_limited`. Notion allows 180 requests a minute per connection, 600 on Business and Enterprise. Ask Codex to batch its lookups instead of fetching pages one by one.
- The server times out on start. Raise `startup_timeout_sec` above its default of 10 in the server’s block.

## Notion for the whole team, in every client

The setup above is per person and per client: each developer signs in to Notion in Codex, again in Cursor, again in Claude Code, and the approval mode lives in a file on each laptop. MCP1 is a gateway that does it once. An admin installs [Notion](https://mcp1.com/servers/notion) in the workspace with one-click OAuth, adds it to a gateway with the team’s other servers, and grants the gateway to groups with full or read-only access. Each person connects one URL:

Terminal

```
codex mcp add mcp1 --url https://mcp1.com/mcp/<workspace>/<gateway>
codex mcp login mcp1
```

Notion’s tools appear as `notion__<tool>` next to GitHub, Linear and the rest, an Ask first rule can cover `notion__notion-delete-*` for everyone, and every call is in the audit log with the person who made it. CI jobs get an API key scoped to one gateway instead of a workspace-wide Notion token. The same server in other clients: [Claude Code](https://mcp1.com/blog/notion-mcp-claude-code) and [Cursor](https://mcp1.com/blog/notion-mcp-cursor). The [docs](https://mcp1.com/docs) cover gateways and groups, and you can [start free](https://mcp1.com/signup).

## Common questions

### Does Notion MCP work with codex exec?

Yes. On Business and Enterprise plans, a workspace owner creates an MCP token, and Codex sends it as a bearer token from the variable named in bearer\_token\_env\_var. No browser sign-in is needed.

### Can I make Notion MCP read-only in Codex?

Notion has no read-only URL or scope for its hosted server. In Codex, set default\_tools\_approval\_mode = "writes" so write tools ask first, and list tools you never want in disabled\_tools.

### Do I need the notion-mcp-server npm package for Codex?

No. Notion recommends its hosted server at https://mcp.notion.com/mcp, and the open-source package is no longer actively maintained.

### Can Codex see every page in my Notion workspace?

It can see every page your Notion account can see. The connection acts as you, and Notion documents no way to limit it to some pages.

Give your team one URL

Create a workspace, install your servers and share a gateway with a group. Free for individuals.

[Start with MCP1](https://mcp1.com/signup)[Read the docs](https://mcp1.com/docs)

## More from the blog

[ Where PHI goes in one tool callMCP serverBAA, endpoint in scopeModel providerBAA, product namedGatewayBAA, audit logLogsEncrypted, retention setMCP and HIPAA: what to check before agents touch PHIEvery party that handles PHI in an MCP tool call needs a BAA, and model providers’ BAAs don’t cover MCP servers. What to check, limit and log.![](https://avatars.githubusercontent.com/u/1297371?s=96&v=4)Eldad FuxFounder and CEO, Appwrite](https://mcp1.com/blog/mcp-hipaa)[ .cursor/mcp.json"atlassian": { "url": "https://mcp.atlassian.com/v2/mcp" }atlassianConnectedHow to connect Jira MCP to CursorAdd https://mcp.atlassian.com/v2/mcp to .cursor/mcp.json and sign in to Atlassian. The Jira tools, admin controls, approvals, API tokens and fixes.![](https://avatars.githubusercontent.com/u/1297371?s=96&v=4)Eldad FuxFounder and CEO, Appwrite](https://mcp1.com/blog/jira-mcp-cursor)

---

This is the markdown copy of https://mcp1.com/blog/notion-mcp-codex. Site index for agents: https://mcp1.com/llms.txt
