Feature your MCP
/cli

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.

ToolMakerLicenseWhat you needLatest release
Claude CodeAnthropicProprietaryA Claude plan or API access2.1.322
Codex CLIOpenAIApache-2.0A paid ChatGPT plan or an API key0.167.2 (11 Nov 2026)
Gemini CLIGoogleApache-2.0A Gemini Code Assist license (no free tier)0.68.0 (10 Nov 2026)
OpenCodeOpenCodeMITYour own model provider keys2.2.7 (10 Nov 2026)
Copilot CLIGitHubProprietaryA GitHub Copilot subscription1.0.109 (10 Nov 2026)
AiderAider-AIApache-2.0Your own API key0.86.0

How to install each CLI

ToolInstall command
Claude Codebrew install --cask claude-code (macOS), winget install Anthropic.ClaudeCode (Windows), or the install script on claude.ai
Codex CLInpm install -g @openai/codex or brew install --cask codex
Gemini CLInpm install -g @google/gemini-cli or brew install gemini-cli
OpenCodenpm i -g @opencode/cli@latest or brew install opencode
Copilot CLInpm install -g @github/copilot or winget install GitHub.Copilot
Aiderpython -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 add inside the CLI, or mcp-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 mcp block in opencode.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.