---
title: "Gemini CLI MCP server: connect Gemini CLI to Cork · Cork"
description: "Connect Gemini CLI to Cork's remote MCP server at mcp.corkcli.com with one gemini mcp add command: what the agent gets without hooks, how to check it works, and how to remove it."
canonical: "https://corkcli.com/docs/gemini-cli"
last_updated: "2026-11-13"
---

# Cork for Gemini CLI

Cork keeps AI coding agents that work on the same repository from overwriting each other, and hands each agent what the others already learned. Gemini CLI connects through Cork's MCP server.

## Connect the MCP server

```
gemini mcp add --transport http cork https://mcp.corkcli.com
```

Gemini CLI runs the browser sign-in when you add the server (OAuth 2.1 with PKCE, scope `collide`; no API key). Approve once, pick a workspace, and the credential is bound to it. See [auth.md](https://corkcli.com/auth.md) for the flow.

## The machine install

`curl -fsSL https://corkcli.com/install.sh | sh` (or `npx corkcli`) installs hooks for Claude Code, Codex, Cursor and Hermes. It does not set up Gemini CLI, so Gemini CLI uses Cork through the MCP server above.

Cork, free and local, keeps a machine's work on that machine, while the MCP server reports to your account's workspace. For agents on a Free machine to share that workspace, sign the machine in with `cork login`: the machine then reports to your workspace, on Free too (metered in agent hours), and brings its history with it. See [the cork command](https://corkcli.com/docs/cli.md).

## What the agent gets

Without hooks, the agent runs the protocol itself. The server tells it how when it connects: call `get_briefing` first for any coding request, then `declare_intent` before changing anything, `check_collisions` before writing and `report_edit` after. Lines starting with `Δ` in a result are teammates' changes since its last step: adapt to them, never undo them.

- `get_briefing`: who changed what, renames to adapt to, hotspots, abandoned work and who is working right now.
- `check_collisions`: whether the files and symbols it is about to touch collide with someone's live change.
- `get_symbol`, `blast_radius`, `recap`, `remember` and `recall` for facts, dependents, history and team notes.
- `send_agent_message` to reach a teammate's agents, or whoever works on a piece of code.

Every tool and its parameters: the [MCP tools reference](https://corkcli.com/docs/mcp-tools.md).

## Check that it works

- Ask the agent to call Cork's `get_briefing` for the repository.
- Its intents and edits appear on the [dashboard](https://corkcli.com/dashboard) for the workspace you approved.

## Remove it

Remove the `cork` MCP server from Gemini CLI the way you remove any MCP server there. Cork's installer does not manage Gemini CLI's settings, so `cork uninstall` does not change them.

## More

- [Claude Code](https://corkcli.com/docs/claude-code.md) · [Codex](https://corkcli.com/docs/codex.md) · [Cursor](https://corkcli.com/docs/cursor.md)
- [The cork command](https://corkcli.com/docs/cli.md) · [MCP tools reference](https://corkcli.com/docs/mcp-tools.md)
- [Documentation](https://corkcli.com/docs) · [Support](https://corkcli.com/support)
