--- title: "Connect Gemini" type: reference tags: [signpost, docs, reference] proposed_by: tok_bc09b340db294c709763789154d8113d model: kmem-docs-publisher extracted_at: "2026-10-08T22:34:51.769Z" --- # Connect Gemini Use Gemini CLI with a token, or give Gemini a Quick Connect URL. The Gemini web app can sign in to kmem only for some Google accounts. Nobody has tested that sign-in with kmem. The Connect screen marks Gemini **Not yet tested with kmem**. The steps on this page come from the Google documentation. Google can change its screens without notice. In kmem, select **Connect**, then Gemini in the list of clients. The Gemini tab shows Gemini CLI, the web app, and Quick Connect. ![The Gemini tab in Connect, with the steps for the Gemini web app and for Gemini CLI.](/guide/190-gemini.webp) ## Gemini CLI Gemini CLI is the MCP route. It uses a token. It does not depend on the web app's country or account limits. Gemini CLI keeps its settings for your user account in `~/.gemini/settings.json`. 1. In kmem, check the **New connection** form. kmem fills in a name, for example "Gemini CLI · Maya · 8 Oct". Select **Create connection**, and copy the token now. 2. Under **Configuration for Gemini CLI**, select **Copy configuration**. 3. Open `~/.gemini/settings.json` in a text editor. If the file does not exist, create it. 4. Merge the kmem configuration into the file. If the file already has `mcpServers`, add only the `acme-kmem` entry. Keep your other servers and settings. 5. Save the file. 6. Start Gemini CLI again. 7. Run `/mcp`. Check that acme-kmem is connected. 8. Send the check prompt. The configuration looks like this: ```json kmem:gemini { "mcpServers": { "acme-kmem": { "httpUrl": "https://acme.kmem.app/mcp", "headers": { "Authorization": "Bearer YOUR_TOKEN" } } } } ``` Replace acme with your org's subdomain, in the server name and in the endpoint. Replace YOUR_TOKEN with the token of your connection. The Connect screen fills in these values for you. The server name is `-kmem`, for example `acme-kmem`. Each org has its own server name, so one computer can hold the kmem of more than one org. The key `httpUrl` tells Gemini CLI to use the streamable HTTP transport. Keep that key name. This is the check prompt: ```text kmem:check-prompt Use kmem to list the docs I can access. If there are none, say so. ``` In kmem, select **Check connection** after you send it. Read [Check a connection](./110-connect-agents.md#check-a-connection). ## Quick Connect If you use Gemini in the browser, use Quick Connect. Quick Connect gives Gemini a private URL with instructions. 1. In the Gemini tab in kmem, select **Use Quick Connect**. 2. Follow the steps in [Use Quick Connect and other clients](./200-use-quick-connect-and-other-clients.md). The Gemini tab marks this route **Quick Connect not yet tested with Gemini**. One Gemini model did not read a Quick Connect URL in an earlier test. If Gemini says that it cannot open the URL, stop, and use Gemini CLI or another client. Do not trust an answer that Gemini gives without the URL. ## The Gemini web app The web app can sign in to kmem only in these conditions. If any of them fails, use Gemini CLI or Quick Connect. - You use a personal Google Account, not a work or school account. - You are in the United States. - You use Gemini in English. - "Keep Activity" is on. 1. In kmem, under **MCP endpoint**, select **Copy endpoint**. The endpoint looks like `https://acme.kmem.app/mcp`. 2. In the Gemini web app, open "Settings", then "Connected Apps". 3. Under "Custom apps", select "Add a custom app". 4. Paste the MCP endpoint, then select "Next". 5. Sign in to kmem. kmem shows the approval page. 6. Check the connection name. kmem fills one in, and you can change it. Choose the permission and the expiry, then select "Allow connection". 7. In a chat, type `@` and choose kmem. 8. Send the check prompt. [Approve kmem](./120-connect-chatgpt.md#approve-kmem) explains each part of the approval page. kmem gives the web app no refresh token. When the connection expires, add kmem again from the web app. In kmem, the connection appears in **Connections**. The row shows the name that the web app gives itself, for example **Via Gemini (sign-in)**. ## Next steps - [Use Quick Connect and other clients](./200-use-quick-connect-and-other-clients.md) - [Connect agents](./110-connect-agents.md) - [Troubleshooting](./250-troubleshooting.md)