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

# Gemini

> Adding a HeyMCP tunnel to the Gemini CLI.

The Gemini CLI configures MCP servers in its `settings.json`, under an
`mcpServers` object.

## Add the connector

```bash theme={null}
heymcp share localhost:8000
```

Then in your Gemini CLI `settings.json`:

```json theme={null}
{
  "mcpServers": {
    "heymcp": {
      "httpUrl": "https://amber-jetty.t.heymcp.dev/mcp"
    }
  }
}
```

<Note>
  The key is **`httpUrl`**, not `url`. Gemini CLI uses `httpUrl` for the
  streamable HTTP transport and `url` for legacy SSE endpoints. HeyMCP serves
  streamable HTTP, so `httpUrl` is the one you want.
</Note>

## With a bearer token

If you shared with [`--bearer`](/security/authentication):

```json theme={null}
{
  "mcpServers": {
    "heymcp": {
      "httpUrl": "https://amber-jetty.t.heymcp.dev/mcp",
      "headers": {
        "Authorization": "Bearer s3cret"
      }
    }
  }
}
```

`timeout` is also accepted if a tool of yours is slow enough to need it.

## Check it connected

Start the Gemini CLI and confirm your tools are listed. In the HeyMCP inspector
you should see handshake rows fingerprinted as Gemini.

<h2 id="its-not-showing-up">
  It's not showing up
</h2>

<AccordionGroup>
  <Accordion title="The server is ignored entirely">
    Almost always `url` where it should be `httpUrl`, or a JSON syntax error in
    `settings.json`.
  </Accordion>

  <Accordion title="Nothing in the HeyMCP inspector">
    Gemini never reached the edge. Check the URL and that `heymcp share` is
    still running.
  </Accordion>

  <Accordion title="401 in the inspector">
    The `headers` block is missing, or the token doesn't match `--bearer`.
  </Accordion>
</AccordionGroup>
