如何将 Notion 远程 MCP 连接到 OpenAI Codex CLI

约 1 分钟即可把 Notion Labs 的远程 MCP 服务端接入 OpenAI Codex CLI。如需排查 OAuth / 401 问题,可先用 OAuth 2.1 调试器体检端点。

🛡️ Official✓ VerifiedHTTP + SSEOAuth 2.1🛡️ A+~606 tok18 tools
HTTP + SSEhttps://mcp.notion.com/mcp
Legacy SSE endpoint
SSEhttps://mcp.notion.com/sse

Add to ~/.codex/config.toml — Codex reads remote HTTP servers from [mcp_servers.*] tables:

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

接入步骤

  1. 编辑 TOML 配置 — 打开 ~/.codex/config.toml,加入 [mcp_servers.notion] 与 url = "https://mcp.notion.com/mcp"。
  2. 配置凭据 — 首次调用时客户端会打开 Notion Labs 的 OAuth 授权页面——点击允许后工具即可用。
  3. 验证 — 在 在线 Inspector 中粘贴 https://mcp.notion.com/mcp 并运行 initialize + tools/list 验证连通性。

🧰 工具预览(18)

ToolSafetyDescriptionParameters
notion-search
~34 tok
🟢 ReadSearch pages and databases in the workspace.—
notion-fetch
~32 tok
🟢 ReadFetch a page, database or block content.—
notion-create-pages
~32 tok
🟠 WriteCreate one or more Notion pages.—
notion-update-page
~32 tok
🟠 WriteUpdate page properties or content.—
notion-move-pages
~34 tok
🟠 WriteMove pages between parents or workspaces.—
notion-duplicate-page
~31 tok
🟠 WriteDuplicate an existing page.—
notion-create-database
~35 tok
🟠 WriteCreate an inline or full-page database.—
notion-update-database
~35 tok
🟠 WriteUpdate a database's schema or properties.—
notion-query-database
~35 tok
🟢 ReadQuery a database with filters and sorts.—
notion-create-view
~30 tok
🟠 WriteCreate a database view.—
notion-update-view
~33 tok
🟠 WriteUpdate a database view configuration.—
notion-create-comment
~34 tok
🟠 WriteAdd a comment to a page or discussion.—
notion-get-comments
~32 tok
🟢 ReadList comments on a page or block.—
notion-get-teams
~32 tok
🟢 ReadList teamspaces in the workspace.—
notion-get-users
~29 tok
🟢 ReadList workspace users.—
notion-get-user
~31 tok
🟢 ReadGet details of a workspace user.—
notion-get-self
~33 tok
🟢 ReadGet the connected bot integration info.—
notion-get-page-property
~32 tok
🟢 ReadGet a page property value.—

更多连接指南