codex-gemini-bridge
# codex-gemini-bridge
[中文说明](README.zh-CN.md)
A lightweight, zero-dependency MCP server that connects **OpenAI Codex** to Gemini models via your local [Antigravity CLI (`agy`)](https://antigravity.google).
Supports **macOS**, **Linux**, and **Windows**.
---
## 1. Prerequisites
1. **Node.js**: `>= 22.0.0` (`node --version`)
2. **Antigravity CLI (`agy`)**:
- Install `agy` from the [official installation guide](https://antigravity.google/docs/cli/install/).
- Authenticate with Google:
```bash
agy auth login
agy models
```
---
## 2. Quick Install & Auto-Config (Recommended)
Run the one-liner setup command for your operating system. It downloads the project to `~/.codex/mcp-servers/codex-gemini-bridge` and **automatically configures Codex** (`~/.codex/config.toml`):
### macOS / Linux
```bash
bash <(curl -fsSL https://raw.githubusercontent.com/theotherkim/codex-gemini-bridge/main/scripts/setup.sh)
```
### Windows (PowerShell)
```powershell
irm https://raw.githubusercontent.com/theotherkim/codex-gemini-bridge/main/scripts/setup.ps1 | iex
```
*(If you already cloned the repo locally, simply run `npm run setup` inside the project directory).*
---
## 3. Manual Configuration (Optional)
If you prefer to configure manually, clone the repository into your Codex MCP directory:
### macOS / Linux
```bash
git clone https://github.com/theotherkim/codex-gemini-bridge.git ~/.codex/mcp-servers/codex-gemini-bridge
```
Add to `~/.codex/config.toml`:
```toml
[mcp_servers.codex-gemini-bridge]
command = "node"
args = ["~/.codex/mcp-servers/codex-gemini-bridge/src/index.mjs"]
env_vars = ["AGY_BIN"]
```
*(Or via Codex CLI: `codex mcp add codex-gemini-bridge -- node ~/.codex/mcp-servers/codex-gemini-bridge/src/index.mjs`)*
### Windows
```powershell
git clone https://github.com/theotherkim/codex-gemini-bridge.git "$env:USERPROFILE\.codex\mcp-servers\codex-gemini-bridge"
```
Add to `%USERPROFILE%\.codex\config.toml`:
```toml
[mcp_servers.codex-gemini-bridge]
command = "node"
args = ["C:/Users/<YourUsername>/.codex/mcp-servers/codex-gemini-bridge/src/index.mjs"]
env_vars = ["AGY_BIN"]
```
---
## 4. Usage
Restart Codex, then ask in natural language:
- *"Ask Gemini to summarize this codebase"*
- *"Use Gemini to review this pull request"*
- *"List available models with `gemini_models`"*
### Available Tools
- **`gemini`**: Send prompts to Gemini (supports `prompt`, `model`, `thinking_level`, `store`, etc.).
- **`gemini_models`**: List all models available to your local account.
---
## License
[MIT](LICENSE) © Kim
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: 'gemini' sends prompts and returns text completions, while 'gemini_models' lists available models. There is no ambiguity or overlap between them.
Both names share the 'gemini' prefix, but one is a bare noun and the other uses an underscore suffix. This is readable and predictable, though it doesn't follow a strict verb_noun pattern.
With only two tools, the server feels extremely thin for a general bridge. However, the scope is limited to prompt execution and model listing, so the count is borderline acceptable.
The core functions of sending prompts and listing models are covered, including support for conversation history via IDs. Minor gaps exist, such as streaming or explicit model selection parameters in the main tool, but the essential workflow is usable.