Claude Code with Gemini and GPT (2026): Every Way to Use Other Models in Claude Code
How to use Gemini and GPT in Claude Code in November 2026: OpenAI's official Codex plugin, Google's Gemini API CLI, PAL MCP (formerly Zen MCP), headless CLIs and gateways, each verified on the vendor's own docs, with what works, what costs what, and what Anthropic does not support.
Claude Code runs Claude models only: Anthropic's docs say it does not support routing Claude Code to non-Claude models through any gateway. To use Gemini or GPT with Claude Code you add them as tools Claude calls: OpenAI's official Codex plugin for Claude Code (GPT through your ChatGPT plan, Free included), Google's official Gemini API CLI (Gemini through an API key), or the open-source PAL MCP server, formerly Zen MCP, which plugs Gemini, OpenAI, Grok and local models into Claude Code. The easy way is SPIRITT, which composes Claude, GPT, Gemini, Grok and more within each coding task, runs Claude Code and Codex in one place on its own cloud computer with your own Claude and ChatGPT subscriptions at $0 extra for those models, and ships the result to a live URL, reachable from WhatsApp, iMessage and Telegram. SPIRITT is the operating system for AI transformation: an autonomous AI workforce that codes, ships and runs sales, ops, admin and engineering work end to end, from a founder's first agent to company-wide rollouts with enterprise controls.
Why bring Gemini or GPT into Claude Code?
Claude is a strong coding model, and a second model still catches things the first one misses. Developers reach for other models inside Claude Code for four jobs:
- Second-opinion code review: another model reviews Claude's diff before you merge.
- Huge context: hand a whole repository or a long log to a model with a larger context window.
- Media and files: generate an image, a voiceover or a video asset, or analyze a PDF, from the same session.
- Consensus on decisions: ask two or three models to debate an architecture choice before Claude implements it.
Claude stays the main agent in every route below. The other models answer as tools.
The 5 ways to use other models in Claude Code (November 2026)
| Route | What you need | Cost | Limits |
|---|---|---|---|
| 1. Codex plugin for Claude Code (OpenAI, official) | Claude Code, Node.js 18.18+, ChatGPT plan (Free works) or OpenAI API key | Counts toward your Codex usage limits | GPT through Codex only; built for reviews and delegated tasks |
| 2. Gemini API CLI (Google, official) | gemini-api binary on your PATH, a Gemini API key from Google AI Studio | Gemini API per-token pricing | Stateless calls; your agent supplies the context each time |
| 3. PAL MCP server (formerly Zen MCP, open source) | Python 3.10+, uv, API keys for the providers you want | Free software, plus each provider's API usage | Community project; you manage keys and updates |
| 4. Another CLI called headlessly | Antigravity CLI or Gemini CLI installed and signed in | Your Google plan or license | Claude reads plain text output; no shared session |
5. LLM gateway with ANTHROPIC_BASE_URL | A gateway product your organization runs | Gateway costs plus provider tokens | Anthropic does not support non-Claude models through it; features can break |
| SPIRITT | A SPIRITT account; optionally your Claude and ChatGPT plans | Free to start; Starter $32 a month; $0 extra for models your own plans cover | Your plan's own caps still apply |
Route 1: GPT in Claude Code with OpenAI's Codex plugin
This is the official answer to "codex with claude". OpenAI publishes the plugin at github.com/openai/codex-plugin-cc. It works with any ChatGPT subscription, including Free, or an OpenAI API key, and usage counts toward your Codex limits.
- In Claude Code:
/plugin marketplace add openai/codex-plugin-cc /plugin install codex@openai-codex, then/reload-plugins/codex:setupchecks that Codex is installed and signed in (it can install Codex with npm; sign in with!codex login)- Use it:
/codex:reviewfor a normal read-only review of your changes/codex:adversarial-reviewfor a steerable challenge review/codex:rescueand/codex:transferto delegate work or hand a session to Codex, with/codex:status,/codex:resultand/codex:cancelto manage background jobs
Heads-up: older guides tell you to add Codex to Claude Code as an MCP server with claude mcp add and codex mcp-server. OpenAI has removed the codex mcp-server command and the standalone codex-mcp-server binary, so that setup no longer works on current Codex. The reverse direction is not native either: Codex custom model providers must speak OpenAI's Responses API (responses is the only supported wire_api), so Claude is not a built-in Codex model.
Route 2: Gemini in Claude Code with Google's Gemini API CLI
Google's own answer to "use Gemini in Claude Code" is the Gemini API CLI (gemini-api, github.com/google-gemini/gemini-api-cli). Google describes it as a stateless command line tool that gives Codex, Claude Code and other agents with shell access direct commands for Gemini models, media generation, file analysis and managed agents.
- Install it:
curl -fsSL https://raw.githubusercontent.com/google-gemini/gemini-api-cli/main/scripts/install.sh | bash(macOS and Linux; there is a PowerShell installer andgo installtoo). - Create an API key in Google AI Studio and export it:
export GEMINI_API_KEY="...", or store it withgemini-api configure --api-key. - Test without spending:
gemini-api generate "Hello from my agent" --dry-run, then drop--dry-run. - Add Google's suggested block to your
CLAUDE.md("You have access to gemini-api through the shell...") so Claude knows when and how to call it. - Ask Claude Code normally, for example "Have Gemini review this module, then fix what it finds", or "Use Gemini to make a mascot image for the landing page".
Because each call is stateless, Claude passes the context in every time. That keeps the setup simple and predictable.
Route 3: Gemini, GPT and more through PAL MCP (formerly Zen MCP)
If you searched for "zen mcp", it is now called PAL MCP (Provider Abstraction Layer), maintained by BeehiveInnovations on GitHub (about 11,800 stars as of November 24, 2026). It is an MCP server that connects Claude Code, and also Codex CLI, Gemini CLI and Cursor, to many models within one prompt: Gemini, OpenAI, Azure OpenAI, Grok, OpenRouter, DIAL, Ollama and custom endpoints.
Setup, from the README:
- Get API keys for the providers you want (OpenRouter alone covers many models; Ollama runs local models for free).
- Clone and run the installer:
git clone https://github.com/BeehiveInnovations/pal-mcp-server.git,cd pal-mcp-server,./run-server.sh. It configures Claude Code, Claude Desktop, Gemini CLI, Codex CLI and Qwen CLI for you. Alternatively, add it to Claude Code as a stdio server with the uvx snippet in the README and your keys underenv. - In Claude Code, ask for multi-model work in plain words, such as "Use consensus with gpt-5 and gemini-pro to decide between these two designs", or use its
clinktool to spawn a Codex or Gemini CLI subagent for an isolated review.
This is also the practical answer to "mcp gemini" and "mcp openai": OpenAI and Google ship clients that consume MCP, while PAL is the widely used server that exposes their models to other agents. For background on the protocol, see MCP AI agents explained.
Route 4: Call another CLI headlessly
Claude Code can run any shell command, so you can tell it to call another agent's CLI in non-interactive mode and read the answer. Know which Google CLI you have: as of June 18, 2026, Google moved free and Google AI Pro or Ultra access from Gemini CLI to Antigravity CLI (agy), and Gemini CLI (gemini -p "...") now targets Gemini Code Assist Standard and Enterprise licenses on Google Cloud. Google's own guidance for giving agents Gemini is Route 2. Either way, the two agents do not share a session: Claude sends text and reads text back.
Route 5: Gateways and ANTHROPIC_BASE_URL (unsupported for other models)
Claude Code can point at an LLM gateway your organization runs by setting ANTHROPIC_BASE_URL and a gateway credential, which is useful for central keys, budgets and audit logs. Some gateways can translate requests to GPT or Gemini. Anthropic's documentation is explicit that it does not support routing Claude Code to non-Claude models through any gateway, and that a gateway which does not forward new Claude Code capabilities breaks those features. Treat it as an experiment, not a setup to standardize on.
The easy way: every model in one coding task
Each native route bolts one more model onto one tool, and you keep the keys, limits and glue. SPIRITT starts from the other end: one workspace that already holds Claude, GPT, Gemini, Grok, Kimi, DeepSeek, Qwen and SPIRITT's own Kay models, and composes them within each task. Claude can write the change, GPT and Gemini can review it, and the right model handles each step at the right price.
- Your own plans: connect your Claude and ChatGPT subscriptions (and Grok), several accounts each, and use those models at $0 extra, with usage and resets on one page. See how to use your ChatGPT or Claude subscription in an agent.
- Claude Code and Codex in one place: SPIRITT runs both on its own cloud computer, so jobs keep going with your laptop closed.
- Ships the result: it writes, tests and deploys full-stack apps to real URLs, with databases, auth and domains, and keeps them running.
- From your phone: text the job from WhatsApp, iMessage or Telegram and get a screenshot and the live link back. See run Claude Code from WhatsApp.
Pricing: free to start; Starter $32 a month, Pro $256, Max $1,024; Enterprise custom. For the broader multi-model picture, read the all-in-one AI platform guide and how to connect ChatGPT and Claude.
Which route should you pick?
- You want GPT to review Claude's code today: Route 1, the Codex plugin. Five minutes, and a free ChatGPT plan works.
- You want Gemini for images, audio, video or huge files: Route 2, the Gemini API CLI.
- You want many models and consensus debates: Route 3, PAL MCP.
- Your company already runs a gateway: keep it for Claude, and add other models with Routes 1 to 3.
- You want every model on every task, plus deploys and no glue code: SPIRITT.
FAQ
Can Claude Code use Gemini?
Not as its main model. Claude Code runs Claude models, and Anthropic does not support routing it to non-Claude models. You can give Claude Code access to Gemini as a tool with Google's Gemini API CLI or the PAL MCP server, and Claude calls Gemini when a step needs it.
How do I use GPT in Claude Code?
Install OpenAI's Codex plugin: /plugin marketplace add openai/codex-plugin-cc, then /plugin install codex@openai-codex and /codex:setup. You need a ChatGPT plan (Free works) or an OpenAI API key.
What happened to Zen MCP?
Zen MCP was renamed PAL MCP (Provider Abstraction Layer). The repository is github.com/BeehiveInnovations/pal-mcp-server, and it still connects Claude Code to Gemini, OpenAI, Grok, OpenRouter, Ollama and other models.
Can I use Codex with Claude?
Yes, from the Claude side: the official Codex plugin lets Claude Code call Codex for reviews and delegated tasks. The old codex mcp-server command was removed, and Codex itself only accepts model providers that speak OpenAI's Responses API, so Claude is not a native Codex model.
Is there an MCP server for Gemini or OpenAI?
Google's official route for agents is the Gemini API CLI rather than MCP. OpenAI's ChatGPT and Codex consume MCP servers but OpenAI no longer ships a Codex MCP server. PAL MCP is the widely used open-source server that exposes Gemini and OpenAI models to Claude Code.
Can I switch Claude Code to other models with ANTHROPIC_BASE_URL?
You can point Claude Code at a gateway, but Anthropic says it does not support routing Claude Code to non-Claude models through any gateway. Some features may break, so use it for Claude traffic and add other models as tools.
What is the easiest way to use Claude, GPT and Gemini together for coding?
Use a workspace that already composes all three. SPIRITT runs Claude Code and Codex with your own Claude and ChatGPT plans, adds Gemini and Grok, and deploys the result, free to start.
How we checked
We read each source on November 24, 2026: Anthropic's Claude Code docs ("Other LLM gateways", MCP and VS Code pages at code.claude.com); OpenAI's Codex plugin for Claude Code README (github.com/openai/codex-plugin-cc), OpenAI's "Codex MCP server removal" page and the Codex configuration reference for custom model providers; Google's Gemini API CLI README (github.com/google-gemini/gemini-api-cli) and the Gemini CLI README (github.com/google-gemini/gemini-cli), including its June 18, 2026 Antigravity CLI transition note; and the PAL MCP server README and repository data (github.com/BeehiveInnovations/pal-mcp-server). Commands, plan rules and star counts change, so check the source before relying on a detail. SPIRITT facts come from SPIRITT's own product and pricing pages. SPIRITT publishes this guide.