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

# Gemini CLI setup

> Connect Gemini CLI to Fortress MCP with an HTTP server command.

Use Gemini CLI when the agent runs in Google's terminal client.

## Generate the setup command

1. Open **Agents** in Fortress.
2. Create or rotate an agent.
3. Choose **Gemini CLI** as the runtime.
4. Copy the generated command.

The generated command follows this shape:

```bash theme={"theme":"github-dark"}
gemini mcp add --scope user --transport http --header 'Authorization: Bearer ft_<token>' fortress-<agent> 'https://api.fortressproductivity.com/mcp?agent_id=<agent-id>'
```

Fortress uses `--scope user` so the server is available outside one project. Use a project-scoped setup only when that is intentional.

## Verify

Run:

```bash theme={"theme":"github-dark"}
gemini mcp list
```

Then ask Gemini to read `fortress://workspace/overview`.

## Manual config

Gemini CLI can also read `mcpServers` from `~/.gemini/settings.json`:

```json theme={"theme":"github-dark"}
{
  "mcpServers": {
    "fortress-agent": {
      "httpUrl": "https://api.fortressproductivity.com/mcp?agent_id=<agent-id>",
      "headers": {
        "Authorization": "Bearer ft_<token>"
      }
    }
  }
}
```

See the Gemini CLI [MCP server documentation](https://geminicli.com/docs/tools/mcp-server/).
