Unified Memory
Provides read-only access to OpenAI Codex CLI memory, including memory_summary.md, extensions, rollout summaries, skills, and v1 MEMORY.md, with path-jail protection.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Unified Memory for Antigravity
One unified memory layer for Antigravity Desktop & CLI — bridging Claude Code Auto Memory & Rules (Read-Write) with OpenAI Codex CLI Memory (Strictly Read-Only), plus a native MCP App dashboard.
At a Glance
Layer | Mode | Source | What It Brings to Antigravity |
Claude Auto Memory |
|
| Exact v2.1.x path slug & Git worktree mapping, nested |
|
| Managed → User → Ancestor → Project → Local | Multi-root workspaces, |
OpenAI Codex CLI Memory |
|
| Startup |
Desktop Dashboard |
| Left Sidebar & Side Pane | Native light/dark theme sync across 4 tabs: Overview, Claude Memory, Codex Memory (RO), and Rules & Context |
Related MCP server: Finch MCP
Quick Start
Pre-bundled, zero-dependency runtime bundles (dist/hook.cjs, dist/mcp.cjs, dist/app.html) are committed in this repo — installing requires only Node.js 20+ and zero compilation.
Option 1: Install from GitHub via Antigravity CLI (Recommended)
agy plugin install https://github.com/A-Cepheus/unified-memory-antigravityOption 2: Install from a Local Clone via CLI
git clone https://github.com/A-Cepheus/unified-memory-antigravity.git
agy plugin install ./unified-memory-antigravityOption 3: Manual / Dev Installation (Global or Workspace)
Global (all workspaces) — symlink or copy into
~/.gemini/config/plugins/:git clone https://github.com/A-Cepheus/unified-memory-antigravity.git ln -s "$(pwd)/unified-memory-antigravity" ~/.gemini/config/plugins/unified-memory-antigravityWorkspace-level (team sharing) — place the plugin directory under
<repo>/.agents/plugins/unified-memory-antigravity/.
Antigravity discovers the plugin automatically without restarting. Open Unified Memory from the left sidebar or the side pane + menu.
How It Works
flowchart LR
subgraph Storage["Local Memory & Rule Sources"]
CL["Claude Auto Memory\n~/.claude/projects/.../memory"]
CR["CLAUDE.md & .claude/rules/\nManaged / User / Workspace / Subdirs"]
CX["Codex CLI Memory\n~/.codex/memories_v2 & v1"]
end
subgraph Plugin["unified-memory-antigravity"]
HK["Hook Runner (dist/hook.cjs)\nSessionStart · PostToolUse · PreInvocation"]
MCP["MCP Server (dist/mcp.cjs)\n10 Model Tools + 10 App-Only UI Tools"]
UI["Native Desktop UI (dist/app.html)\nSidebar (global) & Side Pane (aux_pane)"]
end
CL <-->|"Read / Atomic Write"| MCP
CL -->|"Startup Snapshot"| HK
CR -->|"Always-On + Lazy paths:"| HK
CR -->|"Inspect"| MCP
CX -->|"Strictly Read-Only"| HK
CX -->|"Strictly Read-Only"| MCP
MCP <-->|"MCP App Bridge"| UIPrompt Cache & Session Discipline
Designed to keep multi-turn KV / prompt cache hit rates high:
Deterministic Startup Snapshot:
SessionStartsorts multi-rootworkspacePathsdeterministically and injects baseline memory/rules once per session (idempotent).Mid-Session Freeze: Aligned with Claude Code and Codex CLI, root
CLAUDE.md,MEMORY.md, and Codexmemory_summary.mdare never silently hot-reloaded mid-session — preventing unnecessary uncached token churn.Automatic
/compactReload: Detects context compaction and cleanly re-injects the refreshed baseline into the compacted trajectory.Append-Only Lazy Injection: Path-scoped
.claude/rules/and subdirectoryCLAUDE.mdfiles are appended once when matching files are touched, preserving prior prefix caching.
Features
1. Claude Code Auto Memory (Read-Write, v2.1.x Aligned)
Exact Project Slug & Worktree Resolution: Matches Claude Code's slug algorithm (
[^a-zA-Z0-9]→-, deterministic base36 hash suffix over 200 chars) and resolves linked Git worktrees back to the main repository root.Dual-Schema Frontmatter: Reads both legacy flat frontmatter and latest v2.1.x nested
metadata: { node_type: memory, type, originSessionId, modified }topic files; writes v2.1.x nested metadata cleanly.Concurrency & Budget Safety: Cross-process lockfile + atomic writes, automatic
MEMORY.mdindex sync, and strict 200-line / 25 KB startup truncation (whichever comes first).Native Settings Respect: Honors
CLAUDE_CONFIG_DIR,CLAUDE_CODE_DISABLE_AUTO_MEMORY,autoMemoryEnabled, andautoMemoryDirectory.
2. CLAUDE.md & .claude/rules/ (Claude Code Parity)
Full Scope Hierarchy: Loads
Managed → User → Ancestor → Project → CLAUDE.local.mdacross multi-root workspaces.Smart Parsing: Expands
@importup to 5 hops (with cycle detection and fenced code-block skipping), strips HTML comments outside code blocks, appliesclaudeMdExcludes, and deduplicates@AGENTS.mdimports already loaded natively by Antigravity.Two-Stage Lazy Loading:
PostToolUse(read_file|edit_file|write_file) queues matchingpaths:rules (**+{a,b}brace expansion) and subdirectoryCLAUDE.mdfiles;PreInvocationdelivers them on the next model turn.
3. OpenAI Codex CLI Memory (Strictly Read-Only)
v2 + v1 Compatibility: Prefers
~/.codex/memories_v2/with fallback to~/.codex/memories/, automatically stripping the leadingv1version header frommemory_summary.md.Cross-Session Retrieval: Browses and searches
memory_summary.md,extensions/ad_hoc/,rollout_summaries/,skills/, and chunked v1MEMORY.md.Zero Writes: Enforced path jail with no write paths into
~/.codex/.
4. Native Antigravity Desktop UI (MCP App)
Mounts natively in both the left sidebar (
global) and side pane+menu (aux_pane), automatically syncing light/dark host themes.4 Tabs:
Overview — Claude/Codex inventory, runtime config toggles, recent sessions, and live hook diagnostics.
Claude Memory — Visual
MEMORY.mdeditor and full topic CRUD (create, edit, filter by type, delete).Codex Memory (RO) — Read-only
memory_summary.mdpreview, directory browser, and full-text search.Rules & Context — Inspect active
CLAUDE.mdlayers,@importchains, conditionalpaths:rules, and deduplicatedAGENTS.md.
Tools, Skills & Rules
Model-Facing MCP Tools (10)
Tool | Access | Description |
| UI | Open the native Unified Memory dashboard (supports target tab / project path) |
| Read | Resolve project slug, Git worktree root, |
| Read | List Claude Auto Memory topic files and index status |
| Read | Read |
| Write | Atomically create/update a v2.1.x topic memory and sync |
| Write | Delete a topic memory and prune its entry from |
| Read | Inspect active |
| Read | Read Codex |
| Read | Search Codex rollouts, extensions, skills, and handbook (read-only) |
| Read | Read a single Codex memory file inside the allowed path jail (read-only) |
Ten additionalui_* tools power the embedded MCP App and are tagged visibility: ["app"], keeping them completely hidden from the model's tool context.
Bundled Skills & Standing Rules
memory-manage(skills/memory-manage/SKILL.md) — Interactive status, rule-loading diagnostics, and dashboard walkthrough (equivalent to Claude Code's/memory).memory-dream(skills/memory-dream/SKILL.md) — Consolidate, deduplicate, and prune stale Claude memories to keepMEMORY.mdhealthy under 200 lines / 25 KB.rules/AGENTS.md— Standing guidelines encoding Claude Code's 4-category memory discipline (user,feedback,project,reference) and read-only Codex rules.
Configuration
Settings are persisted at ~/.gemini/antigravity/plugin_data/unified-memory-antigravity/config.json (editable live in the Overview tab):
Key | Default | Description |
|
| Inject Codex |
|
| Maximum bytes injected from Codex |
|
| Also inject |
|
| Skip |
|
| Upper bound for combined |
Variable | Default | Purpose |
|
| Custom Claude Code configuration root |
| unset | Set |
|
| Custom Codex CLI home directory |
|
| Custom plugin config, session state, and diagnostics directory |
Project Structure & Development
unified-memory-antigravity/
├── plugin.json # Antigravity plugin manifest
├── hooks.json # SessionStart / PostToolUse (file tools) / PreInvocation
├── mcp_config.json # Stdio MCP server (${PLUGIN_ROOT}/dist/mcp.cjs)
├── assets/logo.svg # Plugin vector logo
├── rules/AGENTS.md # Standing memory hygiene guidelines
├── skills/
│ ├── memory-manage/ # Interactive status & rule inspection skill
│ └── memory-dream/ # Consolidation & pruning skill
├── src/
│ ├── core/ # Host-agnostic engine (Claude memory/rules, Codex RO, session state)
│ ├── hook/ # Antigravity hook runner
│ ├── mcp/ # Stdio MCP server + MCP App resource & app-only endpoints
│ └── ui/ # React + @modelcontextprotocol/ext-apps single-file Desktop UI
├── tests/ # Core unit tests & bundled dist/ E2E tests
└── dist/ # Pre-bundled zero-dependency runtime artifacts
├── hook.cjs
├── mcp.cjs
└── app.htmlnpm install
npm run typecheck
npm run build
npm test100% Local: All reading, writing, and indexing happen locally on your filesystem — zero telemetry, zero external network calls.
Contributions and issue reports are welcome.
Disclaimer & License
Independent Community Project:
unified-memory-antigravityis an independent open-source project and is not affiliated with, endorsed by, or sponsored by Google, Anthropic, or OpenAI. All product names and trademarks belong to their respective owners.Local Plaintext Interoperability Only: This plugin operates exclusively on local plaintext Markdown memory and rule files (
~/.claude/projects/*/memory/,CLAUDE.md,.claude/rules/, and read-only~/.codex/memories*). It never reads or reuses authentication credentials, API keys, OAuth tokens, or private cloud endpoints.Cross-Model Data Flow Notice: Local memories injected into an Antigravity conversation become part of the prompt sent to your active Antigravity model provider. If you operate under enterprise data-boundary or DPA policies, verify that sharing local Claude/Codex notes across tools complies with your organization's rules (you can disable Codex startup injection via
injectCodexSummaryOnStart: falseor Claude Auto Memory viaCLAUDE_CODE_DISABLE_AUTO_MEMORY=1).License: Released under the MIT License.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared memory and context across ChatGPT, Claude, Claude Code, Codex, Cursor and 20+ AI tools
Private memory for AI agents: save and recall facts across Claude Code, Codex, Cursor and ChatGPT.
Persistent cross-session memory shared by Codex, Claude Code, ChatGPT, and other AI agents.
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Related MCP Servers
- AlicenseAqualityBmaintenancePersistent, shared memory for Claude across sessions and clients (Code, Desktop, Cowork) — deterministic diff reads, checkpoints, cross-client task handoff, and project-wide search. 100% local and deterministic, no API keys, no LLM summarization.6353 PyPI4MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to retain persistent, searchable memory and versioned vaults, spawn and recall named agents with state and audit history, run automations, monitors, and deep research, and execute on-chain and web tasks across sessions. It can be installed alongside Claude Code, Cursor, Windsurf, Zed, Hermes, and other MCP clients, with vault and memory optionally run entirely on the user's machine.45235 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables Claude Code, Cursor, and Codex sessions to persist decisions, rules, bugs, to-dos, and failed approaches in a repository file and automatically recall relevant saved context in later sessions. It also checks planned commands or edits against those saved rules before they run.217 npmMIT
- AlicenseAqualityCmaintenanceEnables AI coding assistants to share persistent local memory across sessions and agents, so rules, mandatory specs, verified code snippets, and past mistakes are automatically surfaced before code is generated. It also lets agents log repeated failures as recurrence-counted 'vaccines', preventing the same errors from recurring across Claude, VS Code agents, and local LLMs.72MIT