Connecting Codex CLI, Cursor, and Antigravity via MCP
Iβve spent this series building an orchestration system almost nobody else could see: a worker model, a supervisor, a retry loop, a Slack approval gate, all wired into one LangGraph process I run from my own terminal. Useful, but lonely. Only my orchestrator ever called any of it.
Today that changes. I turn the system into something other tools can plug into: Codex CLI, Cursor, and Googleβs Antigravity IDE, all talking to the same tool hub through the Model Context Protocol (MCP). MCP is an open protocol that lets any AI client discover and call tools exposed by a server, without a bespoke integration for each pairing. If youβve been following along, you already have the orchestrator β this post is about wiring more clients into it, not rebuilding it.
MCP Hub Architecture: Centralizing Tool Access for Multiple AI Clients
Instead of teaching every tool its own Slack logic, its own file-writing logic, its own retry logic, I centralise all of that behind one MCP server:
βββββββββββββββββββββββββ
β Codex CLI β
βββββββββββββββββββββββββ€
β Cursor β
βββββββββββββββββββββββββ€
β Antigravity β
ββββββββββββββ²βββββββββββ
β
β MCP
β
βββββββββ΄βββββββββ
β MCP Tool Hub β
β (your tools) β
βββββββββ²βββββββββ
β
β tool boundary
β
βββββββββ΄βββββββββ
β LangGraph Core β
β Orchestrator β
ββββββββββββββββββ
The MCP hub exposes a small set of tools β write a file, request Slack approval, log an event β and anything that speaks MCP can call them. The orchestrator remains the brain. The MCP server becomes the one stable interface everything else talks to.
Why a Central MCP Hub Beats Per-Client Integrations
Without a shared MCP hub, Iβd end up reimplementing side effects three times over: Codex CLI would need its own Slack integration, Cursor its own file-writing code, Antigravity its own execution logic. Every one of those copies is a place a bug can hide, and a place Iβd have to fix it again later.
With the hub in place thereβs one tool surface, one set of side effects, one approval gate, one place the logs come from. The orchestrator still decides what happens. The hub is simply how everyone reaches it.
The Three MCP Roles: Orchestrator, Tool Hub, Client
I think of the system as three separate roles now.
Orchestrator (LangGraph)
LangGraph is a graph-based orchestration framework for building stateful, multi-step LLM workflows in Python. In this system it decides the workflow, manages retries, waits for Slack approval, and tracks state across steps.
Tool hub (MCP server)
Executes side effects: writes files, posts to Slack, validates arguments, logs everything.
Clients (Codex CLI, Cursor, Antigravity)
Request actions and consume tools. They extend the system without ever touching its internals.
None of the three should reach around the others. A client that bypasses the hub to write a file directly has quietly broken the whole reason for building one.
Configuring MCP Servers in Codex CLI, Cursor, and Antigravity
Wiring up each client is the part I actually had to test, not just diagram.
Codex CLI
Codex CLI is OpenAIβs terminal-based coding agent, and it reads MCP servers from ~/.codex/config.toml (or a project-scoped .codex/config.toml), one [mcp_servers.<name>] table per server. Codex CLI supports both stdio (a locally launched child process) and Streamable HTTP transports:
[mcp_servers.orchestrator-hub]
command = "npx"
args = ["-y", "mcp-remote", "http://localhost:9000"]
Run /mcp inside a Codex session afterwards to confirm the server registered β full reference in OpenAIβs Codex MCP documentation.
Cursor
Cursor is an AI-native code editor that reads either a project file at .cursor/mcp.json or a global one at ~/.cursor/mcp.json; if a server is defined in both, the project-level config wins, according to Cursorβs MCP documentation:
{
"mcpServers": {
"orchestrator-hub": {
"url": "http://localhost:9000"
}
}
}
One thing worth knowing before you plug in a dozen servers: Cursor caps you at roughly 40 active tools across everything connected, and quietly drops access past that limit rather than erroring loudly.
Antigravity
Antigravity is Googleβs agentic IDE (built on Gemini), and it shares a single MCP configuration file with Gemini CLI: ~/.gemini/config/mcp_config.json. Edit it directly, or open Manage MCP Servers β View raw config from the IDEβs agent panel, per Antigravityβs MCP documentation:
{
"mcpServers": {
"orchestrator-hub": {
"url": "http://localhost:9000"
}
}
}
Three different config files, three different tools, the same server, the same URL. That repetition across Codex CLI, Cursor, and Antigravity is the entire point.
| Client | Config file | Format |
|---|---|---|
| Codex CLI | ~/.codex/config.toml (or project .codex/config.toml) |
TOML, [mcp_servers.<name>] table |
| Cursor | .cursor/mcp.json (project) or ~/.cursor/mcp.json (global) |
JSON, mcpServers object |
| Antigravity | ~/.gemini/config/mcp_config.json |
JSON, mcpServers object |
Why MCP Is the Correct Abstraction for Multi-Client Tool Access
MCP is a standardised protocol that defines tool discovery, invocation, and argument structure, so a client and a server never need to have met each other before to work together β thatβs the actual point of the MCP specification: one contract, any client, any server.
MCPβs single contract is what lets Codex CLI, Cursor, and Antigravity call the same tools without me writing three separate integrations for three separate tools.
MCP Mental Model: One Socket, Many Clients
Think of MCP like a hotel roomβs universal power adaptor. Your laptop charger, your phone, your travel kettle β none of them were built with each other in mind, and none of them need to know about each other. They only need to agree on the socket. MCP is the socket. The orchestrator, the Slack approval gate, the file writer β those are the appliances. Codex CLI, Cursor, and Antigravity are just different plugs walking into the room.
MCP Client Setup Checklist
- Confirm your MCP server is actually reachable at the URL you plan to register (
curl http://localhost:9000is enough of a check). - Add it to Codex CLIβs
config.toml, restart the session, and run/mcpto confirm it registered. - Add the same URL to
.cursor/mcp.json, keeping an eye on your total tool count if you already have other servers connected. - Add it to
~/.gemini/config/mcp_config.jsonfor Antigravity, or use the IDEβs MCP Store instead of hand-editing the file. - Test one real tool call from each client before you trust it with anything that has side effects.
Related tools you may want to try next.
Make provides a visual automation platform to connect apps, APIs, and AI services without writing code.
UseBasin.com is a comprehensive backend automation platform for handling submissions, processing, filtering, and routing without coding.
What Changes (and What Doesnβt) After Adding an MCP Hub
Adding a shared MCP hub doesnβt change what the LangGraph orchestrator does. It still decides, still retries, still waits for a human on Slack. What changes is whoβs allowed to ask it to do something β a small change in code, and a much bigger change in how the whole project feels: less like a script I run myself, more like a platform other tools can lean on.
If you havenβt set up Codex CLI yet, I covered that in Getting Started with Codex CLI, and the local-MCP groundwork behind this post is in Local AI Agents with Cline, Ollama, and MCP.
References
Enjoyed this? Get more like it.
Weekly notes on AI tools, Python, and what I'm actually building β plus two free gifts: the 15-page Fantastic AI: The 2026 Toolkit and a Git Commands & Contribution Workflow Cheatsheet.