> For the complete documentation index, see [llms.txt](https://docs.remote.it/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.remote.it/mcp-server/connect-gemini.md).

# Connect Gemini

Add Remote.It as a remote MCP server in Gemini CLI over Streamable HTTP with OAuth sign-in, by editing one config file.

Gemini CLI supports remote MCP servers over Streamable HTTP with OAuth 2.0, so the Remote.It MCP server can be added by editing one config file.

{% hint style="info" %}
The MCP server URL is:

```
https://cloud.remote.it/mcp
```

{% endhint %}

## Before you start

* A **Remote.It account** — [sign up free](https://app.remote.it/#/sign-up).
* **Gemini CLI** installed and signed in.

{% stepper %}
{% step %}

## Add the server

Edit `~/.gemini/settings.json` and add a `remoteit` entry under the top-level `mcpServers` key:

```json
{
  "mcpServers": {
    "remoteit": {
      "httpUrl": "https://cloud.remote.it/mcp",
      "oauth": {
        "enabled": true
      }
    }
  }
}
```

Gemini CLI discovers the OAuth configuration from the server automatically, so no client ID, authorization URL, or scopes are needed here.

{% hint style="info" %}
Match the path exactly — `/mcp`, with no trailing slash. A URL that would normally redirect can break the OAuth flow.
{% endhint %}

You can also add it from the command line instead of editing the file:

```bash
gemini mcp add --transport http remoteit https://cloud.remote.it/mcp
```

Restart Gemini CLI after changing `settings.json` — configuration is read at startup, not mid-session.
{% endstep %}

{% step %}

## Sign in to Remote.It

Start Gemini CLI and run:

```
/mcp auth remoteit
```

This opens your browser. Sign in with your normal Remote.It account (social sign-in and 2FA both work), then review the consent screen and choose what to grant — you can restrict the connector to read-only access here. See [Permissions & Safety](/mcp-server/permissions-and-safety.md).

You never paste an API key or secret into Gemini.
{% endstep %}

{% step %}

## Check the connection

```
/mcp
```

This lists connected servers and the tools they expose. Compare the list against the [Tool Reference](/mcp-server/tools.md). If it's empty, see [Troubleshooting](#troubleshooting).
{% endstep %}

{% step %}

## Test it

Ask something that can only be answered from your account:

* "Which of my Remote.It devices are offline?"
* "List the services on my jump box."
* "Open an SSH connection to my office Raspberry Pi."

Start with a read-only question. If the device names match your actual account, the connector is working.
{% endstep %}
{% endstepper %}

Remote.It gates destructive operations — deleting devices, running scripts — behind an explicit confirmation step.

## Optional — Limit the tools

If you only want a subset of the Remote.It tools available, use `includeTools` or `excludeTools`. `excludeTools` wins when a tool appears in both.

```json
{
  "mcpServers": {
    "remoteit": {
      "httpUrl": "https://cloud.remote.it/mcp",
      "oauth": { "enabled": true },
      "excludeTools": ["delete_device"],
      "timeout": 30000
    }
  }
}
```

This is a useful belt-and-braces measure alongside the scopes you grant at consent, but it is a client-side filter — the authoritative control is your Remote.It account permissions.

## Troubleshooting

| Symptom                                              | Cause and fix                                                                                                                                                                                          |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Server doesn't appear after editing `settings.json`  | Restart Gemini CLI. Configuration is read at startup.                                                                                                                                                  |
| `/mcp` shows the server but no tools                 | Check `includeTools` isn't filtering them out, and confirm the OAuth flow completed with `/mcp auth remoteit`.                                                                                         |
| OAuth flow fails or loops                            | Check the URL is exactly `https://cloud.remote.it/mcp` with no trailing slash. Complete the browser sign-in in the same profile you're working in.                                                     |
| Server times out on connect                          | Raise the timeout: `"timeout": 120000` in the server's config block.                                                                                                                                   |
| Tools appear but calls fail with a permissions error | Your Remote.It account or the scopes granted at consent don't cover that operation. See [Permissions & Safety](/mcp-server/permissions-and-safety.md), or re-run `/mcp auth remoteit` to redo consent. |

## Next steps

* [Tool Reference](/mcp-server/tools.md) — every tool the server exposes
* [Prompt Library](/mcp-server/prompt-library.md) — things to ask, grouped by task
* [Permissions & Safety](/mcp-server/permissions-and-safety.md) — scopes, consent, and safety gates
* [Connect Claude](/mcp-server/connect-claude.md) — add the connector to Claude on web, desktop, mobile, or Claude Code
* [Connect ChatGPT](/mcp-server/connect-chatgpt.md) — add the connector to ChatGPT using Developer mode
* [Connect Grok](/mcp-server/connect-grok.md) — add the connector in the Grok web app, for a team, or via the xAI API


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.remote.it/mcp-server/connect-gemini.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
