Skip to content
Hjarni for Gemini CLI

The AI-native knowledge base for Gemini CLI

Gemini CLI runs Google's models in your terminal. Hjarni is the knowledge base it reads across sessions, so your runbooks, conventions, and decisions are one command away.

Free to start. No credit card required.

What this unlocks

Workflows that actually use your context

01

Project context in the terminal

Gemini CLI sees your working directory. Hjarni holds what is not in the repo: architecture decisions, deploy steps, past incidents, and the conventions you would otherwise re-explain.

02

Memory that survives the session

Each CLI run starts fresh. Save the important context to Hjarni once and the next session reads it back instead of rediscovering it.

03

Write the lesson back

Hjarni's MCP tools include create and update, so you can ask Gemini CLI to record a fix, the reason, and the rollback as a note before you move on.

04

Same notes across CLI and chat

Gemini CLI reads from the terminal; Claude and ChatGPT read from the browser. The same Hjarni notes serve all of them, so tools and humans stay aligned.

Setup

Connect Gemini CLI in about two minutes

  1. 1

    Sign up for Hjarni and install Gemini CLI.

  2. 2

    Open ~/.gemini/settings.json (or a project .gemini/settings.json) and add the mcpServers block above.

  3. 3

    Leave headers out to authorize via OAuth on first connection, or add an Authorization Bearer header with a Hjarni personal API token.

  4. 4

    Start Gemini CLI and run the /mcp command to confirm the hjarni server is connected.

  5. 5

    Ask the agent to list your Hjarni notes to verify it can read them.

Add Hjarni to mcpServers in ~/.gemini/settings.json

{
  "mcpServers": {
    "hjarni": {
      "httpUrl": "https://hjarni.com/mcp"
    }
  }
}

Add the block to ~/.gemini/settings.json (user scope) or a project .gemini/settings.json. Use httpUrl for the Streamable HTTP transport. With no headers, Gemini CLI runs the OAuth browser flow and stores the token for you. To use a token instead, add a headers entry with an Authorization Bearer value.

Why a terminal agent needs context that is not in the repo

Gemini CLI is strong once it has the facts. The problem is that most of the facts it needs are not in the working directory: why a decision was reversed, how a deploy actually runs, what broke last time. That context usually lives in someone's head or a scattered doc.

Hjarni is where you write it down once, as Markdown you own. Gemini CLI reads the relevant notes at the start of a run, so you stop pasting the same explanation into every session.

Gemini CLI supports remote MCP over Streamable HTTP with OAuth or header auth, so Hjarni is a short settings.json entry. The notes are model-agnostic, so they keep working across models and across your other AI clients.

Common questions

Questions before you connect Gemini CLI

Does Gemini CLI support remote MCP servers?

Yes. It supports remote MCP over Streamable HTTP (httpUrl) and SSE. Add Hjarni under mcpServers in settings.json.

Where does the config go?

In ~/.gemini/settings.json for user scope, or a project .gemini/settings.json. Use httpUrl for Hjarni's Streamable HTTP endpoint.

OAuth or API token?

Both. With no headers, Gemini CLI runs an OAuth browser flow and stores the token in ~/.gemini/mcp-oauth-tokens.json. Or add an Authorization Bearer header with a Hjarni personal API token.

How do I confirm the connection?

Run the /mcp command in Gemini CLI to see connected servers, then ask the agent to list your Hjarni notes.

Is it free?

Hjarni's free tier includes MCP access with no token limits, and Gemini CLI is open-source.

Give Gemini CLI a memory

The session starts where the last one ended. Write notes once. Gemini CLI reads them across every conversation.

Give your AI a memory

Write once. You both remember.

Free to start. No credit card required.

Works with Claude and ChatGPT today.