Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseInsight · On RadarHabr AI→ original

Claude Code, Codex and OpenCode Wire Up MCP Differently: The Registry Holds 50,000 Servers

MCP (Model Context Protocol) is a single "connector" that lets an AI agent call external services, from documentation search to ordering groceries. The registry already lists 50,000 MCP servers, yet Claude Code, Codex and OpenCode each attach them in their own way. Claude Code shares a team's config through git, Codex keeps everything in one TOML file, and OpenCode saves context with Code Mode. Choose based on your task: a shared team config or context savings.

AI-processed from Habr AI; edited by Hamidun News
Claude Code, Codex and OpenCode Wire Up MCP Differently: The Registry Holds 50,000 Servers
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Claude Codethree scopes, and the project-level .mcp.json reaches colleagues through git
Codexthe default server startup timeout is 10 seconds, which is too short for Python
Key metric #3OpenCode V2 collapses dozens of tools into one by default (Code Mode)

A couple of years ago, connecting an external tool to a language model meant writing your own format, wrappers and workarounds for every service. Then Anthropic released the Model Context Protocol (MCP): a single "connector" through which an AI agent calls external services, whether that's documentation search or placing a grocery order. OpenAI adopted the protocol in Codex, Google in Gemini, and Microsoft in Copilot and VS Code, and the protocol itself moved under the Linux Foundation. By autumn 2026, the official registry lists 50,000 MCP servers. But each CLI agent has its own way of connecting them, and that affects both how easily a team can work together and how much context gets consumed.

How MCP Works

The architecture has three layers. The host is the application that contains the model: Claude Code, Codex, OpenCode or Cursor. Inside the host lives a client, which maintains the connection to the server. The server is a separate process or HTTP service that exposes tools. The model sees the list of calls (tools/list) and decides what to invoke, and the client forwards the request to the server (tools/call). Under the hood, it's plain JSON-RPC.

There are two and a half transports. The first is stdio: the host launches the server as a local process. This is fast and private, but it spawns a separate heavyweight process.

The second is Streamable HTTP: the server lives at a URL and the host simply sends requests to it. Almost all corporate servers work this way, for example Notion and GitHub. Authorization runs through OAuth, and the provider ships updates.

The 2026 specification made the protocol stateless: the server no longer has to remember a session between calls, which makes it easier to scale. The "half" is the old SSE transport, which was deprecated back in 2025. It still shows up, and some clients fall back to it on their own when a connection fails.

A simple rule: if you see npx something in a config, it's stdio; if you see a bare URL, it's HTTP. Local servers receive keys through environment variables, while remote ones need OAuth 2.1 or a Bearer token in a header.

Three CLIs, Three Approaches to Config

Claude Code adds a server with a single command: claude mcp add --transport http name URL for a remote one, and claude mcp add name -- npx ... for a local one. Its own flags (--transport, --env, --header) go before the double dash, and the server's flags go after it.

The main distinguishing feature is three scopes, that is, levels of visibility. Local is visible only to you, in this project, and is stored in ~/.claude.

json. Project is written to .mcp.

json in the repository root and reaches colleagues through git. User applies across all of your projects. If a team lead commits a .

mcp.json with Playwright and a documentation server, the whole team gets the same set of tools on first launch. Secrets can be declared as env variables, and each person supplies their own values.

The catch is that claude mcp add does not validate credentials, so a typo in a token only surfaces when you connect.

Codex CLI keeps everything in a single file, ~/.codex/config.toml: models, providers, profiles and MCP.

The CLI, the VS Code extension and the desktop app all share it, so there's no drift between them. A server is described in a [mcp_servers.name] section with command and args, or with url.

For tokens there is bearer_token_env_var: the secret stays in the environment rather than in the file. Watch startup_timeout_sec: the default is 10 seconds, which is not enough for heavy Python servers with cold starts. On older builds, remote servers may have required the flag experimental_use_rmcp_client = true.

There are no scopes, so officially you cannot share the config through git; teams work around this with templates and Ansible. In addition, Codex sees a server's tools only at session start, and browser-based OAuth is less smooth there.

OpenCode uses JSON (opencode.json or opencode.jsonc). In version 2, servers live inside mcp.servers, and the old format no longer works. Remote servers use OAuth with PKCE and automatic token refresh by default. If you need an API key, set "oauth": false and a header with {env:NAME}; shell variables are not expanded inside JSON. There are three timeouts (startup, catalog and execution), and the last one defaults to 12 hours.

Saving Context and a Live Example

MCP has a cost: tool descriptions take up space in the context window, and a large number of connected servers can sometimes perform worse than a set of skills. OpenCode V2 enables Code Mode by default: instead of dozens of raw tools, the model gets a single sandbox tool and calls the rest as functions. You can turn the mode off with "codemode": false. The Context7 installer for Codex (npx ctx7 setup --codex) asks you to choose between MCP and a skill; in the second case, documentation is loaded without a constantly running server.

As an example, the author connects Context7 (search over up-to-date documentation) and the Vkusvill server with 11 tools: product search, nutritional values (KBZhU), discounts, recipes, order history, and a link to the cart. Search and recipes work anonymously, while order history and personalized discounts require OAuth 2.0 with PKCE. The agent's task: assemble a cart for a dinner for three within 3,000 rubles, and in parallel find in Context7 the current way to work with React server components. The model chooses the order of calls itself: typically it searches for each product first, then requests the details.

The practical takeaway is simple. Start with Context7 in any of the agents; it's a single command. If you need a shared config in a repository, pick Claude Code. If you want one file for the CLI, the extension and the app, choose Codex. If flexibility and context savings matter most, look at OpenCode V2. The author explicitly notes that part of the material about BotHub is an advertisement for his project.

Story

Key Questions Answered

How MCP Works?

The architecture has three layers. The host is the application that contains the model: Claude Code, Codex, OpenCode or Cursor. Inside the host lives a client, which maintains the connection to the server. The server is a separate process or HTTP service that exposes tools. The model sees the list of calls (tools/list) and decides what to invoke, and the client forwards the request to the server (tools/call). Under the hood, it's plain JSON-RPC. There are two and a half transports.

What are the key details on Three CLIs, Three Approaches to Config?

Claude Code adds a server with a single command: claude mcp add --transport http name URL for a remote one, and claude mcp add name -- npx ... for a local one. Its own flags (--transport, --env, --header) go before the double dash, and the server's flags go after it. The main distinguishing feature is three scopes, that is, levels of visibility. Local is visible only to you, in this project, and is stored in ~/.claude.json. Project is written to .mcp.json in the repository root and reaches colleagues through git.

What are the key details on Saving Context and a Live Example?

MCP has a cost: tool descriptions take up space in the context window, and a large number of connected servers can sometimes perform worse than a set of skills. OpenCode V2 enables Code Mode by default: instead of dozens of raw tools, the model gets a single sandbox tool and calls the rest as functions. You can turn the mode off with "codemode": false.

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Free · Waitlist · Hermes + DeepSeek

Free 2-Day Vibecoding & AI Agents Intensive

Day 1: the autonomous Hermes + DeepSeek AI agent — vibecoding and development on par with Claude Code / Codex / Gemini. Led by Jemal Hamidun, Head of AI at Alpina Digital and academic supervisor at MIPT. Right after you register with our bot Nika: the recording + 11 materials from the previous intensive.

Join the waitlist →Nomad AI Workspace
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — Claude Code, Codex and OpenCode Wire Up MCP Differently: The Registry Holds 50,000 Servers https://news.hamidun.com/en/news/18636/claude-code-codex-and-opencode-wire-up-mcp-differently-the-r

What do you think?
Loading comments…