Supermemory
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SupermemoryRemember that this project uses npm and tests run with npm test"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
antigravity-supermemory
Persistent memory for Google Antigravity, powered by Supermemory. Inspired by opencode-supermemory. This is an independent integration, using Antigravity's native plugin, hook, skill, and MCP interfaces.
Features
Automatic recall: profile and recent project facts on the first model call; semantic project recall on each new substantive user prompt. Recall requests run concurrently with a three-second timeout each and no automatic retries.
Automatic capture: at an idle
Stop, save new user/assistant turns with stable document IDs and persistent checkpoints. Repeated hooks skip acknowledged saves.Memory tools: add, search, profile, list, and forget; plus read-only recall and session-context tools.
Remember requests: hooks and an always-on rule remind the agent to store the fact when you say “remember”, “save this”, or “don't forget”.
Codebase knowledge: a
supermemory-initskill explores and remembers build commands, architecture, and conventions.Privacy: remove
<private>...</private>regions, including nested and unclosed regions, before uploads and searches. Capture excludes tool output, reasoning, and recognized synthetic/system messages.Shared repository identity: the same canonical namespace and
sm_scopemetadata convention as current OpenCode Supermemory.
Related MCP server: engram
Install with npx
Requires Node.js 22+, npm, a Supermemory API key, and Antigravity. The package has not been published to npm yet. Use the local release tarball now:
npx --yes ./antigravity-supermemory-0.1.0.tgz install --workspace /absolute/path/to/your/projectFor all workspaces, replace --workspace /absolute/path/to/your/project with
--global. Then configure your API key and restart
Antigravity.
Once this package is published to npm, the equivalent short command will be:
npx --yes antigravity-supermemory@latest install --workspace /absolute/path/to/your/project
# Or: npx --yes antigravity-supermemory@latest install --globalInstallation copies a standalone runtime into the managed plugin directory. Antigravity can continue using it after npx's cache is cleared or the original checkout/tarball is removed. Node.js must remain at the installed executable path; rerun installation after changing your Node installation.
Install from this checkout
git clone https://github.com/andylin-hao/antigravity-supermemory.git
cd antigravity-supermemory
npm ci
npm run build
# Install for a project you open in Antigravity:
node dist/cli.js install --workspace /absolute/path/to/your/projectThis creates .agents/plugins/supermemory/ in the target project, with a manifest,
MCP configuration, hooks, rule, skill, and standalone runtime. Generated commands
use absolute paths to Node and the installed runtime, with no dependency on this
checkout's node_modules.
For all workspaces instead:
node dist/cli.js install --globalThis installs into ~/.gemini/config/plugins/supermemory/. Global MCP calls must
include an absolute workspace path; the bundled rule tells the agent to supply
it. Hooks use the single workspacePaths entry in Antigravity's payload. For
multi-root sessions, automatic hooks skip ambiguous workspaces; tools still work
with an explicit path. Choose one installation route per workspace to avoid
duplicate plugin components.
Configure the API key
Set SUPERMEMORY_API_KEY in the environment of the Antigravity process, or
create the global config file printed by:
npx --yes ./antigravity-supermemory-0.1.0.tgz config-pathDefault: ~/.config/antigravity-supermemory/config.jsonc
{
"apiKey": "sm_your_api_key"
}The global file is convenient for GUI launches that do not inherit terminal
environment variables. Keep it outside your repository and restrict its file
permissions (for example, chmod 600 on Unix).
Reload Antigravity's customizations/MCP servers or restart the application. Check the connection with:
npx --yes ./antigravity-supermemory-0.1.0.tgz status --workspace /absolute/path/to/your/projectThen ask Antigravity:
Remember that this project uses npm and tests run with npm test.
In another conversation:
What package manager and test command does this project use?
Supermemory processes uploads asynchronously; queued documents can take minutes to become searchable memories.
Older Antigravity IDE versions
If your IDE supports MCP but not native plugins/hooks, use:
node dist/cli.js install --legacy --workspace /absolute/path/to/your/projectThe installer merges a project-specific server into
~/.gemini/antigravity/mcp_config.json and adds .agent/rules/supermemory.md and
.agent/workflows/supermemory-init.md. Existing servers and JSONC comments are
preserved. If MCP Servers → View raw config shows another path, specify it:
node dist/cli.js install --legacy --workspace /absolute/path/to/project \
--mcp-config /absolute/path/to/mcp_config.jsonThis mode uses agent-driven recall and saving through the rule. It does not
automatically capture turns or inject context through hooks. Run
/supermemory-init to index project knowledge using the workflow.
Update and uninstall
To update, rerun the npx install command with the new release tarball (or
@latest after publication). From a checkout, run npm ci, npm run build, and
the same install command. Installation is repeatable and refuses to overwrite
locally modified managed files. Uninstall uses the same scope/mode flags:
npx --yes ./antigravity-supermemory-0.1.0.tgz uninstall --workspace /absolute/path/to/projectFrom the checkout:
node dist/cli.js uninstall --workspace /absolute/path/to/project
# Or: node dist/cli.js uninstall --global
# Or: node dist/cli.js uninstall --legacy --workspace /absolute/path/to/projectOnly unmodified managed files (including the runtime) and the matching legacy MCP entry are removed. Unrelated configuration, remote memories, API credentials, and capture checkpoints are retained. If a managed file was edited, reconcile it before rerunning.
Tools
Tool | Purpose |
|
|
| Read-only semantic search: |
| Read-only profile + recent project memories; optional |
All tools accept workspace: an absolute project directory. It is optional when
the server was started with --workspace (as in a workspace installation).
Antigravity may prefix tool names with the plugin/server name.
supermemory examples:
{"mode":"add","content":"Tests run with npm test","type":"project-config","scope":"project"}
{"mode":"search","query":"test command","scope":"project"}
{"mode":"profile"}
{"mode":"list","scope":"project","limit":10}
{"mode":"forget","memoryId":"mem_from_search_or_list","scope":"project"}Scopes: project is the default. user means personal facts within the
current repository, matching the current OpenCode plugin, not a global profile
shared across unrelated repositories.
Types: project-config, architecture, error-solution, preference,
learned-pattern, conversation.
IDs: add returns an ingested document ID. search and list return
extracted memory IDs. forget checks the memory's namespace and scope before
removing it from normal recall; it preserves Supermemory audit history and source
documents. This tool is not a permanent document-erasure API.
Configuration
All options are optional. Environment variables take precedence over JSONC.
{
"apiKey": "sm_...",
"baseUrl": "https://api.supermemory.ai",
"recallMode": "direct", // direct | advisory | off
"captureEnabled": true,
"injectProfile": true,
"maxMemories": 5,
"maxProfileItems": 5,
"similarityThreshold": 0.55,
"recallTimeoutMs": 3000,
"requestTimeoutMs": 8000,
"maxContextChars": 8000,
"isolateWorktrees": false,
// "projectContainerTag": "my_explicit_namespace",
// "stateDir": "/absolute/path/to/local/checkpoints"
}Environment variable | Purpose |
| API key |
| Override the global JSONC file path |
| API base URL |
| Explicit namespace override |
|
|
| Local checkpoint directory |
The client uses the official Supermemory v5 SDK, including ns/... routes.
Custom servers must implement that API. There is no legacy API fallback or
automatic rerouting to hosted Supermemory.
Scoping and compatibility
Default namespace: repo_<sanitized-repository-name>__<16-char-sha256>.
The hash uses normalized Git origin, or the repository's real path if there is
no origin. SSH and HTTPS origins share an identity; different remotes remain
isolated. Worktrees share the main repository unless isolation is enabled.
Metadata sm_scope is project or personal.
Current OpenCode memories using this convention are shared automatically when
both integrations use the same account/API endpoint. Custom namespaces require
the same explicit override. Historical opencode_project_*/opencode_user_*
containers and other agents' config overrides are not automatically discovered.
Hook behavior and limitations
PreInvocationreads the transcript path supplied by Antigravity and injects anephemeralMessage. Repeated model/tool-loop calls for the same user prompt do not repeat searches.offdisables hook recall, not explicit MCP tools.Stopacts as a turn boundary, not session shutdown. OnlyfullyIdle: truepermits capture. New turns are uploaded individually; raw tool output and thinking are not collected. Disable this withcaptureEnabled: false.Transcript extraction supports current
USER_INPUT/PLANNER_RESPONSEtext records and explicitrole/contentrecords. It reads only the supplied file, not private databases or other conversation directories. Unknown records and incomplete JSON lines are skipped; missing, oversized (>20 MiB), or changed transcript formats can prevent automatic recall/capture. MCP tools still work.Capture checkpoints contain hashes, not conversation text, under
~/.cache/antigravity-supermemory/. File leases protect simultaneous hooks; checkpoints advance after acknowledged uploads. Failed saves can retry on a later idle Stop. Stable IDs reduce duplication but do not guarantee exactly-once processing/billing after an ambiguous response. Removing checkpoints may replay old turns; changing transcript indices can change capture identity.Hook errors fail open, print sanitized diagnostics to stderr, and produce valid JSON. Capture has a bounded per-hook budget; a large backlog may require later Stop events. Pending captures cannot be flushed after Antigravity is killed.
Rules guide model behavior; they cannot guarantee that an explicit memory tool is called. There is no native compaction interception, browser OAuth flow, or OpenCode-style status footer in this release.
Development and verification
npm ci
npm run check
agy plugin validate plugin --strict --json
npm packTests exercise real SDK requests against a local mock HTTP service, a real stdio MCP client/server handshake using the installed standalone runtime, hook timeouts, capture retries/concurrency, privacy, repository scoping, and non-destructive installation/uninstallation. They need no API key and do not contact hosted Supermemory. Antigravity CLI 1.4.0's validator accepts the bundled plugin. Full IDE operation with a live Supermemory account requires a manual smoke test after configuration. The npx tarball install has also been verified with hooks and MCP still working after deleting the npx cache and the source tarball.
For portable native-plugin distribution, install this npm package globally from
an npm pack tarball and use agy plugin install /path/to/checkout/plugin.
The checked-in template invokes antigravity-supermemory on PATH; the recommended
CLI installer replaces these with absolute commands.
References: plugins, hooks, MCP, rules.
MIT licensed.
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent personal memory for AI assistants — save, search, and recall across every MCP client.
Cross-tool persistent memory and context for AI assistants over MCP.
Persistent AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
- mcpOAuthai.butlerbrain
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Related MCP Servers
- AlicenseAqualityDmaintenancePersistent memory for AI agents. Store, recall, and share knowledge across sessions with five MCP tools: remember, recall, context, forget, and share. Includes semantic search and agent/user/org scoping.53Apache 2.0
- AlicenseNot gradedqualityAmaintenanceProvides persistent, local-first AI memory across sessions via MCP tools for storing, searching, and retrieving context from past interactions.1MIT
- AlicenseNot gradedqualityBmaintenanceProvides long-term memory for AI agents via MCP tools to store, recall, and delete memories, with per-user scoping and usage limits.AGPL 3.0
- FlicenseNot gradedqualityCmaintenanceEnables AI coding agents and IDEs to capture conversations, extract structured knowledge into a queryable graph database, and recall past decisions, patterns, files, and errors across all projects and workspaces. Provides persistent memory tools for saving, searching, and cleaning up knowledge via MCP.2-