Giving Claude Code access to other LLMs

I just found that OpenAI’s codex tool could operate as an MCP server. This means that you can make it available to any agentic coding tool. The MCP exposes two tools:

  • codex creates a codex session.
  • codex-reply pursues an existing codex session based on a unique session ID.

I managed to set it up quite easily in Claude Code. In the command-line, I ran:

claude mcp add codex --scope user -- codex mcp-server

The --scope argument ensures the change is reflected for a user’s entire config (i.e. in ~/claude.json rather than in a specific project environment). Then, I modified my ~/.claude/CLAUDE.md file and added:

  • “You can access OpenAI models via the codex mcp. By default, you have access to the gpt-5 model. When using it, pick the reasoning level that seems most adequate to the task at hand. You can input a file for context by using the @path/to/file syntax in your prompt.”

Now, I can just tell Claude “Ask GPT-5 for a code review of the script at @a_cool_script.py” or “Ask GPT-5 for an external perspective on which pre-processing techniques to apply to street pictures before calling text detection models”, and Claude just figures out that it can use its codex tool to do that.


Update (2025-11-11): Anthropic recently released Skills for Claude Code, and it happens that you can easily replace the codex MCP with a skill “teaching” Claude Code to use the codex CLI tool. In my opinion, this approach has multiple advantages over the MCP: it reduces the amount of tokens consumed, it is more customizable, and it makes it easier for Claude Code to “respond” to Codex after the initial prompt.

Someone already wrote such a skill and posted it to GitHub: SKILL.md. I added it to my config by running:

mkdir -p ~/.claude/skills/codex
cd ~/.claude/skills/codex
curl -o SKILL.md https://raw.githubusercontent.com/skills-directory/skill-codex/main/SKILL.md

and it seems to be working quite well.


Another update (2025-11-11): This inspired me, and made me think that I could potentially do the same thing with Google’s gemini-cli. I am not sure that I’m ever going to use it in practice, but out of curiosity, I wrote a SKILL.md that teaches Claude Code how to use the gemini-cli, and it seems to work quite well. I put it in a GitHub gist if you’re interested.