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

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

🛡️ Official✓ VerifiedStreamable HTTPBearer Token🛡️ A+~479 tok16 tools
Streamable HTTPhttps://mcp.postman.com/mcp

🔒 Client-side only — never leaves your browser.

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

[mcp_servers.postman]
url = "https://mcp.postman.com/mcp"
bearer_token_env_var = "POSTMAN_TOKEN"

接入步骤

  1. 编辑 TOML 配置 — 打开 ~/.codex/config.toml,加入 [mcp_servers.postman] 与 url = "https://mcp.postman.com/mcp"。
  2. 配置凭据 — 加入 bearer_token_env_var = "POSTMAN_TOKEN" 并在环境变量中导出该密钥。
  3. 验证 — 在 在线 Inspector 中粘贴 https://mcp.postman.com/mcp 并运行 initialize + tools/list 验证连通性。

🧰 工具预览(16)

ToolSafetyDescriptionParameters
getCollections
~29 tok
🟢 ReadList Postman collections.—
getCollection
~29 tok
🟢 ReadGet a Postman collection.—
createCollection
~30 tok
🟠 WriteCreate a Postman collection.—
updateCollection
~30 tok
🟠 WriteUpdate a collection (PUT).—
patchCollection
~31 tok
🟠 WritePartially update a collection.—
deleteCollection
~28 tok
🔴 DestructiveDelete a collection.—
createRequest
~30 tok
🟠 WriteAdd a request to a collection.—
updateRequest
~31 tok
🟠 WriteUpdate a request in a collection.—
getEnvironments
~30 tok
🟢 ReadList Postman environments.—
getEnvironment
~28 tok
🟢 ReadGet an environment.—
createEnvironment
~29 tok
🟠 WriteCreate an environment.—
getMocks
~26 tok
🟢 ReadList mock servers.—
createMock
~27 tok
🟠 WriteCreate a mock server.—
getApis
~26 tok
🟢 ReadList Postman APIs.—
getWorkspaces
~29 tok
🟢 ReadList Postman workspaces.—
getWorkspace
~26 tok
🟢 ReadGet a workspace.—

更多连接指南