Skip to content

Connect while to Gemini CLI in 2026: the command and the authorization

Gemini CLI already writes your code. Connected to while over MCP, it also puts it on while, with its data, and leaves what matters for you to approve. Here is the connection, the authorization, and what Gemini CLI can do next.

By Aloïs Oddon, co-founder of Nextmap. Facts checked on November 19, 2026.

View as Markdown

Connect while to Gemini CLI over MCP in 2026: the command in the terminal, the authorization in the browser with the choice of tool and level, and Gemini CLI putting the tool on while with its data

Gemini CLI already writes your code. Connected to while over MCP, it also puts it on while: while builds the code, runs its tests, gives it an HTTPS address, watches it and tells you when it breaks2. The connection takes a minute, and you stay in control of what matters.

The short version. One terminal command is enough. On the first call, while opens a page in your browser: you choose where Gemini CLI acts, one tool or the whole organization, and its level, Read, Read and act, or Administer. What matters, like a production release, then waits for a person’s approval.

The connection at a glance

The momentWhat you do
ConnectOne command, below
AuthorizeA page in the browser: the tool or the organization, and the level
Try without an accountThe trial server, named while-essai
No browser, in CIA token in the Authorization header, confirmed with a link

Step 1: connect while to Gemini CLI

Terminal
gemini mcp add --scope user --transport http while https://app.while.sh/mcp

To connect every AI tool on your computer at once, while’s install script does the same thing2:

Terminal
curl -fsSL https://app.while.sh/install.sh | sh

Step 2: authorize Gemini CLI

Ask Gemini CLI for a first action on while. On the first tool call, while opens the authorization page in your browser: you sign in, then choose where Gemini CLI acts, one tool or the whole organization, and its level, Read, Read and act, or Administer2. Then open a new Gemini CLI session so while shows up among its tools2.

You, to your AI: Put this tool on while, with its data, and keep it for the team.

What Gemini CLI does next

Over MCP, Gemini CLI puts the tool on while, reads logs and errors, queries the data and rolls back when a version causes trouble2.

  • Put the tool on while. Gemini CLI writes the while.yaml file, sends the code, and while builds it, runs its tests and returns the address.
  • Understand an error. Gemini CLI reads the logs and the errors grouped in while, finds the cause and fixes it.
  • Roll back. If the latest version breaks something, Gemini CLI puts the previous one back.
Authorizing Gemini CLI on while: the browser page where you choose one tool or the whole organization and the Read, Read and act or Administer level, then a production release waiting for a person's approval
You choose where Gemini CLI acts and at what level, and what matters waits for a person.

What waits for your approval

Some actions wait for a person, and Gemini CLI gives you the link. A production release, deleting a database, an outside API or an access: a person in the organization decides. At the Read and act level, an administration action, like adding a person, creating a token or granting a role, is confirmed with one click2. Your AI never approves.

The credentials of your software stay in while, and Gemini CLI never sees them. The details are on our security page, and in connect an API with no credentials in the code.

Without an account: the trial

The trial server, https://app.while.sh/essai, needs no sign-in: the same commands, named while-essai. The tool has its address for a limited time, and Gemini CLI gives you a link to keep it by creating your account2.

Once the tool is on while, keep it for your colleagues with their email account, or share it with a client through a link and a password. The same guides exist for Claude Code, Codex and Cursor.

Try it with Gemini CLI

Give this message to Gemini CLI. The trial is free, with no sign-up, and your tool has its address in 3 minutes.

The message to give your AI
Read while.sh/agents and help me get started with while.

Sources

  1. Gemini CLI, MCP servers, accessed November 19, 2026
  2. while, the page for AI tools, accessed November 19, 2026

Questions

How do you connect while to Gemini CLI?

One terminal command is enough: it adds while’s MCP server, https://app.while.sh/mcp. On the first tool call, while opens an authorization page in your browser1,2.

Do you need a token?

No, Gemini CLI is authorized in your browser. For a CI with no browser, a token in the Authorization header replaces it: your AI creates it, and you confirm it with a link2.

What permissions should you give Gemini CLI?

At authorization, you choose where it acts, one tool or the whole organization, and its level: Read, Read and act, or Administer. Start with a single tool2.

Does Gemini CLI see my credentials?

No. The credentials of your software stay in while, and calls to an outside API go through while, which adds them.

Can you try without a while account?

Yes. The trial server, https://app.while.sh/essai, needs no sign-in: the same commands, named while-essai. The tool has its address for a limited time, with a link to keep it2.

Give your AI the message, and it takes care of the rest

Give this to your AI

Read while.sh/agents and help me get started with while.

Copy the message

In 3 minutes, with no sign-up, the tool has its own address. To keep it, create your account.

For a company project, write to the while team: hello@while.sh