A connector lets your assistant use another tool or service, for example a documentation service or your browser. Connectors use a shared standard called MCP (Model Context Protocol). The connector itself is called an MCP server.
Codex supports two kinds:
- Local (STDIO): the connector runs on your computer. You add it with the command that starts it.
- Remote (Streamable HTTP): the connector runs on the internet at a web address.
Find the connector's start command
Open the official page of the connector you want and look for its start command, for example a line that starts with npx. Only add connectors from people you trust.
Add the connector
You run this in your normal terminal, not inside a Codex session. The pattern is:
codex mcp add <server-name> --env VAR1=VALUE1 --env VAR2=VALUE2 -- <stdio server-command>You choose the name. --env passes a setting, such as a key, to the connector. Leave it out if the connector needs no key. Everything after -- is the start command.
OpenAI's example adds Context7, a free connector for developer documentation:
codex mcp add context7 -- npx -y @upstash/context7-mcpThe npx command needs Node.js on your computer. Node.js is a free program that runs many connectors.
Check that it worked
List your connectors from the terminal:
codex mcp listInside a Codex session, type /mcp to see the connectors and tools that Codex can use right now.
If a connector needs you to sign in, run codex mcp login <server-name>.
Know where Codex saves connectors
Codex saves connectors in its settings file, ~/.codex/config.toml, under [mcp_servers.<server-name>]. You can also put connectors for one project in .codex/config.toml inside that project. Codex reads project settings only in projects you trust. The ChatGPT desktop app and the Codex IDE extension share the same settings.
To see all connector commands, run codex mcp --help. Browse connectors that we checked in our Connectors list.
Sources
- developers.openai.com/codex/mcp