Skip to content

Gemini CLI

Google's open-source terminal agent ships with a 1 million-token context window, letting you feed entire codebases into a single session. Adding an MCP server is a one-line JSON change — once configured, Gemini CLI treats your remote tools exactly like its 70+ built-in extensions.


Ge
Gemini CLI
TRANSPORT
Streamable HTTP ✓
PLATFORM
Windows · macOS · Linux
MCP VIA
settings.json

1M Context Meets External Tools

A million tokens means Gemini CLI can hold roughly 20,000 lines of code in memory at once. When you pair that with MCP-powered tools — like a database introspector or a monitoring dashboard — the agent can reason across your full project and act on real-time data in the same session.

Plan Mode takes this further. Before executing changes, Gemini builds a read-only plan that can query MCP tools for validation. Once you approve, it switches to write mode and carries out the work. This two-phase approach drastically reduces mistakes on large refactors.

Other highlights that interact well with MCP:

  • Research subagents — delegated workers that gather context from MCP before the main agent acts
  • Checkpointing — built-in undo for any action, including MCP tool calls
  • Shell autocompletion — tab-complete MCP tool names in the interactive prompt
  • Apache 2.0 — fully open-source, no vendor lock-in

Configuration

1. Copy Your Vinkius URL

In Vinkius Cloud, navigate to Connection Tokens and create one. The resulting URL is your MCP endpoint.

2. Add the Server to settings.json

Open or create ~/.gemini/settings.json and add the mcpServers block:

json
{
  "mcpServers": {
    "vinkius": {
      "uri": "https://edge.vinkius.com/{TOKEN}/mcp"
    }
  }
}

3. Launch and Verify

bash
gemini

Gemini CLI reads settings.json on startup and probes every MCP server. Your tools will show up in the session alongside built-in extensions — no separate import or plugin install.

Per-project config

Drop a .gemini/settings.json in the project root to add servers only for that repository. The project file merges with the global one.


FAQ

Where does Gemini CLI store MCP configuration? Global config lives at ~/.gemini/settings.json. You can also add a .gemini/settings.json per project for repository-scoped servers.

Does Plan Mode support MCP tools? Yes, but in read-only mode. Plan Mode calls MCP tools whose descriptions are marked read-safe, giving you a dry-run preview before any mutations.

Is there a free tier? Gemini CLI is Apache 2.0 open-source. Google offers a free Gemini API tier, though rate limits apply for heavy usage.

How many MCP servers can I add? There is no hard limit. The mcpServers object in settings.json accepts as many entries as you need.