AI Coding CLIs: Claude Code, Codex and More Compared
AI coding CLIs are agents that run in your terminal: they read your repository, edit files and run commands for you. This page compares the main ones on facts taken from each tool's own repository, so you can pick one and connect it to MCP servers.
Updated Nov 12, 2026
What is an AI coding CLI?
A coding CLI is an AI agent you run from the terminal inside a project. You describe a task in plain words, and it reads the code, proposes changes, edits files and runs commands, asking for permission along the way. Most of them can also use MCP servers, which gives them access to documentation, issue trackers, databases or a browser. They are one kind of AI agent, and most of them also load Agent Skills.
Comparison table
Facts from each tool's repository, checked on 12 November 2026.
| Tool | Maker | License | What you need | Latest release |
|---|---|---|---|---|
| Claude Code | Anthropic | Proprietary | A Claude plan or API access | 2.1.322 |
| Codex CLI | OpenAI | Apache-2.0 | A paid ChatGPT plan or an API key | 0.167.2 (11 Nov 2026) |
| Gemini CLI | Apache-2.0 | A Gemini Code Assist license (no free tier) | 0.68.0 (10 Nov 2026) | |
| OpenCode | OpenCode | MIT | Your own model provider keys | 2.2.7 (10 Nov 2026) |
| Copilot CLI | GitHub | Proprietary | A GitHub Copilot subscription | 1.0.109 (10 Nov 2026) |
| Aider | Aider-AI | Apache-2.0 | Your own API key | 0.86.0 |
How to install each CLI
| Tool | Install command |
|---|---|
| Claude Code | brew install --cask claude-code (macOS), winget install Anthropic.ClaudeCode (Windows), or the install script on claude.ai |
| Codex CLI | npm install -g @openai/codex or brew install --cask codex |
| Gemini CLI | npm install -g @google/gemini-cli or brew install gemini-cli |
| OpenCode | npm i -g @opencode/cli@latest or brew install opencode |
| Copilot CLI | npm install -g @github/copilot or winget install GitHub.Copilot |
| Aider | python -m pip install aider-install, then aider-install |
How to add an MCP server to each CLI
- Claude Code:
claude mcp add --transport http <name> <url>for a remote
server, claude mcp add <name> -- npx -y <package> for a local one. Add --scope user to use it in every project.
- Gemini CLI:
gemini mcp add --transport http <name> <url>, or an entry
under mcpServers in .gemini/settings.json.
- Copilot CLI:
/mcp addinside the CLI, ormcp-config.json. It comes
with GitHub's MCP server already set up.
- Codex CLI: MCP servers go under
[mcp_servers.<name>]in
~/.codex/config.toml.
- OpenCode: an
mcpblock inopencode.json, with local servers as a
command and remote ones as a URL.
- Aider: its README does not document MCP support.
Every remote server in our directory shows its URL, ready to copy. The install guide covers Claude, ChatGPT, VS Code and Cursor too.
Open source vs proprietary
Open-source CLIs (Codex CLI, Gemini CLI, OpenCode, Aider) let you read the code, fork it and, in some cases, plug in any model provider. Proprietary ones (Claude Code, Copilot CLI) are tied to their maker's plans, but come with that maker's newest models first, such as Claude Fable 5.2 in Claude Code.
What it costs to run
None of these tools charges for the CLI itself; you pay for the model behind it. Claude Code, Codex, Gemini CLI and Copilot CLI use their maker's plans or API billing. OpenCode and Aider use the API keys you bring, so the cost depends on the provider and model you choose.
Frequently asked questions
What is the best AI coding CLI?
It depends on the model plan you already pay for and whether you need open source. Claude Code uses Claude models, Codex uses ChatGPT plans, Copilot CLI needs a Copilot subscription, and OpenCode and Aider work with your own API keys.
Is Claude Code open source?
No. Its repository is public, but the license reserves all rights to Anthropic.
Is Gemini CLI free?
Not any more. Its README says free individual access and Google AI Pro and Ultra plans moved to Antigravity CLI on 18 June 2026.
Which AI coding CLIs are open source?
Codex CLI, Gemini CLI and Aider (Apache-2.0) and OpenCode (MIT).
How do I add an MCP server to Claude Code?
Run claude mcp add --transport http <name> <url> for a remote server, or claude mcp add <name> -- <command> for a local one.
How do I add an MCP server to Gemini CLI?
Run gemini mcp add <name> <url> with --transport http for a remote server, or add it under mcpServers in .gemini/settings.json.
Does Copilot CLI support MCP?
Yes. It ships with GitHub's own MCP server and you can add others with /mcp add.
Does Codex need a ChatGPT subscription?
Signing in with a paid ChatGPT plan is the main route; an API key also works.