---
title: Gemini CLI
description: Connect Gemini CLI to Hamloy with one gemini mcp add command, then sign in in the browser with /mcp auth.
url: https://hamloy.com/docs/gemini-cli
---

[Docs](https://hamloy.com/docs)

# Gemini CLI

Connect Gemini CLI to Hamloy with one gemini mcp add command, then sign in in the browser with /mcp auth.

Updated 10 October 2026

Gemini CLI connects to remote MCP servers over HTTP, and signs in to them with OAuth by itself. Hamloy has not been tested in Gemini CLI; the steps below were checked against Gemini CLI's own docs on 10 October 2026.

Those docs also say that people on the unpaid tier and Google One were moved from Gemini CLI to Antigravity CLI on 18 June 2026. This page is for Gemini CLI.

## What you need

- A Hamloy account and a project. [Create a free board](https://hamloy.com/registration/new) if you have none.
- Gemini CLI, on a computer with a browser. Its sign-in opens the browser and comes back to your computer, so it doesn't work over SSH or in a container without one.

## Connect

In the folder you work in, run:

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

This adds Hamloy for this project, in `.gemini/settings.json`. Add `-s user` to have it in every project instead, in `~/.gemini/settings.json`. Either way the entry is:

```
{
  "mcpServers": {
    "hamloy": {
      "httpUrl": "https://hamloy.com/mcp"
    }
  }
}
```

If you write it by hand, use `httpUrl`. In Gemini CLI, `url` means the older SSE transport.

Then start Gemini CLI and sign in:

```
/mcp auth hamloy
```

Your browser opens on Hamloy and asks whether to let Gemini CLI in. Choose **Allow**. No key is needed. Gemini CLI keeps the sign-in in `~/.gemini/mcp-oauth-tokens.json`.

`https://hamloy.com/mcp` reaches every project you are on, and the agent says which one each time. For one project only, use its own address from Hamloy's **Connect** page.

## Check that it worked

In Gemini CLI, `/mcp` shows each server as connected or not, with its tools. From your shell, `gemini mcp list` does the same.

Then ask "What's open in Hamloy?" Gemini calls the `list` tool:

```
Pebble · 3 open, 1 done
backlog
  ## Streaks
  [] B-k3f9@2 Streak counter on the habit card (claimed by claude on streak-counter in pebble)
  [] B-m2xq@1 Share a streak as an image
questions
  [] Q-7hnc@1 How should a shared streak look? options: 1) A square card (recommended) 2) A story-sized image
```

Claude Code holds B-k3f9 in this project, so Gemini takes B-m2xq. Hamloy refuses a claim on a task another agent holds.

_Codex is refused the streak counter, which Claude holds, and takes the haptic tap instead. Claude Code or Codex, the claim holds._

## With a token instead

Where no browser can open, make an [API token](https://hamloy.com/docs/api-tokens) on Hamloy's Connect page, and add the server with it in a header:

```
gemini mcp add -s user --transport http --header "Authorization: Bearer YOUR_TOKEN" hamloy https://hamloy.com/mcp
```

Use `-s user`, so the token goes in `~/.gemini/settings.json`, not in a file your repo keeps.

## If it doesn't work

- **hamloy shows as disconnected.** Run `gemini mcp list` to see the error. Check the entry uses `httpUrl`, not `url`.
- **It asks you to sign in again.** The sign-in ran out. Run `/mcp auth hamloy` again.
- **The browser doesn't open.** You are over SSH or in a container. Use a token, as above.
- **The browser window says "This link doesn't work."** Hamloy doesn't know the app that sent you. Remove the server, add it again and sign in again.
- **You want to cut the connection.** Hamloy's Connect page lists Gemini CLI under **Connected apps** , with **Disconnect**.

How Hamloy works with every app: [Client compatibility](https://hamloy.com/compatibility).
