Gemini Mem
БесплатноНе проверенPersistent memory extension for Gemini CLI with local SQLite storage, hook-based recall/write, and optional MCP tools
Описание
Persistent memory extension for Gemini CLI with local SQLite storage, hook-based recall/write, and optional MCP tools
README
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.
Установка Gemini Mem
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/djinn-soul/gemini-memFAQ
Gemini Mem MCP бесплатный?
Да, Gemini Mem MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Gemini Mem?
Нет, Gemini Mem работает без API-ключей и переменных окружения.
Gemini Mem — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Gemini Mem в Claude Desktop, Claude Code или Cursor?
Открой Gemini Mem на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
wenb1n-dev/SmartDB_MCP
A universal database MCP server supporting simultaneous connections to multiple databases. It provides tools for database operations, health analysis, SQL optim
автор: wenb1n-devPostgres Server
This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools
автор: madhurprashPostgres
Query your database in natural language
автор: AnthropicPostgreSQL
Read-only database access with schema inspection.
автор: modelcontextprotocolCompare Gemini Mem with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории data
