Skip to content

Integration

Gemini CLI

One command in the terminal, restart Gemini CLI — from then on Google's terminal tool looks things up in your memory. The command extends the settings itself.

Audience
Anyone using Gemini CLI in the terminal. The free knowmind Private plan is enough.

Prerequisites

  • Gemini CLI installed (npm i -g @google/gemini-cli) and signed in with Google
  • Node.js 20 or newer (anyone running Gemini CLI has it)
  • An email address for the knowmind account

Steps

  1. 1

    Create your knowmind account

    Enter your email address at knowmind.de. You receive a sign-in link by mail and use it to sign in. There is no password.

    Then create your workspace: name, short name and plan. The Private plan costs 0 € and is enough for this guide; the pricing page lists the others.

    Outcome: The welcome screen is open, offering “start by writing” and “connect my AI tool”. Three starter cards are already in your workspace.

  2. 2

    Create an access key

    Create a key in the Cockpit under keys. It starts with kmt_ and is shown only once, so copy it right away. If you picked Gemini CLI on the welcome screen, it is already part of the command there.

    Outcome: A key of the form kmt_… is on your clipboard.

  3. 3

    Write the entry

    Paste the command, replace kmt_YOUR_KEY and press enter:

    bash
    npx -y knowmind install gemini --token kmt_YOUR_KEY

    The command extends ~/.gemini/settings.json (Windows: %USERPROFILE%\.gemini\settings.json) and leaves your existing settings alone. --print only shows the entry.

    Outcome: The output ends by telling you to restart Gemini CLI.

  4. 4

    Restart and allow the server

    End the running session and start gemini again. The /mcp command lists the servers; knowmind appears there with its tools, and you confirm its use if Gemini asks you to.

    Outcome: /mcp lists knowmind with its tools.

  5. 5

    First recall

    Ask for something that should be in your memory. In a fresh workspace the three starter cards come back, marked as a starting point rather than a solid hit. So save something first: “Save to knowmind: invoicing runs at the end of the month.”

    Outcome: Gemini calls knowmind_recall_memories, the call appears in the output, and the next question hits straight away.

Verify the result

The integration works when all three hold:

  • /mcp lists knowmind with its tools.
  • A question leads to a tool call in the output.
  • The recall shows up in the Cockpit timeline, and keys shows a last-used time.

Troubleshooting

Error messageCauseResolution
/mcp shows no serverGemini CLI kept running during setup.End the session completely and start gemini again — the settings are read at startup.
npx: command not foundNode.js is missing on this machine.Install it from nodejs.org, open a new terminal and run the command again.
Calls return 401The key was copied incompletely or has been revoked.Create a new one under keys and run the command again — it replaces the old entry.
The settings already contain your own MCP serversNot an error: the command extends the file and keeps what is in it.Use --print to see the entry first and paste it yourself if you maintain the file by hand.
Manual setup

Entry in ~/.gemini/settings.json:

json
{
  "mcpServers": {
    "knowmind": {
      "command": "npx",
      "args": ["-y", "knowmind", "mcp"],
      "env": {
        "KNOWMIND_TOKEN": "kmt_YOUR_KEY",
        "KNOWMIND_API_URL": "https://knowmind.de"
      }
    }
  }
}
What we tested
Tested on 19 October 2026: the command runs and writes ~/.gemini/settings.json; account, workspace and recall over the same route work as well. We did not verify Gemini CLI itself, because it requires a Google sign-in.

Related