How to Set Up the Notion MCP Server with OpenAI Codex

The command you provided is specific to Anthropic's Claude Code CLI. To configure the Notion MCP server for OpenAI's Codex, you need to use Codex's syntax, which handles remote HTTP servers slightly differently.
You have two ways to set this up.
Option 1: The Codex CLI Command (Fastest)
Run this exact command in your terminal:
Bash
codex mcp add notion --url https://mcp.notion.com/mcp
Option 2: Manual Configuration (config.toml)
Codex shares its configuration between the CLI and the IDE extension using a TOML file rather than JSON.
- Open (or create) your Codex config file located at
~/.codex/config.toml. - Paste the following block at the bottom of the file:
Ini, TOML
[mcp_servers.notion]
url = "https://mcp.notion.com/mcp"
Step 3: Authenticate with Notion
Because this specific Notion MCP server uses an OAuth flow over an HTTP transport, you will need to grant Codex permission to access your workspace before it can read or write documents.
- Open your terminal and start a session by typing
codex. - Once the Codex UI is running, type
/mcpand hit enter. - Select the notion server from the list. It will give you a URL to open in your browser to complete the standard Notion login process.
(Note: You can also try running codex mcp login notion directly from your regular terminal to trigger the auth prompt).
The command you provided is specific to Anthropic's Claude Code CLI. To configure the Notion MCP server for OpenAI's Codex, you need to use Codex's syntax, which handles remote HTTP servers slightly differently.
You have two ways to set this up.
Option 1: The Codex CLI Command (Fastest)
Run this exact command in your terminal:
Bash
codex mcp add notion --url https://mcp.notion.com/mcp
Option 2: Manual Configuration (config.toml)
Codex shares its configuration between the CLI and the IDE extension using a TOML file rather than JSON.
- Open (or create) your Codex config file located at
~/.codex/config.toml. - Paste the following block at the bottom of the file:
Ini, TOML
[mcp_servers.notion]
url = "https://mcp.notion.com/mcp"
Step 3: Authenticate with Notion
Because this specific Notion MCP server uses an OAuth flow over an HTTP transport, you will need to grant Codex permission to access your workspace before it can read or write documents.
- Open your terminal and start a session by typing
codex. - Once the Codex UI is running, type
/mcpand hit enter. - Select the notion server from the list. It will give you a URL to open in your browser to complete the standard Notion login process.
(Note: You can also try running codex mcp login notion directly from your regular terminal to trigger the auth prompt).

.jpg)