In the terminal
Adding an extension to Codex
Checked on
Working with Codex in the terminal? Then you add every kind of extension with a command or a folder in the right place.
From ChatGPT Plugins
Codex uses the same plugins as ChatGPT, and you open them with /plugins. Look the service up and install the plugin.
With an address
Copy the MCP address from the extension’s page and run this command in the terminal. Replace NAME with a short name without spaces and ADDRESS with the address:
codex mcp add NAME --url ADDRESSThat puts the server in all your projects: the command writes to ~/.codex/config.toml. The command cannot limit it to one folder. For that, put the server in .codex/config.toml in that folder yourself; Codex reads that file only in a project you trust:
[mcp_servers.NAME]
url = "ADDRESS"If the service asks for an account, sign in through your browser:
codex mcp login NAMEThat only works for a service with OAuth sign-in. If the maker asks for an API key, follow the maker’s instructions. Type /mcp in Codex to see whether the server is connected.
To remove it again, with the same name you used when adding it:
codex mcp remove NAMEIf it is in .codex/config.toml in a folder, remove it from there.
Skill
A skill is a folder with a SKILL.md file in it. There is no command to add one: you put the folder in the right place.
- In
~/.agents/skills/for all your projects. - In
.agents/skills/inside a project, for that project only.
Or let Codex do it: copy the link to the maker’s page, paste this request and replace SOURCE_LINK with that link. Codex first asks whether the skill goes in this folder only or in all your projects.
Add the skill from SOURCE_LINK following the maker’s instructions. First ask which skill and where: this folder or all my projects. Give me the skill name.Type /skills in Codex to see whether the skill is listed. If it is not there straight away, restart Codex.
Removing it is deleting the folder again.
Plugin from a marketplace
First add the maker’s marketplace, with OWNER/REPO as the maker names it:
codex plugin marketplace add OWNER/REPOCodex then reports the marketplace’s name. Type codex plugin list to see which plugins are in it, and add the plugin:
codex plugin add PLUGIN@MARKETPLACECodex also takes a marketplace the maker made for Claude Code.
To remove it again:
codex plugin remove PLUGIN@MARKETPLACELocal MCP server
What has to be on your computer first is under Requires on the extension’s page. The command is behind the Go to the maker button. Put codex mcp add NAME -- in front of it, with a name of your choice:
codex mcp add NAME -- COMMANDThat puts the server in all your projects: the command writes to ~/.codex/config.toml.
If the server asks for an account or API key, follow the maker’s instructions. Type /mcp in Codex to see whether the server is connected.
To remove it again, with the name you chose:
codex mcp remove NAMEIf it is in .codex/config.toml in a folder, remove it from there.
The maker’s work folder
Get the folder the way the maker describes, go into it and start Codex. Replace FOLDER with that folder’s name:
cd FOLDER
codexCodex then reads that folder’s AGENTS.md and the skills in its .agents/skills/; it does not read a CLAUDE.md. Type /skills to see the skills.
Using a CLI
A CLI is a command Codex runs itself on your computer. Install it with the maker’s steps. Does the service ask for a login or a key? Then log in yourself, in your own terminal, and never type a password or API key into the conversation.
After that, Codex does not know yet that the command is there. Say so in your conversation, with the sentence you copy on the extension’s page. Where this says NAME, that page has the command’s name:
Use the `NAME` command. Run `NAME --help` first to see what it can do.Done? Then Codex first runs NAME --help and then uses the command for your question.
Rather not say it again in every conversation? Put the sentence in the file ~/.codex/AGENTS.md. Codex reads that file every time you start it, in every folder.
Working in Codex Cloud, with Work in set to Cloud? Then Codex runs on one of OpenAI’s computers and the command is not there yet. Make an environment with Create environment: put the maker’s install steps in the Install script and the service’s domain under Additional allowed domains. Keep an API key with the environment, not in the conversation. Say the sentence in your message there.