Gives Claude and other AI agents a persistent, user-owned memory layer over remote MCP. The CLI handles OAuth login via xmemo.dev, writes config for Codex, Cursor, Copilot, Gemini, and Antigravity without embedding tokens, and optionally installs behavior profiles that nudge agents to search memory before starting work and save context after decisions. Uses streamable HTTP transport with stable agent instance IDs and zero telemetry. Reach for this when you want conversation history and project context to survive across sessions and tools without scattering state into each editor's isolated storage. The token flow supports both device login and manual credential injection.
Public tool metadata for what this MCP can expose to an agent.
get_mcp_identityCheck XMemo connection status and the connected account/agent. Call this when the user asks whether XMemo is connected.Check XMemo connection status and the connected account/agent. Call this when the user asks whether XMemo is connected.
No parameter schema in public metadata yet.
store_memoryLow-level memory write with full field control. Use only when a caller needs explicit field-level control; for normal conversational capture use remember.17 paramsLow-level memory write with full field control. Use only when a caller needs explicit field-level control; for normal conversational capture use remember.
pathstringscopestringbucketstringcontentstringteam_idstringagent_idstringdevice_idstringconfidencenumberexpires_atstringimportancenumbermemory_typestringdevice_labelstringsemantic_keystringmetadata_jsonstringembedding_jsonstringprovenance_jsonstringagent_instance_idstringrememberSave a memory so it can be recalled in future conversations. Call this whenever the user states a durable fact, preference, instruction, identity or profile detail, project detail, or recurring workflow likely useful later — you do not need an explicit 'remember this'. Skip tr...19 paramsSave a memory so it can be recalled in future conversations. Call this whenever the user states a durable fact, preference, instruction, identity or profile detail, project detail, or recurring workflow likely useful later — you do not need an explicit 'remember this'. Skip tr...
pathstringscopestringbucketstringdedupebooleancontentstringteam_idstringagent_idstringdevice_idstringmemory_idstringconfidencevalueexpires_atstringimportancevaluememory_typestringdevice_labelstringsemantic_keystringmetadata_jsonstringembedding_jsonstringprovenance_jsonstringagent_instance_idstringadd_expenseRecord one expense in the XMemo Ledger. Call this whenever the user states a concrete expense, purchase, income, or refund — for example, 'I spent 25 on lunch' or 'log this expense' — not only on an explicit 'record this'. Capture date, amount, currency, item, and merchant/cat...16 paramsRecord one expense in the XMemo Ledger. Call this whenever the user states a concrete expense, purchase, income, or refund — for example, 'I spent 25 on lunch' or 'log this expense' — not only on an explicit 'record this'. Capture date, amount, currency, item, and merchant/cat...
itemstringnotestringpathstringscopestringamountnumberbucketstringteam_idstringagent_idstringcategorystringcurrencystringmerchantstringdevice_idstringdevice_labelstringpayment_methodstringtransaction_datestringagent_instance_idstringupdate_stateSave the current working state during long-running work — active task, next action, or blocker — so future turns/sessions can resume. For durable user facts use remember.9 paramsSave the current working state during long-running work — active task, next action, or blocker — so future turns/sessions can resume. For durable user facts use remember.
scopestringbucketstringcontentstringstate_keystringnext_actionstringttl_secondsintegercurrent_taskstringmetadata_jsonstringblocked_reasonstringsearch_memorySearch XMemo memories by natural-language query. Call this when the user asks about saved or past information, AND proactively before answering any question where prior preferences, facts, projects, decisions, or history could change the answer. To delete a memory, use forget.10 paramsSearch XMemo memories by natural-language query. Call this when the user asks about saved or past information, AND proactively before answering any question where prior preferences, facts, projects, decisions, or history could change the answer. To delete a memory, use forget.
limitintegerquerystringscopestringexplainbooleanteam_idstringagent_idstringmemory_typestringpath_filterstringprefer_workingbooleanagent_instance_idstringrecall_planPlan which memory searches to run before retrieval. Use only for complex tasks; for ordinary answers call recall_context or recall directly.8 paramsPlan which memory searches to run before retrieval. Use only for complex tasks; for ordinary answers call recall_context or recall directly.
querystringscopestringbucketstringteam_idstringmemory_typestringoutput_jsonbooleanpath_filterstringprefer_workingbooleanrecall_contextBuild a context pack from XMemo memories. Call this before answering or planning when the task could benefit from multiple saved memories — preferences, prior conversations, projects, decisions, TODOs, or long-running work.13 paramsBuild a context pack from XMemo memories. Call this before answering or planning when the task could benefit from multiple saved memories — preferences, prior conversations, projects, decisions, TODOs, or long-running work.
limitintegerquerystringscopestringbucketstringteam_idstringagent_idstringmax_itemsintegermax_tokensintegermemory_typestringoutput_jsonbooleanpath_filterstringprefer_workingbooleanagent_instance_idstringlist_ledger_transactionsShow XMemo Ledger records. Call this when the user asks about past expenses, purchases, or spending history, or before answering a finance question that depends on recorded transactions. For item searches use query and leave currency blank unless a currency was requested.13 paramsShow XMemo Ledger records. Call this when the user asks about past expenses, purchases, or spending history, or before answering a finance question that depends on recorded transactions. For item searches use query and leave currency blank unless a currency was requested.
limitintegerquerystringscopestringbucketstringoffsetintegerdate_tostringcategorystringcurrencystringdate_fromstringmax_amountvaluemin_amountvalueoutput_jsonbooleantransaction_typestringget_monthly_ledger_summarySummarize Ledger totals by month and currency. Call this when the user asks for monthly spending, income, refunds, net balance, budget review, or spending trends.6 paramsSummarize Ledger totals by month and currency. Call this when the user asks for monthly spending, income, refunds, net balance, budget review, or spending trends.
scopestringbucketstringmonthsintegercurrencystringoutput_jsonbooleantransaction_typestringmark_memory_usedRecord that a recalled memory was used in the answer. Call this after a retrieved memory actually influenced your response (not for ignored results).5 paramsRecord that a recalled memory was used in the answer. Call this after a retrieved memory actually influenced your response (not for ignored results).
actionstringcontextstringmemory_idstringmetadata_jsonstringusage_tracking_idstringrecord_recall_eval_judgmentEvaluation only — record whether a returned memory was relevant for a query. Do not use in normal conversation.7 paramsEvaluation only — record whether a returned memory was relevant for a query. Do not use in normal conversation.
querystringreasonstringpositionintegerrelevantbooleanmemory_idstringmetadata_jsonstringexpected_relevant_totalintegerrun_recall_evalAdmin/evaluation only — aggregate stored recall judgments and optionally tune retrieval. Not for normal conversation.3 paramsAdmin/evaluation only — aggregate stored recall judgments and optionally tune retrieval. Not for normal conversation.
sincestringuntilstringauto_tunebooleanrecord_recall_feedbackRecord recall corrections. Call this when the user says relevant context was missing or wrong, or supplies memories that should have been found.7 paramsRecord recall corrections. Call this when the user says relevant context was missing or wrong, or supplies memories that should have been found.
notesstringquerystringmetadata_jsonstringmissing_ids_jsonstringreturned_ids_jsonstringcorrected_ids_jsonstringmissing_memories_jsonstringget_recall_policyInspect XMemo retrieval policy (debug/admin). For actual recall use recall_context/recall/search_memory.Inspect XMemo retrieval policy (debug/admin). For actual recall use recall_context/recall/search_memory.
No parameter schema in public metadata yet.
get_safety_policyShow the account safety policy. Useful before custom memory-writing that may include sensitive content; normal writes are already sanitized server-side.Show the account safety policy. Useful before custom memory-writing that may include sensitive content; normal writes are already sanitized server-side.
No parameter schema in public metadata yet.
query_audit_eventsAdvanced audit query by action/time/target. For normal users prefer memory_activity.8 paramsAdvanced audit query by action/time/target. For normal users prefer memory_activity.
limitintegerscopestringsincestringuntilstringactionstringbucketstringoffsetintegertarget_idstringquery_consolidation_auditInspect consolidation/lifecycle/reflection audit records (admin). Not for normal recall/save.7 paramsInspect consolidation/lifecycle/reflection audit records (admin). Not for normal recall/save.
limitintegerscopestringsincestringuntilstringbucketstringoffsetintegeraction_typestringrecord_eventRecord a significant session event, milestone, decision, or handoff note useful for reconstructing recent work. Not for durable facts/preferences (use remember).6 paramsRecord a significant session event, milestone, decision, or handoff note useful for reconstructing recent work. Not for durable facts/preferences (use remember).
scopestringbucketstringcontentstringevent_typestringsession_idstringmetadata_jsonstringget_timelineShow recent events. Call this when the user asks what happened recently or when resuming work that may depend on recent events.5 paramsShow recent events. Call this when the user asks what happened recently or when resuming work that may depend on recent events.
limitintegerscopestringbucketstringevent_typestringsession_idstringcreate_reminderCreate a TODO item. Alias for create_memory_todo.5 paramsCreate a TODO item. Alias for create_memory_todo.
scopestringbucketstringdue_atstringcontentstringmetadata_jsonstringlist_remindersList TODO items. Alias for list_memory_todos.5 paramsList TODO items. Alias for list_memory_todos.
limitintegerscopestringbucketstringdue_beforestringitem_statusstringcomplete_reminderComplete a TODO item. Alias for complete_memory_todo.2 paramsComplete a TODO item. Alias for complete_memory_todo.
notestringreminder_idstringcreate_memory_todoCreate a TODO/action item in XMemo with an optional due time. Call this when the user asks to save a task, follow-up, action item, or reminder-style item to revisit later.5 paramsCreate a TODO/action item in XMemo with an optional due time. Call this when the user asks to save a task, follow-up, action item, or reminder-style item to revisit later.
scopestringbucketstringdue_atstringcontentstringmetadata_jsonstringlist_memory_todosList open or completed TODO/action items. Call this when the user asks what tasks, follow-ups, or saved action items are pending or done.5 paramsList open or completed TODO/action items. Call this when the user asks what tasks, follow-ups, or saved action items are pending or done.
limitintegerscopestringbucketstringdue_beforestringitem_statusstringcomplete_memory_todoMark a TODO/action item completed. Call this when the user says a saved task is done, resolved, or no longer needed; use the exact reference from list_memory_todos.2 paramsMark a TODO/action item completed. Call this when the user says a saved task is done, resolved, or no longer needed; use the exact reference from list_memory_todos.
notestringtodo_idstringcreate_pending_decisionRecord an unresolved decision with its options to revisit later. Use for open choices, not ordinary TODOs.6 paramsRecord an unresolved decision with its options to revisit later. Use for open choices, not ordinary TODOs.
scopestringbucketstringdue_atstringcontextstringoptions_jsonstringmetadata_jsonstringlist_pending_decisionsList open/unresolved decisions. Call this when the user asks what decisions are pending, or before planning work that depends on unresolved choices.5 paramsList open/unresolved decisions. Call this when the user asks what decisions are pending, or before planning work that depends on unresolved choices.
limitintegerscopestringbucketstringdue_beforestringitem_statusstringresolve_decisionRecord the chosen option for a previously saved pending decision. Call this when the user states their decision.2 paramsRecord the chosen option for a previously saved pending decision. Call this when the user states their decision.
resolutionstringdecision_idstringcreate_restart_snapshotSave active state, recent events, TODOs, and pending decisions for restart. Call this before handoff or when context may be lost.9 paramsSave active state, recent events, TODOs, and pending decisions for restart. Call this before handoff or when context may be lost.
scopestringbucketstringstate_keystringsession_idstringttl_secondsintegermetadata_jsonstringdecision_limitintegerreminder_limitintegertimeline_limitintegerrestore_restart_snapshotResume previous work from a saved snapshot. Call this when the user asks to resume/restart or after context loss.9 paramsResume previous work from a saved snapshot. Call this when the user asks to resume/restart or after context loss.
scopestringbucketstringstate_keystringsnapshot_idstringttl_secondsintegerrestore_statebooleansource_session_idstringtarget_session_idstringrecord_restore_eventbooleanrecallRecall the few most relevant saved memories before answering, when prior preferences, known facts, past decisions, or project context may directly affect the response. Use recall_context when many memories are needed.8 paramsRecall the few most relevant saved memories before answering, when prior preferences, known facts, past decisions, or project context may directly affect the response. Use recall_context when many memories are needed.
limitintegerquerystringexplainbooleanagent_idstringmemory_typestringpath_filterstringprefer_workingbooleanagent_instance_idstringupdate_memoryUpdate the content, location, or type of an existing memory. Call this only when the user explicitly asks to correct, revise, move, or reclassify a specific saved memory.18 paramsUpdate the content, location, or type of an existing memory. Call this only when the user explicitly asks to correct, revise, move, or reclassify a specific saved memory.
pathstringscopestringbucketstringstatusstringcontentstringteam_idstringmemory_idstringconfidencevalueexpires_atstringimportancevaluememory_typestringsemantic_keystringmetadata_jsonstringmerge_metadatabooleanprovenance_jsonstringdetect_conflictsbooleanmerge_provenancebooleansupersession_reasonstringforget_memoryDelete a memory (recoverable) by exact reference, when the user explicitly asks to remove or hide it. Use forget or delete_current_memory for permanent deletion.5 paramsDelete a memory (recoverable) by exact reference, when the user explicitly asks to remove or hide it. Use forget or delete_current_memory for permanent deletion.
modestringreasonstringmemory_idstringmetadata_jsonstringreplacement_contentstringforgetPermanently delete one memory by natural target ('latest', 'current', or an exact ID). Call this only when the user explicitly asks to forget/delete a specific memory; search or check activity first if the target is ambiguous.2 paramsPermanently delete one memory by natural target ('latest', 'current', or an exact ID). Call this only when the user explicitly asks to forget/delete a specific memory; search or check activity first if the target is ambiguous.
reasonstringtargetstringdelete_current_memoryPermanently delete the single active memory (no ID needed). Call this only when exactly one memory exists and the user explicitly asks to delete it; refused if zero or multiple match.1 paramsPermanently delete the single active memory (no ID needed). Call this only when exactly one memory exists and the user explicitly asks to delete it; refused if zero or multiple match.
reasonstringmemory_overviewShow a summary of XMemo memories and recent activity. Call this when the user asks what XMemo remembers without a specific query.Show a summary of XMemo memories and recent activity. Call this when the user asks what XMemo remembers without a specific query.
No parameter schema in public metadata yet.
memory_statsShow aggregate statistics for XMemo memories — counts by type, source, location, and optional time range. Call this when the user asks for counts, breakdowns, or distributions.8 paramsShow aggregate statistics for XMemo memories — counts by type, source, location, and optional time range. Call this when the user asks for counts, breakdowns, or distributions.
scopestringsincestringtop_nintegeruntilstringgroup_bystringmemory_typestringoutput_jsonbooleanpath_filterstringmemory_activityShow recent memory activity — writes, deletions, TODO changes, ledger changes, and timeline events. Call this when the user asks what changed recently, or before deleting 'latest/recent' memory so the user can confirm the preview.6 paramsShow recent memory activity — writes, deletions, TODO changes, ledger changes, and timeline events. Call this when the user asks what changed recently, or before deleting 'latest/recent' memory so the user can confirm the preview.
limitintegersincestringuntilstringoutput_jsonbooleanactivity_typestringinclude_timelinebooleananalyze_memory_textCount a word or phrase across XMemo memories, optionally grouped by month, agent, location, or type. Call this when the user asks how often a word/topic appears.12 paramsCount a word or phrase across XMemo memories, optionally grouped by month, agent, location, or type. Call this when the user asks how often a word/topic appears.
scopestringsincestringuntilstringphrasestringgroup_bystringmatch_modestringmemory_typestringoutput_jsonbooleanpath_filterstringmax_examplesintegermax_memoriesintegerinclude_examplesbooleanrestore_memoryRestore a previously deleted memory. Call this only when the user explicitly asks to restore or undo a deletion.3 paramsRestore a previously deleted memory. Call this only when the user explicitly asks to restore or undo a deletion.
reasonstringmemory_idstringmetadata_jsonstringredact_memoryRedact sensitive content from a memory while keeping an audit trail. Call this only when the user explicitly asks to redact.4 paramsRedact sensitive content from a memory while keeping an audit trail. Call this only when the user explicitly asks to redact.
reasonstringmemory_idstringmetadata_jsonstringreplacement_contentstringexplain_memoryExplain why a memory exists or matched a query. Call this when the user asks why something was saved or why it was retrieved.4 paramsExplain why a memory exists or matched a query. Call this when the user asks why something was saved or why it was retrieved.
querystringmemory_idstringoutput_jsonbooleaninclude_embeddingbooleanlist_memory_versionsShow version history for a memory. Call this when the user asks for previous content or changes over time.2 paramsShow version history for a memory. Call this when the user asks for previous content or changes over time.
memory_idstringoutput_jsonbooleanlist_memory_conflictsList conflicting/inconsistent memories. Call this when the user/admin asks to review unresolved conflicts.3 paramsList conflicting/inconsistent memories. Call this when the user/admin asks to review unresolved conflicts.
limitintegeroutput_jsonbooleanunresolved_onlybooleanresolve_memory_conflictResolve a listed memory conflict. Call this only when the user/admin explicitly chooses a resolution strategy.5 paramsResolve a listed memory conflict. Call this only when the user/admin explicitly chooses a resolution strategy.
conflict_idstringmerge_contentstringmetadata_jsonstringwinning_memory_idstringresolution_strategystringrun_lifecycleMaintenance tool. Use only when the user/admin explicitly asks to expire, archive, decay, or dry-run lifecycle processing.8 paramsMaintenance tool. Use only when the user/admin explicitly asks to expire, archive, decay, or dry-run lifecycle processing.
decaybooleanlimitintegerscopestringbucketstringexpirebooleanarchivebooleandry_runbooleanteam_idstringreflectMaintenance tool. Use only when the user/admin asks to summarize, promote, expire, decay, or archive via reflection. Prefer dry_run unless changes are explicitly requested.11 paramsMaintenance tool. Use only when the user/admin asks to summarize, promote, expire, decay, or archive via reflection. Prefer dry_run unless changes are explicitly requested.
limitintegerscopevaluesincevalueuntilvaluebucketstringdry_runbooleanteam_idstringactions_csvstringpath_filterstringowner_filtervaluetime_window_hoursnumberget_system_statsDetailed memory stats with filters and grouping. For a quick summary use memory_overview or memory_stats.11 paramsDetailed memory stats with filters and grouping. For a quick summary use memory_overview or memory_stats.
scopestringsincestringtop_nintegeruntilstringsourcestringstatusstringteam_idstringgroup_bystringmemory_typestringoutput_jsonbooleanpath_filterstring@xmemo/client is the privacy-first command line entry point for XMemo client
setup. It is intentionally small: the npm package contains only the CLI and
setup helper code needed on a user's machine.
@yonro/xmemo-client is reserved as a Yonro fallback package. The CLI exposes
xmemo as the primary command and keeps memory-os as a compatibility alias.
The XMemo server, database, token registry, deployment files, logs, and internal scripts are not part of this npm package.
🧠 XMemo is also an MCP Server — give your AI agents persistent memory across sessions. See MCP Setup below.
XMemo is a user-owned, hosted MCP memory service that lets AI agents persistently store, search, recall, update, and manage notes and memory fragments across sessions, projects, and tools.
https://xmemo.dev/mcp (Streamable HTTP)XMEMO_KEY) or MCP OAuthremember, recall, search_memory, update_memory, forget, redact_memory, explain_memory, create_memory_todo, list_memory_todos, complete_memory_todo, record_event, get_timeline, add_expense{
"mcpServers": {
"XMemo": {
"type": "streamable-http",
"url": "https://xmemo.dev/mcp",
"headers": {
"Authorization": "Bearer ${XMEMO_KEY}"
}
}
}
}
See MCP Setup for detailed client configuration.
npm install -g @xmemo/client
Upgrade an existing global install:
xmemo update
This runs npm install -g @xmemo/client@latest. Use xmemo update --dry-run
to print the exact command without changing anything.
xmemo update
xmemo setup codex
xmemo setup codex --dry-run
xmemo setup cursor
xmemo setup cursor --dry-run
xmemo setup copilot
xmemo setup copilot --dry-run
xmemo setup gemini
xmemo setup gemini --dry-run
xmemo setup antigravity
xmemo setup antigravity --dry-run
xmemo setup kiro
xmemo setup kiro --dry-run
xmemo setup grok
xmemo setup grok --dry-run
xmemo mcp add antigravity2
xmemo mcp add antigravity2 --write
xmemo doctor
xmemo discovery show
xmemo setup
xmemo login
xmemo auth status
xmemo status
xmemo token status
xmemo token add --from-stdin
xmemo env example --shell bash
xmemo mcp list
xmemo mcp config --client generic
xmemo mcp config --client antigravity
xmemo mcp add antigravity --write
xmemo profile status codex
xmemo profile install gemini
xmemo profile install antigravity
xmemo smoke --client codex
xmemo privacy
xmemo doctor, xmemo discovery show, and xmemo status do not send tokens.XMEMO_KEY or uses the client's
MCP OAuth flow; it does not write token values into project files.XMEMO_AGENT_INSTANCE_ID per device
and stores it in user-scoped config outside git. All agents on the same device
share this instance ID.xmemo setup <client> can install a marker-scoped XMemo memory behavior
profile for the selected agent. The profile contains instructions only; it
never embeds token values.xmemo login stores the issued credential in the user-scoped XMemo CLI
config directory, shows the approved account when the server provides it,
and does not require extra token configuration afterward.xmemo token add remains available for existing tokens and still avoids
project files, shell history, and printed token values.xmemo token set refuses plaintext credential storage unless
--allow-plaintext is explicitly provided.files whitelist so only bin, src, README.md,
and LICENSE are published.Recommended personal-user flow:
xmemo login
xmemo auth status
xmemo token status --verify
xmemo login uses the hosted device-login flow when the service advertises it:
the CLI shows a browser URL and one-time code, the user authorizes in XMemo, and
the CLI stores the issued MCP token in the user-scoped credential file. When the
service returns approved account metadata, the CLI prints the account label so
users can confirm which XMemo account was connected. No manual token setup is
needed after a successful xmemo login; xmemo token status --verify is only
an optional connectivity check. The CLI waits for the full browser authorization
window by default; use --timeout-ms only to shorten or extend that approval
window, and --http-timeout-ms only for individual service requests.
Users who already have a token can configure it directly without shell profiles:
printf '%s\n' 'your-token' | xmemo token add --from-stdin
xmemo token status --verify
This is the preferred fallback while a hosted service is rolling out device login. It still avoids project files, MCP config files, logs, and chat transcripts.
Tokens should be created by the XMemo website or enterprise console, then
stored with xmemo login, xmemo token add, a user environment variable, or an
enterprise secret manager:
export XMEMO_KEY="your-token"
PowerShell:
[Environment]::SetEnvironmentVariable("XMEMO_KEY", "your-token", "User")
Do not commit tokens to source control, MCP config files, .env files, logs, or
chat transcripts.
Hosted setup uses the XMemo public discovery contracts. The CLI reads secret-free discovery and onboarding status documents, then tells the user where the API, MCP endpoint, docs, and any server-advertised onboarding links are.
xmemo doctor
xmemo discovery show
xmemo setup
Discovery requests do not send XMEMO_KEY or any Authorization
header. Token creation still happens in the website or enterprise console; the
public service discovery document does not return token values.
The hosted default service/base URL is https://xmemo.dev, so normal users do
not need to type a service address. The MCP endpoint is discovered from that
base URL and written as https://xmemo.dev/mcp; https://mcp.xmemo.dev is not
the current canonical setup URL. Use --url <service-url> or XMEMO_URL only
for private, enterprise, or self-hosted deployments. MEMORY_OS_URL remains
accepted as a compatibility alias.
Generate and write a client config from discovery:
xmemo setup codex
xmemo setup codex --url "https://your-private-service.example"
xmemo setup cursor
xmemo setup copilot
xmemo setup gemini
xmemo setup antigravity
xmemo setup <client> is the unified setup entry point. For write-capable
clients, it applies the user-scoped config directly; use --dry-run to preview
without writing. Codex/Cursor configs reference XMEMO_KEY; OAuth-native
clients such as Gemini CLI and Antigravity use the client's MCP OAuth flow
instead. No generated config embeds a token value. Write-capable client configs
also include stable non-secret agent identity headers where the client format
supports them. --yes remains accepted for Codex and Cursor as a compatibility
no-op.
After writing MCP config, xmemo setup <client> prompts:
Write XMemo memory behavior profile to <path>? [Y/n]
The default is Y, so pressing Enter writes a marker-scoped profile that nudges
the agent to recall/search XMemo at the start of non-trivial work and remember
high-signal decisions after meaningful changes. Use n or --no-profile to
configure MCP only. Use --dry-run to preview without writing config or profile
files, and --profile-target <path> to choose a different behavior profile
target.
Remove the XMemo MCP server entry from one or all detected client configs:
xmemo uninstall --all --dry-run
xmemo uninstall --all --yes
xmemo uninstall cursor --yes
xmemo uninstall --all --yes --profiles
xmemo uninstall --all scans the same clients as setup --all and removes only
the XMemo entry (and legacy names such as memory_os) from each detected
config file. Other MCP servers are preserved. By default it shows a summary and
asks for confirmation; pass --yes (or -y) to skip the prompt, or --dry-run
to preview without modifying files.
Pass --profiles to also remove installed behavior profiles (Codex AGENTS.md,
Cursor memory profile, etc.). Identity files and credentials are not removed, so
a later xmemo setup --all can re-enable XMemo with the same agent instance ID.
Default behavior profile targets:
codex ./AGENTS.md
cursor ~/.cursor/memory-profile.md
gemini ~/.gemini/GEMINI.md
antigravity ~/.gemini/antigravity/MEMORY.md
Antigravity 2.0 currently uses the lower-level MCP writer because its stable user config path is separate from the original Antigravity profile. Preview the generated OAuth-first config with:
xmemo mcp add antigravity2 --url https://xmemo.dev
Write it to the default Antigravity 2.0 config path with:
xmemo mcp add antigravity2 --url https://xmemo.dev --write
The generated config uses https://xmemo.dev/mcp, contains no bearer token, and
expects Antigravity 2.0 to complete MCP OAuth in the browser on first use.
XMEMO_AGENT_INSTANCE_ID is a device-level identifier shared by all agents on
the same machine, generated and stored when --write is used.
List supported client generators:
xmemo mcp list
Current write-capable clients:
codex ~/.codex/config.toml
cursor ~/.cursor/mcp.json
copilot ~/.copilot/mcp-config.json
gemini ~/.gemini/settings.json
antigravity ~/.gemini/antigravity/mcp_config.json
antigravity2 ~/.antigravity2/mcp.json
kiro ~/.kiro/settings/mcp.json
For clients without a verified user-scoped write path, generate a read-only template and apply it manually after review:
xmemo mcp config --client generic --base-url "https://your-private-service.example" --json
Codex, Cursor, Copilot CLI, Gemini CLI, Antigravity, and Kiro have write-capable setup
helpers. Antigravity 2.0 is write-capable through xmemo mcp add antigravity2 --write.
Other client writes should only be added after their official user-scoped config
format is verified.
Copilot CLI has /mcp management and reads user MCP configuration from
~/.copilot/mcp-config.json (or $COPILOT_HOME/mcp-config.json). XMemo writes
a local proxy server entry there:
xmemo login
xmemo setup copilot
xmemo mcp proxy
xmemo setup copilot writes XMemo to Copilot CLI's user MCP config and
does not include token or identity headers. Use xmemo setup copilot --dry-run
to preview without writing. xmemo mcp proxy reads the token saved by
xmemo login or xmemo token add --from-stdin, adds the XMemo bearer token and
local agent identity, then forwards requests to https://xmemo.dev/mcp. If
Copilot CLI is already open, reload MCP config or restart Copilot CLI after
setup.
If you specifically want the older environment-variable template, run:
xmemo mcp config --client copilot-cli --remote-env
Recommended Codex setup:
xmemo setup codex
xmemo smoke --client codex
setup codex writes the MCP config to user-scoped Codex config and, by default,
installs the XMemo Codex behavior profile into the current project's AGENTS.md
between these markers. Use xmemo setup codex --dry-run to preview without
writing or xmemo setup codex --no-profile to skip the behavior profile.
<!-- memory-os:codex-profile:start -->
<!-- memory-os:codex-profile:end -->
Repeat installs update only that marker block. Remove it with:
xmemo profile uninstall codex
Advanced: generate a Codex MCP config snippet without touching files:
xmemo mcp add codex --url "$XMEMO_URL"
Write it to the default Codex config path:
xmemo mcp add codex --url "$XMEMO_URL" --write
The generated config references XMEMO_KEY, includes the non-secret
X-Memory-OS-Agent-ID / X-Memory-OS-Agent-Instance-ID attribution headers,
and does not include the token value.
Codex MCP-depth checks:
xmemo mcp profile codex
xmemo profile install codex --dry-run
xmemo profile install codex
xmemo profile status codex
xmemo smoke --client codex
xmemo mcp profile codex prints the recommended memory behavior profile:
recall/search at the start of non-trivial tasks, write back high-signal
decisions and fixes, and never store secrets. xmemo smoke --client codex
checks the local Codex TOML config for the XMemo MCP server,
bearer_token_env_var = "XMEMO_KEY", token presence in the environment, and
absence of embedded token values.
Cursor marketplace plugin assets live in .cursor-plugin/marketplace.json and
plugins/xmemo/. The marketplace plugin is OAuth-first and its mcp.json stores
only https://xmemo.dev/mcp; it must not contain Authorization, Bearer, or
XMEMO_KEY.
Recommended Cursor setup:
xmemo setup cursor
setup cursor merges the Cursor MCP config into the default Cursor user config
path. Use xmemo setup cursor --dry-run to preview without writing. The
lower-level equivalent remains:
xmemo mcp add cursor --url "$XMEMO_URL" --write
The CLI refuses to overwrite an existing XMemo, memory_os, or memory-os
MCP server entry. Edit the config manually if you need to rotate the endpoint.
Cursor configs include
X-Memory-OS-Agent-ID and X-Memory-OS-Agent-Instance-ID; the instance ID is
non-secret and stored under the user's XMemo CLI config directory. By default,
the setup prompt also installs a Cursor behavior profile at
~/.cursor/memory-profile.md; answer n or pass --no-profile to skip it.
Use this direct-key setup only for local/manual installs where Cursor OAuth is
unavailable; public plugin submission should use the OAuth-first plugin config.
Recommended Gemini CLI setup:
xmemo setup gemini
setup gemini merges an XMemo MCP server into Gemini CLI's user settings at
~/.gemini/settings.json. It writes a remote HTTP server using Gemini's
httpUrl key plus X-Memory-OS-Agent-ID and X-Memory-OS-Agent-Instance-ID
headers. Use xmemo setup gemini --dry-run to preview without writing.
Unlike Codex/Cursor, the Gemini config carries no token: authentication uses
Gemini CLI's built-in MCP OAuth flow (a one-time browser login on first use).
This is deliberate — Gemini redacts environment variables matching
*KEY*/*TOKEN*/*AUTH* during header expansion, so an ${XMEMO_KEY}
reference would not survive. OAuth avoids storing any secret in the config and
still grants the full XMemo tool profile. After setup, restart Gemini CLI and
run /mcp (or the first XMemo tool call) to complete the OAuth login. By
default, the setup prompt also installs a Gemini behavior profile at
~/.gemini/GEMINI.md; answer n or pass --no-profile to skip it.
The CLI refuses to overwrite an existing XMemo, memory_os, or memory-os
MCP server entry. Edit the config manually if you need to rotate the endpoint.
Recommended Antigravity setup:
xmemo setup antigravity
setup antigravity merges an XMemo MCP server into Antigravity's user MCP config
at ~/.gemini/antigravity/mcp_config.json. It writes Antigravity's
serverUrl shape plus X-Memory-OS-Agent-ID and
X-Memory-OS-Agent-Instance-ID headers. Like Gemini CLI, the config carries
no token: restart Antigravity and complete the MCP OAuth flow on first use.
By default, the setup prompt also installs an Antigravity behavior profile at
~/.gemini/antigravity/MEMORY.md; answer n or pass --no-profile to skip it.
The lower-level equivalent is:
xmemo mcp add antigravity --write
Use xmemo setup antigravity for normal installs because it performs discovery
and chooses the recommended Antigravity path automatically. Use
xmemo mcp add antigravity --write when you want the generic MCP writer
directly, for example with --url or --config in advanced/multi-client setup.
The CLI refuses to overwrite an existing XMemo, memory_os, or memory-os
MCP server entry. Edit the config manually if you need to rotate the endpoint.
Recommended Kiro setup:
xmemo setup kiro
setup kiro merges an XMemo MCP server into Kiro's user MCP config at
~/.kiro/settings/mcp.json. It writes a remote HTTP server using Kiro's
standard url key plus X-Memory-OS-Agent-ID and X-Memory-OS-Agent-Instance-ID
headers. Use xmemo setup kiro --dry-run to preview without writing.
The Kiro config includes Authorization: Bearer ${env:XMEMO_KEY} so
authentication uses the environment variable approach. Set your XMemo token with:
xmemo login
# or
printf '%s\n' 'your-token' | xmemo token add --from-stdin
After setup, restart Kiro or reload MCP servers for the changes to take effect.
The CLI refuses to overwrite an existing XMemo, memory_os, or memory-os
MCP server entry. Edit the config manually if you need to rotate the endpoint.
Recommended Grok setup:
xmemo setup grok
setup grok appends an XMemo MCP server to Grok's user config at
~/.grok/config.toml using Grok's TOML [mcp_servers.XMemo] format with url,
bearer_token_env_var = "XMEMO_KEY", and an [mcp_servers.XMemo.http_headers]
table carrying X-Memory-OS-Agent-ID. Use xmemo setup grok --dry-run to
preview without writing.
Set your XMemo token with:
xmemo login
# or
printf '%s\n' 'your-token' | xmemo token add --from-stdin
Grok is also fully compatible with Claude Code: it automatically reads Claude
Code marketplaces, plugins, skills, and MCP servers. So xmemo setup claude-code
plus the repo's .claude-plugin/, .mcp.json, and skills/ are discovered by
Grok with zero extra configuration. Use xmemo setup grok when you want the
server written directly into Grok's own ~/.grok/config.toml.
After setup, restart Grok or run /mcps to reload MCP servers. The CLI refuses
to overwrite an existing XMemo MCP server entry; edit the config manually if
you need to rotate the endpoint.
Recommended Antigravity 2.0 setup:
xmemo mcp add antigravity2 --write
Use a dry preview first if you want to inspect the exact JSON before writing:
xmemo mcp add antigravity2
Antigravity 2.0 uses a separate config path from the original Antigravity
profile. The default write target is ~/.antigravity2/mcp.json; on Windows the
server-side config contract also documents %APPDATA%\\Antigravity 2.0\\mcp.json
as the Antigravity 2.0 user config location. Pass --config <path> when you
want to write to a specific file.
The generated XMemo entry uses hosted HTTP MCP:
{
"mcpServers": {
"XMemo": {
"type": "http",
"url": "https://xmemo.dev/mcp"
}
}
}
No token value is written. Restart Antigravity 2.0 after setup and complete the
MCP OAuth browser flow on first use. If you use --write, the CLI also prepares
a device-level XMEMO_AGENT_INSTANCE_ID shared by all agents on the same
machine so XMemo can attribute activity consistently without embedding secrets.
This repository is the source for the @xmemo/client npm package. Releases
should be published from GitHub Actions on tags or GitHub Releases, not from a
developer workstation.
Recommended flow:
develop -> test -> tag/release -> GitHub Actions -> npm publish --provenance
Included in npm:
bin/
src/
README.md
LICENSE
Excluded from npm:
.github/
test/
coverage/
server code
database migrations
deployment files
logs
local state
secrets
io.github.ericm1018/skillfm-llm-cost-optimizer-openai-anthropic-usage
io.github.mikerawsonnz/llm-orchestration-agent
io.github.mikerawsonnz/authenticated-llm-agent
labforgedev/copilot-memory-mcp
csoai-org/agent-prompt-injection-firewall-mcp
io.github.mikerawsonnz/authenticated-multi-llm-agent