Skip to content

delight0517-art/gemini-conversation-archive

v0.1.0MIT

Search and read your Gemini Apps conversation data from a local Google Takeout export.

Gemini Conversation Archive

Local-first Codex plugin and MCP server for searching and reading Gemini Apps activity from a Google Takeout export.

What it does

  • Reads a Google Takeout ZIP, extracted Takeout folder, or MyActivity.json / MyActivity.html file.
  • Counts source activity records and conversation IDs; searches and returns records grouped by conversation ID.
  • Keeps data local. No Google sign-in, API key, cookies, network request, or cloud service is used by this plugin.
  • Uses Python 3 and the standard library only.

The tool returns only content present in the export. It does not restore omitted model replies, retrieve private conversations from a Google account, or guarantee that Takeout contains every conversation. Check the inspection result and compare it with Gemini before treating an export as complete.

Get the source archive

Google's official export flow is at Google Takeout. In Select data to include, choose Deselect all, select My Activity, open All activity data included, deselect all, and select Gemini Apps. The separately named Gemini entry exports Gems data. Select JSON or HTML for activity records, create the archive, and wait for Google to prepare it. Google says preparation can take hours or days.

The owner of the Google account must request and download the archive. The plugin never automates authentication or downloads it from Google.

Tools

  • inspect_takeout(archive_path) — source file list, activity record count, linked conversation count, and limitations.
  • search_conversations(archive_path, query, offset?, limit?) — local case-insensitive search with source record references and pagination.
  • read_conversation(archive_path, conversation_id, offset?, limit?) — exact imported JSON records or visible HTML text for one linked conversation, with pagination.

archive_path may be the ZIP itself, the extracted Takeout directory, or a single Gemini Apps MyActivity.json / .html file. Unlinked activity rows remain searchable but are reported as unlinked rather than being guessed into a conversation.

Install as a local Codex plugin

codex plugin marketplace add /absolute/path/to/gemini-conversation-archive
codex plugin add gemini-conversation-archive --marketplace gemini-archive-local

Restart or reload Codex after installation if the tools do not appear immediately.

Run the MCP server directly

python3 server.py

It speaks MCP JSON-RPC over standard input/output. Diagnostics go nowhere on stdout so the protocol stream stays clean.

Privacy and safety

  • Source archives are read in place and are not copied or uploaded.
  • ZIP entries are read without extracting files to disk.
  • The reader accepts only Gemini Apps MyActivity files and applies archive/member size limits.
  • Treat the returned conversation text as private user data. Do not add Takeout archives or extracted chats to Git.

License

MIT. See LICENSE.