Skip to content
kmem

Connect Gemini

You can connect the Gemini web app or Gemini CLI. The web app signs in to kmem. Gemini CLI uses a token.

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 the steps for both the web app and Gemini CLI.

The Gemini web app

Who can use it

The Gemini web app takes custom apps only in these conditions:

  • 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.

If you cannot add kmem in the web app, use Gemini CLI or Quick Connect.

Add kmem to the web app

  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. Type a connection name, 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 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).

Gemini CLI

Gemini CLI keeps its settings for your user account in ~/.gemini/settings.json.

  1. In kmem, fill in the New connection form, and select Create connection. 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 kmem entry. Keep your other servers and settings.
  5. Save the file.
  6. Start Gemini CLI again.
  7. Run /mcp. Check that kmem is connected.
  8. Send the check prompt.

The configuration looks like this:

{
  "mcpServers": {
    "kmem": {
      "httpUrl": "https://acme.kmem.app/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}

Replace acme with your org's subdomain and YOUR_TOKEN with the token of your connection. The Connect screen fills in both for you.

The key httpUrl tells Gemini CLI to use the streamable HTTP transport. Keep that key name.

This is the check prompt for both routes:

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.

If you cannot add kmem

If neither route works for you, 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.

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 another client. Do not trust an answer that Gemini gives without the URL.

Next steps