gemini-mem
Persistent memory extension for Gemini CLI with local SQLite storage, hook-based recall/write, and optional MCP tools
Install / Use
claude mcp add djinn-soul -- npx -y github:djinn-soul/gemini-memIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Data & AnalyticsSupported Platforms
Our assessment of gemini-mem
gemini-mem scores 71/100 on our quality scale, 367th of 420 Data & Analytics skills we index.
Its MCP Server is 3.4 KB long, well organised into 11 sections with 7 code examples: a solid amount of guidance for an agent.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 6 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- Our last check on 2026-09-26 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 90/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-26. Automated pattern scan on 2026-09-26. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
gemini-mem compared with similar skills
All 4 of these similar skills score higher than gemini-mem; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| gemini-mem (this skill)by djinn-soul | 71 | 3 | 6mo ago | MCP Server |
| claude-memby thedotmack | 100 | 95.0k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 86.3k | 14d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.1k | today | CLAUDE.md |
| rufloby ruvnet | 100 | 73.6k | today | CLAUDE.md |
Frequently asked questions
- How do I install gemini-mem?
- Run
claude mcp add djinn-soul -- npx -y github:djinn-soul/gemini-mem. The install tabs above show the steps for each supported agent. - Which AI agents does gemini-mem work with?
- It is written for Claude Code, Claude Desktop and Gemini CLI, as a MCP Server file. Other agents that read the same format can often use it too.
- Is gemini-mem safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 90/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is gemini-mem still maintained?
- The repository was last updated about 6 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubGemini Memory Extension
Gemini CLI extension that saves and retrieves project memory from local SQLite, with MCP tools that share the same memory DB.
Official Gemini docs this README follows:
- Writing extensions: https://geminicli.com/docs/extensions/writing-extensions/
- Releasing extensions: https://geminicli.com/docs/extensions/releasing/
What You Get
- Hook-based memory capture (
AfterAgent) and retrieval (BeforeAgent,SessionStart) - Slash commands for memory inspection and cleanup
- Optional MCP server tools for external agents/clients
- Local per-project storage by default:
${HOME}/.gemini/gemini-mem/<repo-folder>/memory.db
Quick Start (Use This Extension)
npm install
npm run build
gemini extensions link .
gemini extensions list
Then restart Gemini CLI.
Daily Dev Loop
- Edit code.
- Rebuild:
npm run build - Test:
npm test - Restart Gemini CLI to pick up changes.
Project Layout
src/
hooks/ # SessionStart, BeforeAgent, AfterAgent
memory/ # sqlite store, schema, retrieval, dedupe, redaction
gemini/ # summarizer/reranker prompts + validators
commands/ # mem-status, mem-search, mem-last, mem-prune
mcp/ # stdio and HTTP MCP servers + tool handlers
runtime/ # process and Gemini CLI adapters
cli/ # db init/migration scripts
Slash Commands
/mem:status/mem:search <query>/mem:last [limit]/mem:prune [maxAgeDays] [importanceFloor]
Local equivalents:
npm run mem:status
npm run mem:status -- --json
npm run mem:search -- "query text"
npm run mem:last -- 5
npm run mem:last -- 5 --json
npm run mem:prune -- 30 2
MCP Tools
MCP is decoupled from hook runtime in this extension build. Hook execution does not require MCP server discovery.
memory_statusmemory_get_contextmemory_searchmemory_save_observationmemory_citememory_end_session
Run transports:
npm run mcp:server
npm run mcp:http
If you want Gemini CLI to auto-discover this MCP server, register it explicitly in your user/project Gemini MCP settings.
Default HTTP endpoint:
http://127.0.0.1:3303/mcp
Recommended MCP usage order:
memory_get_contextmemory_save_observationmemory_end_session
Config
Settings are defined in gemini-extension.json (DB path, model, limits, timeouts, project mode, command override).
Opt-in hook telemetry:
- Set
MEM_HOOK_TELEMETRY=true - Writes JSONL events and failures to
<project-db-folder>/hook.log(for example${HOME}/.gemini/gemini-mem/<repo>/hook.log)
Release Checklist (What To Do)
This repo already has workflows in .github/workflows/ and release notes in PUBLISHING.md.
- Update version in both files:
package.jsongemini-extension.json
- Validate locally:
npm run buildnpm test
- Commit and tag:
git tag vX.Y.Zgit push origin main --tags
- Let GitHub Actions create/publish the release artifacts.
- Install test from users' perspective:
gemini extensions install <repo-url>- or
gemini extensions install <repo-url> --ref=vX.Y.Z
For gallery discoverability (from official docs):
- Keep repository public.
- Add GitHub topic
gemini-cli-extension. - Keep
gemini-extension.jsonat repository root.
Verification Commands
npm run build
npm test
npm run test:hooks
npm run test:mcp
npm run test:mcp-http
Contributing
See CONTRIBUTING.md.
Related Skills
claude-mem
95.0kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
86.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.1kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ruflo
73.6k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
