Skip to the page

Assistants

Gemini CLI

Gemini CLI connects to Lymi as a remote MCP server and signs in with OAuth. Unlike Claude Code or Codex, it needs a client ID in its config, because it cannot identify itself the way Lymi asks.

MCP server URL
https://my.lymi.app/mcp

Once connected, ask it to add the cards from a lesson, list what is due, or find a card. What it can and cannot do is on Connect an assistant.

Gemini CLI

Sign-in opens a browser on the same machine and waits for it on a local port, so run these steps on your own computer, not over SSH.

  1. Add the server

    Open ~/.gemini/settings.json and add Lymi under mcpServers. If the file already has servers, add the lymi entry beside them.

    ~/.gemini/settings.json
    {
      "mcpServers": {
        "lymi": {
          "httpUrl": "https://my.lymi.app/mcp",
          "oauth": {
            "enabled": true,
            "clientId": "https://lymi.app/oauth/gemini-cli.json",
            "redirectUri": "http://127.0.0.1:7777/oauth/callback"
          }
        }
      }
    }
  2. Sign in

    Start gemini and run /mcp auth lymi. Your browser opens on Lymi. Sign in with the account your Lymi uses, then approve the connection. Untick write if you want Gemini CLI to read your decks and nothing more.

  3. Check the tools

    Run /mcp. Lymi shows as connected, with its tools listed under it.

Gemini CLI keeps the tokens in ~/.gemini/mcp-oauth-tokens.json and refreshes them on its own. To disconnect for good, remove the lymi entry and revoke the grant under Connected apps in Lymi.

Why the client ID is on lymi.app

An MCP client normally introduces itself with a Client ID Metadata Document: a URL it owns that names the app and the redirects it may use. Claude and Codex publish one. Gemini CLI does not. It only knows dynamic client registration, which Lymi keeps switched off.

So Lymi publishes the document for it, at https://lymi.app/oauth/gemini-cli.json, and the clientId line points Gemini CLI at it. The document allows one redirect: port 7777, or any other port, on 127.0.0.1. A token can only reach the computer that started the sign-in, and nothing connects until you approve it.

The Gemini app

This guide does not cover it. On a personal account, custom connectors in the Gemini app need Gemini Spark, which is only available in the US. Lymi has not been tested there or in Gemini Enterprise.

When it does not connect

  • "No client ID provided and dynamic registration not supported". The oauth block is missing or misspelled. Copy it again from the step above.
  • Port 7777 is in use. Change the port in redirectUri to any free one. Keep 127.0.0.1: Lymi refuses localhost for this client.
  • Sign-in is refused. Lymi is private. Only the accounts on its allowlist can sign in, whatever the Google account in Gemini CLI is.
  • The browser never opens. Gemini CLI prints the sign-in URL. Open it in a browser on the same computer.