total-recall in Gemini CLI¶
Status¶
- MCP support: yes (stdio transport, via
~/.gemini/settings.jsonorgemini mcp add) - Hook support: no
- Session storage:
~/.gemini/tmp/<sessionId>/logs.json(replay-style) - Adapter complexity: ~580 LOC (replay reconstruction + tool-call translation)
Install the MCP server¶
- Install total-recall so
python -m total_recall.mcp_serverworks:
pip install total-recall
- Either drop this into
~/.gemini/settings.json:
{"mcpServers":{"total-recall":{"command":"python","args":["-m","total_recall.mcp_server"],"timeout":30000,"trust":false}}}
β¦or use the CLI helper:
gemini mcp add -s user total-recall python -m total_recall.mcp_server
- Restart Gemini CLI (the MCP registry is read at startup).
- Verify:
gemini mcp listshould showtotal-recall.
What you get¶
- 26 MCP tools (recall, get_operator_context, check_banned, ...).
- No hook integration β Gemini CLI has no hook surface yet.
Session ingest¶
total-recall autodetects Gemini CLI sessions by walking ~/.gemini/tmp/<sessionId>/logs.json and replaying the event log into canonical records. Verify:
total-recall sources test gemini_cli
Caveats¶
trust: falsekeeps the server sandboxed β recommended. Settrueonly if you understand the security implications.- The replay layer reconstructs message/part order from event timestamps; sessions with clock skew may end up with slightly out-of-order assistant turns.
- Function-call and function-response events are translated into
tool_use/tool_resultblocks so downstream extractors don't need a special case for Gemini.