> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enginy.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Gemini CLI

> Register the hosted Enginy MCP server in Gemini CLI.

## Before you start

Gemini CLI is a good option if your team already works in Google's AI stack and your Gemini CLI setup
supports remote MCP.

An Enginy admin just needs to enable the MCP integration for the workspace — that's it to get started. Enginy
grants full access by default; restricting policy scopes is an optional, advanced step for later.

## Add the hosted server

Open `~/.gemini/settings.json` (or `.gemini/settings.json` for a project-level setup) and add Enginy:

```json theme={null}
{
  "mcpServers": {
    "enginy": {
      "url": "https://openapi.enginy.ai/mcp",
      "oauth": {
        "enabled": true
      }
    }
  }
}
```

Restart Gemini CLI, then start the OAuth flow:

```text theme={null}
/mcp auth enginy
```

Gemini CLI opens the Enginy browser approval flow. This requires a local browser and will not complete over a
headless or browserless SSH session.

## Verify the connection

After authorization, ask Gemini CLI to use Enginy MCP and run:

```text theme={null}
mcp_whoami
```

That confirms the hosted MCP server is reachable, OAuth completed, and the granted scopes match what Enginy approved.

<CardGroup cols={2}>
  <Card title="Client support matrix" icon="table-list" href="/mcp/client-support-matrix">
    Compare support levels and setup shapes across every Enginy MCP client.
  </Card>

  <Card title="Security and troubleshooting" icon="triangle-exclamation" href="/mcp/security-troubleshooting">
    Debug auth, scope, token, and transport issues after Gemini CLI connects.
  </Card>
</CardGroup>
