Questions, answered

Yes. The Codex CLI, the IDE extension and the ChatGPT desktop app read the same config.toml, so a server you add in one is available in the others without redoing the setup.

Put the [mcp_servers.<name>] table in .codex/config.toml inside the project instead of ~/.codex/config.toml. Codex reads project config only for trusted projects, so trust the folder first.

For a local stdio server, use --env KEY=value with codex mcp add, or the env table in config.toml. For a remote server, set bearer_token_env_var to the name of an environment variable that holds the token, or map headers to variables with env_http_headers. Keep secrets out of files you commit.

Set enabled = false in the server's table in config.toml. To hide only some of its tools, list the ones you want in enabled_tools or the ones you do not want in disabled_tools.

A stdio server is a local process that Codex starts with a command, such as npx or python, and talks to over standard input and output. A Streamable HTTP server already runs somewhere and Codex connects to its URL, often with OAuth or a bearer token.