Skip to Content
GuidesGemini CLI

Gemini CLI Integration Guide

Give Google’s Gemini CLI  persistent memory across sessions using Engram.

Setup

1. Add the MCP server

Edit ~/.gemini/settings.json and add:

{ "mcpServers": { "engram": { "httpUrl": "https://mcp.getengram.app/mcp", "oauth": { "enabled": true } } } }

Important: the key must be httpUrl, not url. In Gemini CLI, url means an SSE transport and will not connect to Engram’s streamable-HTTP endpoint.

On first use, Gemini CLI opens Engram’s OAuth sign-in in your browser — no API key needed.

Prefer an API key? Sign up at getengram.app , create a key, drop the oauth block, and add headers:

{ "mcpServers": { "engram": { "httpUrl": "https://mcp.getengram.app/mcp", "headers": { "Authorization": "Bearer engram_sk_live_your_key_here" } } } }

2. Verify

Run gemini and use /mcp to list connected servers — Engram should show its memory tools (search, append_messages, memory_status). Then ask it to search your memory.

Using memory in Gemini CLI

  • “Remember this decision” — stores the exchange verbatim
  • “What do we know about the deploy pipeline?” — semantic search over everything you’ve stored
  • Memory is shared across every connected tool: research saved from ChatGPT or Claude is recallable here, and vice versa.

Add standing instructions in GEMINI.md (Gemini CLI’s project-instructions file) to have the agent search Engram at task start and save decisions as it works — see the Claude Code guide for the instruction pattern; it translates directly.

Last updated on