---
title: Gemini CLI's MCP server isn't working
description: Where Gemini CLI keeps its MCP servers, why a remote one needs httpUrl, how /mcp shows and signs in to them, and where to read what went wrong.
url: https://hamloy.com/mcp-fix/gemini-cli
---

[MCP fix](https://hamloy.com/mcp-fix)

# Gemini CLI's MCP server isn't working

Where Gemini CLI keeps its MCP servers, why a remote one needs httpUrl, how /mcp shows and signs in to them, and where to read what went wrong.

Gemini CLI keeps MCP servers in its settings file, shows them with `/mcp`, and signs in to a remote one from there. From Gemini CLI's own docs, read on 17 October 2026.

## Where the file is

- `.gemini/settings.json` in the folder you work in, for that folder. `gemini mcp add` writes here.
- `~/.gemini/settings.json` in your home folder, for every folder (`gemini mcp add -s user`).

Both put servers under `mcpServers`. A remote server like Hamloy goes in `httpUrl`:

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

In Gemini CLI, `url` means the older SSE transport, and `httpUrl` the newer one Hamloy uses. Putting the address in `url` is a common reason a server shows as disconnected.

## See whether it is connected

Type `/mcp` in Gemini CLI: each server is CONNECTED, CONNECTING or DISCONNECTED, with its tools. From your shell, `gemini mcp list` gives each server's name, entry and state.

## Sign in again

`/mcp auth` lists the servers that need a sign-in; `/mcp auth hamloy` opens your browser on Hamloy's. Run it again whenever it asks. The sign-in comes back to your own computer, so it doesn't work over SSH or in a container: use an [API token](https://hamloy.com/docs/api-tokens) there, as [Gemini CLI's page](https://hamloy.com/docs/gemini-cli) shows.

## Read what happened

Gemini CLI keeps a server's connection errors quiet. Start it with `--debug` to see them, or press F12 for its debug console.

## Its own quirks

- A server's name should have no underscore in it.
- A tool's name is cut at 63 characters.

## The errors, one by one

- [The wrong type for the app](https://hamloy.com/mcp-fix/wrong-type-for-the-app)
- [No sign-in window opens](https://hamloy.com/mcp-fix/no-sign-in-window)
- [The token variable isn't read](https://hamloy.com/mcp-fix/token-variable-not-read)
- [The server is added, but there are no tools](https://hamloy.com/mcp-fix/no-tools-after-connecting)

## Check that it worked

Ask "What's open in Hamloy?" The agent calls the `list` tool and you get your lists back:

```
Pebble · 4 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
requests
  [] R-q4ve@1 Create an Apple developer account
```

Setting it up from the start: [Gemini CLI](https://hamloy.com/docs/gemini-cli).
