
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.
agent_idstringagent_instance_idstringbucketstringconfidencenumbercontentstringdevice_idstringdevice_labelstringembedding_jsonstringexpires_atstringimportancenumbermemory_typestringmetadata_jsonstringpathstringprovenance_jsonstringscopestringsemantic_keystringteam_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...
agent_idstringagent_instance_idstringbucketstringconfidencevaluecontentstringdedupebooleandevice_idstringdevice_labelstringembedding_jsonstringexpires_atstringimportancevaluememory_idstringmemory_typestringmetadata_jsonstringpathstringprovenance_jsonstringscopestringsemantic_keystringteam_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...
agent_idstringagent_instance_idstringamountnumberbucketstringcategorystringcurrencystringdevice_idstringdevice_labelstringitemstringmerchantstringnotestringpathstringpayment_methodstringscopestringteam_idstringtransaction_datestringupdate_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.
blocked_reasonstringbucketstringcontentstringcurrent_taskstringmetadata_jsonstringnext_actionstringscopestringstate_keystringttl_secondsintegersearch_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.
agent_idstringagent_instance_idstringexplainbooleanlimitintegermemory_typestringpath_filterstringprefer_workingbooleanquerystringscopestringteam_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.
bucketstringmemory_typestringoutput_jsonbooleanpath_filterstringprefer_workingbooleanquerystringscopestringteam_idstringrecall_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.
agent_idstringagent_instance_idstringbucketstringlimitintegermax_itemsintegermax_tokensintegermemory_typestringoutput_jsonbooleanpath_filterstringprefer_workingbooleanquerystringscopestringteam_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.
bucketstringcategorystringcurrencystringdate_fromstringdate_tostringlimitintegermax_amountvaluemin_amountvalueoffsetintegeroutput_jsonbooleanquerystringscopestringtransaction_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.
bucketstringcurrencystringmonthsintegeroutput_jsonbooleanscopestringtransaction_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.
expected_relevant_totalintegermemory_idstringmetadata_jsonstringpositionintegerquerystringreasonstringrelevantbooleanrun_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.
auto_tunebooleansincestringuntilstringrecord_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.
corrected_ids_jsonstringmetadata_jsonstringmissing_ids_jsonstringmissing_memories_jsonstringnotesstringquerystringreturned_ids_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.
actionstringbucketstringlimitintegeroffsetintegerscopestringsincestringtarget_idstringuntilstringquery_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.
action_typestringbucketstringlimitintegeroffsetintegerscopestringsincestringuntilstringrecord_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).
bucketstringcontentstringevent_typestringmetadata_jsonstringscopestringsession_idstringget_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.
bucketstringevent_typestringlimitintegerscopestringsession_idstringcreate_reminderCreate a TODO item. Alias for create_memory_todo.5 paramsCreate a TODO item. Alias for create_memory_todo.
bucketstringcontentstringdue_atstringmetadata_jsonstringscopestringlist_remindersList TODO items. Alias for list_memory_todos.5 paramsList TODO items. Alias for list_memory_todos.
bucketstringdue_beforestringitem_statusstringlimitintegerscopestringcomplete_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.
bucketstringcontentstringdue_atstringmetadata_jsonstringscopestringlist_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.
bucketstringdue_beforestringitem_statusstringlimitintegerscopestringcomplete_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.
bucketstringcontextstringdue_atstringmetadata_jsonstringoptions_jsonstringscopestringlist_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.
bucketstringdue_beforestringitem_statusstringlimitintegerscopestringresolve_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.
decision_idstringresolutionstringcreate_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.
bucketstringdecision_limitintegermetadata_jsonstringreminder_limitintegerscopestringsession_idstringstate_keystringtimeline_limitintegerttl_secondsintegerrestore_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.
bucketstringrecord_restore_eventbooleanrestore_statebooleanscopestringsnapshot_idstringsource_session_idstringstate_keystringtarget_session_idstringttl_secondsintegerrecallRecall 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.
agent_idstringagent_instance_idstringexplainbooleanlimitintegermemory_typestringpath_filterstringprefer_workingbooleanquerystringupdate_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.
bucketstringconfidencevaluecontentstringdetect_conflictsbooleanexpires_atstringimportancevaluememory_idstringmemory_typestringmerge_metadatabooleanmerge_provenancebooleanmetadata_jsonstringpathstringprovenance_jsonstringscopestringsemantic_keystringstatusstringsupersession_reasonstringteam_idstringforget_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.
memory_idstringmetadata_jsonstringmodestringreasonstringreplacement_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.
group_bystringmemory_typestringoutput_jsonbooleanpath_filterstringscopestringsincestringtop_nintegeruntilstringmemory_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.
activity_typestringinclude_timelinebooleanlimitintegeroutput_jsonbooleansincestringuntilstringanalyze_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.
group_bystringinclude_examplesbooleanmatch_modestringmax_examplesintegermax_memoriesintegermemory_typestringoutput_jsonbooleanpath_filterstringphrasestringscopestringsincestringuntilstringrestore_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.
memory_idstringmetadata_jsonstringreasonstringredact_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.
memory_idstringmetadata_jsonstringreasonstringreplacement_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.
include_embeddingbooleanmemory_idstringoutput_jsonbooleanquerystringlist_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_jsonstringresolution_strategystringwinning_memory_idstringrun_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.
archivebooleanbucketstringdecaybooleandry_runbooleanexpirebooleanlimitintegerscopestringteam_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.
actions_csvstringbucketstringdry_runbooleanlimitintegerowner_filtervaluepath_filterstringscopevaluesincevalueteam_idstringtime_window_hoursnumberuntilvalueget_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.
group_bystringmemory_typestringoutput_jsonbooleanpath_filterstringscopestringsincestringsourcestringstatusstringteam_idstringtop_nintegeruntilstringXMemo is a user-owned Memory OS for AI agents: persistent memory, project context and session continuity with agent identity, provenance and governed access, shared across AI clients through MCP, the CLI and a public REST API surface.
English · 简体中文 | Documentation · Hosted MCP
Quick start · What this repo contains · Beyond MCP · Integrations · Connection modes · Plugins · Commands · Versioning · Security
@xmemo/client: the official xmemo CLI for setup, diagnostics, behavior profiles, and memory commands.https://xmemo.dev/mcp) and the local xmemo-mcp stdio server.skills/xmemo for agent platforms and the native plugin index (src/plugins/index.json).server.json), LobeHub (lhm.plugin.json), and AI agents (context7.json).The hosted service implementation is private.
MCP is one access surface of XMemo, not the product boundary. XMemo provides a persistent, governed memory operating layer across AI tools and agents:
xmemo), and the public REST API.Preview: Cloud Skills; Dream (off by default); Teams (Business plan not yet available). Knowledge Bases are available where enabled for the account.
@xmemo/client is the official control plane for connecting AI tools to XMemo. It makes setup repeatable, keeps credentials out of project files, and gives every supported client a consistent path to durable, user-owned memory.
The package is deliberately small: the CLI runtime, safe client configuration, behavior profiles, XMemo skills, and marketplace metadata. Server code, databases, deployment files, logs, and internal operations remain outside the npm distribution.
| Package | @xmemo/client |
| Primary command | xmemo (alias: client) |
| Local MCP command | xmemo-mcp |
| Hosted MCP | https://xmemo.dev/mcp |
| Runtime | Node.js 20 or later |
| License | MIT |
xmemo init)For an interactive first-run experience across account authentication, detected clients, agent behavior instructions, MCP server setup, skills, and plugins, run:
npm install -g @xmemo/client
xmemo init
Flags and options:
xmemo init --dry-run: View the full onboarding plan without performing network calls or disk writes.xmemo init --yes: Automatically accept and apply all onboarding steps without interactive prompts.xmemo init --json: Emit structured JSON for the plan or result envelope.xmemo init --client <id>...: Restrict onboarding to specific clients (e.g., cursor, codex, claude-code).xmemo start: Alias for xmemo init with quick-start walkthrough steps.Global installation exposes xmemo as the primary command, and also provides client and memory-os as aliases.
xmemo account login
xmemo doctor
xmemo setup codex
xmemo status
Replace codex with your client. Preview a configuration before writing it:
xmemo setup cursor --dry-run
You can also run any CLI command directly without a global install via npx @xmemo/client <command>:
# Check version or health
npx @xmemo/client --version
npx @xmemo/client doctor
# Guided onboarding without global install
npx @xmemo/client init
# Install skill or run MCP stdio server
npx @xmemo/client skill install
npx @xmemo/client mcp serve
[!TIP] Start with
xmemo init(orxmemo account login,xmemo doctor, andxmemo setup <client>). Hand-edit MCP configuration only when a client has no verified setup path.
The XMemo CLI architecture is built on four core design principles:
xmemo <resource> <action>)Every integration component is a first-class resource with predictable lifecycle actions:
| Resource | Scope | Actions | Examples |
|---|---|---|---|
mcp | MCP server connection configuration | install, remove, status | xmemo mcp install codex, xmemo mcp status |
plugin | Host-native extension packages | install, remove, status, list, info | xmemo plugin install gemini-cli, xmemo plugin list |
skill | Agent skill scripts & documentation | install, remove, status, update | xmemo skill install --client openclaw |
profile | Markdown behavior steering instructions | install, remove, status, show | xmemo profile install cursor |
xmemo setup [<client>...], xmemo uninstall [<client>...], and xmemo status [<client>] orchestrate these resources in a single step according to the client's declarative profile.xmemo mcp add (alias for mcp install), xmemo profile uninstall (alias for profile remove), and xmemo skill uninstall (alias for skill remove) remain fully functional and print a helpful one-line hint in interactive terminals.When no client is explicitly passed, the CLI uses a deterministic three-tier precedence resolution model:
--client <id>, positional client argument, or --all.CLAUDECODE / CLAUDE_CODE_ENTRYPOINT maps to claude-code, and CODEX_THREAD_ID / CODEX_SESSION_ID maps to codex).PlanRunner)Mutating commands follow a strict, atomic execution pattern:
[y/N] exactly once for the entire sequence. Re-running with --yes or -y bypasses the prompt; --dry-run displays the preview without mutation.Nothing to do.All client configurations, recipes, and capabilities are declared centrally in src/clients/registry.js. Command implementations are purely generic orchestrators with zero hardcoded client ID strings. Platforms can also be added dynamically at runtime via registerClient().
| Client | Recommended command | Connection |
|---|---|---|
| Codex | xmemo setup codex | Hosted MCP + behavior profile |
| Cursor | xmemo setup cursor | Hosted MCP + Bearer Token + behavior profile |
| Copilot CLI | xmemo setup copilot | Local authenticated proxy |
| Gemini CLI | xmemo setup gemini | Hosted MCP + OAuth |
| Antigravity | xmemo setup antigravity | Hosted MCP + OAuth |
| OpenClaw | xmemo setup openclaw | Native memory plugin + Skill |
| Hermes | xmemo setup hermes | Native memory provider |
| Kiro | xmemo setup kiro | Native HTTP OAuth; --auth key for API Key |
| Grok | xmemo setup grok | Hosted MCP |
| Other MCP clients | xmemo mcp config --client generic | Generated template |
The client registry also covers Devin Desktop (formerly Windsurf), Cline, Continue, Claude Desktop,
Claude Code, Kimi Code, Zed, JetBrains, OpenCode, Qwen, Trae, and compatible
MCP hosts. Run xmemo mcp list for the current machine-readable catalog.
For VS Code users looking for the dedicated editor extension, see the yonro/xmemo-vscode repository. For Cursor users looking for the dedicated plugin, see the yonro/xmemo-cursor-plugin repository. For Claude users looking for the dedicated plugin, see the yonro/xmemo-claude-plugin repository.
The recommended universal path is the XMemo Streamable HTTP endpoint:
https://xmemo.dev/mcp
OAuth-capable clients complete authentication in the browser. Other clients
reference XMEMO_KEY without copying its value into repository files.
Generic configuration shape:
{
"mcpServers": {
"XMemo": {
"type": "streamable-http",
"url": "https://xmemo.dev/mcp",
"headers": {
"Authorization": "Bearer ${XMEMO_KEY}"
}
}
}
}
Client configuration keys differ; prefer xmemo setup <client> over copying
this generic example directly.
xmemo-mcp is the dedicated stdio entry point for marketplaces and clients
that launch a local process. Safe discovery exposes 20 tools, three prompts,
and two documentation resources without a token. Tool execution still requires
authentication.
After a global installation:
xmemo-mcp
Install-free MCP configuration:
{
"mcpServers": {
"XMemo": {
"command": "npx",
"args": [
"-y",
"--package",
"@xmemo/client@latest",
"xmemo-mcp"
]
}
}
}
xmemo mcp serve is equivalent when the CLI is already installed.
OpenClaw and Hermes have dedicated memory providers. Their default setup avoids installing a second, duplicate XMemo tool surface:
clawhub:@xmemo/openclaw-memory@1.0.18 without --force by default. Re-running setup gracefully detects existing installations; use --force to reinstall or overwrite.hermes-xmemo==1.1.3 via pip install without -U.--dry-run to preview actions without installing.# Native OpenClaw plugin (clawhub:@xmemo/openclaw-memory@1.0.18) + XMemo Skill
xmemo setup openclaw
# Native Hermes memory provider (hermes-xmemo==1.1.3)
xmemo setup hermes
Add hosted MCP only when an explicit fallback is desired:
xmemo setup openclaw --with-mcp
xmemo setup hermes --with-mcp
Use --mcp-only to skip the native integration and install only the hosted MCP
fallback.
The CLI installs the verified XMemo Skill locally into agent skill folders or a target directory:
~/.claude/skills/xmemo-memory (global) or .claude/skills/xmemo-memory (project with --project)~/.codex/skills/xmemo-memory~/.openclaw/skills/xmemo-memorynull until officially documented.@xmemo/skill@1.1.35 release from npm and verifies tarball integrity (sha512 SRI) before extraction.--version <semver> or explicitly opt into the latest release via --version latest.--from <dir|tgz> (optional --integrity <sha512>).skill status, skill update, and skill remove.--dry-run.[y/N] before writing (Enter, EOF, or empty input cancels) unless --yes is specified.--force; when --force is used, a backup is created in ~/.xmemo/backups/skills/<client>/ (outside the agent skills directory).skill remove only removes verified XMemo skill directories, refusing foreign folders, and reports the preserved backup location.# Install to agent skill folder (Claude Code global, Codex, or OpenClaw)
xmemo skill install --client claude-code
xmemo skill install --client codex
xmemo skill install --client openclaw
# Install OpenClaw skill globally (shared ~/.openclaw/skills)
xmemo skill install --client openclaw --global
# Install to project-level skill folder (Claude Code project: .claude/skills/xmemo-memory)
xmemo skill install --client claude-code --project
# Install for all detected supported clients
xmemo skill install --all
# Automatically resolve detected client(s) (or specify --client <id>)
xmemo skill install
# Install into a custom directory path
xmemo skill install --dir ./custom-skill-dir
# Non-interactive install (skips [y/N] prompt)
xmemo skill install --client codex --yes
# Replace existing installation (creates backup in ~/.xmemo/backups/skills/<client>/)
xmemo skill install --client codex --force --yes
# Update alias (equivalent to skill install --force)
xmemo skill update --client codex --yes
# Inspect installation status across clients
xmemo skill status
xmemo skill status --client codex
xmemo skill status --all --json
# Remove installed skill from an agent folder (refuses non-XMemo folders)
xmemo skill remove --client codex --yes
xmemo skill remove --client claude-code --project --yes
# Dry run preview
xmemo skill install --client codex --dry-run
For environments without Node.js or @xmemo/client, XMemo provides standalone HTTPS installers at https://xmemo.dev/skill/install (POSIX sh) and https://xmemo.dev/skill/install.ps1 (PowerShell).
The installer is agent-aware and automatically resolves the correct target directory for your active agent:
# Claude Code: installs to ~/.claude/skills/xmemo-memory
curl -fsSL https://xmemo.dev/skill/install | XMEMO_SKILL_AGENT=claude-code sh
# Codex: installs to ${CODEX_HOME:-$HOME/.codex}/skills/xmemo-memory
curl -fsSL https://xmemo.dev/skill/install | XMEMO_SKILL_AGENT=codex sh
# OpenClaw: install via OpenClaw CLI
openclaw skills install @xmemo/xmemo --version 1.1.35
# Windows (PowerShell):
# $env:XMEMO_SKILL_AGENT="claude-code"; irm https://xmemo.dev/skill/install.ps1 | iex
# $env:XMEMO_SKILL_AGENT="codex"; irm https://xmemo.dev/skill/install.ps1 | iex
[!TIP] Prompt for your AI Agent (copy and paste directly into Claude Code, Codex, or another agent):
Install the standalone XMemo Skill into your skills directory: run the installer from https://xmemo.dev/skill/install (on Windows, https://xmemo.dev/skill/install.ps1) with XMEMO_SKILL_DIR set to your skills directory plus /xmemo-memory. Run the doctor command it prints to verify the installation, then reload your skills and follow the Skill's first-run steps. Follow your normal safety checks and do not use elevated privileges.
Target resolution precedence (first match wins):
XMEMO_SKILL_DIR: Installs to the specified directory.XMEMO_SKILL_AGENT=claude-code|codex: Installs to the explicit agent's skills directory (openclaw redirects to openclaw skills install xmemo).CLAUDECODE=1) or Codex (CODEX_THREAD_ID, CODEX_SESSION_ID, or CODEX_HOME).~/.claude or only ~/.codex exists in HOME, selects that agent../xmemo-skill with a warning on stderr explaining that AI agents will not automatically load the skill from this directory.Safety & Replacement:
XMEMO_SKILL_FORCE=1 is provided.~/.xmemo/backups/skills/<agent>/<name>-<timestamp> (safely outside agent skill search paths).node <path>/scripts/xmemo-skill.mjs doctor --anonymous), and a prompt to reload your agent.The CLI provides a curated, static index of verified agent plugins shipped directly in @xmemo/client. Each entry contains a pinned version, release tag, and exact Git commit SHA resolved at release time.
ℹ️ Strict Separation Rule:
xmemo plugininstalls agent plugins only (e.g.@xmemo/openclaw-memory). Skills are installed exclusively viaxmemo skill install(e.g.@xmemo/xmemo).
| Plugin ID | Platform / Agent | Kind | Status | Integration |
|---|---|---|---|---|
openclaw | OpenClaw | native-cli | Stable | openclaw plugins install clawhub:@xmemo/openclaw-memory@1.0.18 (auto-prompts update if already installed) |
hermes | Hermes Agent | native-cli | Stable | hermes plugins install xmemo (fallback: python -m pip install hermes-xmemo==1.1.3) |
claude-code | Claude Code | git-dir | Preview | Pinned Git clone verified against commit 5d0d280 (defaults to ~/.xmemo/plugins/claude-code) |
cursor | Cursor | marketplace | Preview | Cursor Marketplace plugin |
gemini-cli | Gemini CLI | native-cli | Preview | gemini extensions install https://github.com/yonro/xmemo-gemini-cli --ref 39e25b185b5157490d1683e4ca8c5c5fb1312a88 |
kiro | Kiro | manual | Preview | Steering rules & Power integration |
vscode | VS Code | manual | Preview | VS Code extension manual steps (pending marketplace publication) |
deepseek-dsh | DeepSeek DSH | native-cli | Preview | dsh plugin --profile <name> add dsh-xmemo (requires --profile) |
chatgpt-codex | ChatGPT / Codex | marketplace | Preview | ChatGPT & Codex extension |
cindy | Cindy | manual | Preview | Native agent memory integration |
codex | Codex | mcp | Preview | Dedicated MCP configuration (xmemo setup codex) |
Commands:
# List available plugins (excluding legacy entries)
xmemo plugin list
# Include legacy plugins
xmemo plugin list --all
# View plugin details and verification metadata
xmemo plugin info <id>
# Preview install plan without executing
xmemo plugin install <id> --dry-run
# Install with explicit confirmation (prompts [y/N] by default)
xmemo plugin install <id>
# Non-interactive install
xmemo plugin install <id> --yes
# Specify profile for deepseek-dsh
xmemo plugin install deepseek-dsh --profile default --yes
# Specify custom target directory for git-dir plugins
xmemo plugin install claude-code --yes --dir ~/.custom-plugins/claude-code
# Open plugin documentation or marketplace in browser
xmemo plugin install <id> --open
# Check installation status
xmemo plugin status [<id>]
Security & Consent:
[y/N], defaulting to Cancel on empty input or EOF).--dry-run guarantees zero disk writes and zero spawned processes.plugin install <id> (pass --open to open docs in browser).claude-code) clone into a stable per-user location (~/.xmemo/plugins/<id>), support --dir <path> override, verify the checked-out HEAD commit byte-for-byte, and output the exact load command (claude --plugin-dir <dir>). On commit mismatch, the directory is immediately removed.XMEMO_KEY, MEMORY_OS_MCP_TOKEN, XMEMO_TOKEN) scrubbed from argv and env.Manage local authentication, stored credentials, and tokens through the account command family:
# Browser device login
xmemo account login
# Check active authentication state
xmemo account status
# Optional remote verification
xmemo account status --verify
# Check or store token credentials
xmemo account token status
printf '%s\n' 'your-token' | xmemo account token add --from-stdin --allow-plaintext
# Logout: remove locally stored XMemo credentials owned by the CLI
xmemo account logout
# Non-interactive logout
xmemo account logout --yes
xmemo account logout)~/.config/xmemo/credentials.json or OS config root).Proceed with logout? [y/N] (defaulting to No) unless --yes is specified.--yes when --json is specified to prevent accidental headless logout.The legacy commands remain fully supported as backward-compatible aliases:
xmemo login (alias for xmemo account login)xmemo auth status (alias for xmemo account status)xmemo auth-status (alias for xmemo account status)xmemo token <status|add|set> (alias for xmemo account token <status|add|set>)In interactive human mode, legacy aliases emit a one-line deprecation hint to stderr. When run with --json or --help, the deprecation hint is suppressed.
Pipe an existing token through stdin so it does not appear in command history:
printf '%s\n' 'your-token' | xmemo account token add --from-stdin --allow-plaintext
xmemo account token status --verify
PowerShell:
$xmemoToken = Read-Host "XMemo token"
$xmemoToken | xmemo account token add --from-stdin --allow-plaintext
Remove-Variable xmemoToken
For CI and managed workstations, expose XMEMO_KEY through the platform's
secret manager. Do not commit it to .env, MCP configuration, logs, issue
reports, or chat transcripts.
--json outputEvery command and subcommand supports --json for predictable scripting:
stdout with exit code 0.{ schemaVersion, ok: false, command, data: null, error: { code, message, ... } } on stdout with a non-zero exit code (e.g. exit code 2 for usage/input errors, 1 for internal/network errors).xmemo init [--client <id>...] [--yes] [--dry-run] [--json]
# Backward-compatible alias
xmemo start [--json]
# High-level client configuration
xmemo setup <client> [--url <url>] [--no-profile] [--json] [--force]
xmemo setup <client> --dry-run
xmemo setup --all [--write] [--profile] [--force]
# Direct MCP server configuration
xmemo mcp serve
xmemo mcp list
xmemo mcp config --client <client-id> [--base-url <url>] [--json]
xmemo mcp add <client-id> [--write] [--config <path>]
xmemo mcp proxy [--port 8765] [--base-url <url>]
# Workspace behavior profiles
xmemo profile install <client-id> [--target <path>] [--dry-run]
xmemo profile show <client-id> [--target <path>] [--json]
xmemo profile status <client-id> [--target <path>] [--json]
xmemo profile uninstall <client-id> [--target <path>] [--yes]
# Install verified pinned skill into agent skill folders
xmemo skill install [--client <id>|--all] [--project] [--dir <path>] [--dry-run] [--yes] [--force] [--json]
# Inspect installation status across clients
xmemo skill status [--client <id>|--all] [--json]
# Remove installed skill from an agent folder (refuses non-XMemo folders)
xmemo skill remove --client <id> [--project] [--yes] [--json]
# Update skill installation (creates backup in ~/.xmemo/backups/skills/<client>/)
xmemo skill update [--client <id>|--all] [--yes] [--json]
xmemo plugin list [--all] [--json]
xmemo plugin info <id> [--json]
xmemo plugin install <id> [--dry-run] [--yes] [--open] [--dir <path>] [--json]
xmemo plugin status [<id>] [--all] [--json]
xmemo memory add --content "Remember this" --path notes/example --json
xmemo memory search "example" --json
xmemo memory read <id> --json
xmemo memory list [--path-prefix <prefix>] [--project <name>] [--query <text>] [--type <type>] [--all] [--limit <n>] [--offset <n>] --json
xmemo memory delete <id> [--reason <text>] [--yes] --json
xmemo memory restore <id> [--yes] --json
xmemo memory import --file memories.jsonl [--dry-run] [--idempotency-key <key>] [--yes] --json
xmemo memory ledger-delete --id <transaction-uuid> --yes --json
xmemo context recall "resume this task" --include-knowledge --json
xmemo state save --current-task "ship the client" --next-action "run tests" --json
xmemo state restore --json
xmemo restart snapshot --json
xmemo restart restore --snapshot-id <snapshot-id> --json
xmemo knowledge add --base <base-id> --file ./guide.pdf --title "Guide" --json
xmemo knowledge search "setup" --base <base-id> --json
xmemo knowledge read <item-id> --json > knowledge-view.json
xmemo knowledge update <item-id> --text "Updated" --from knowledge-view.json --publish --yes --json
xmemo dream preview --wait --json
xmemo dream show <run-id> --json > dream-view.json
xmemo dream apply <run-id> --item <candidate-id> --from dream-view.json --yes --json
xmemo cloud-skill list --json
xmemo cloud-skill add --file ./SKILL.md --json
xmemo cloud-skill show <skill-id> --json > skill-view.json
xmemo cloud-skill update <skill-id> --from skill-view.json --file ./SKILL.md --json
xmemo cloud-skill run <skill-id> --input ./args.json --from skill-view.json --yes --json
All direct service commands support a single machine-readable JSON envelope.
Knowledge update, Dream apply, and Cloud Skill run use the readReceipt from a
saved read/show result so the CLI never silently substitutes a newer revision.
Set XMEMO_KNOWLEDGE_BASE_ID for a non-interactive default knowledge base.
For a long knowledge item, continue the same fixed revision with
xmemo knowledge read <item-id> --from knowledge-view.json --offset <n>.
Run xmemo doctor --services --json for read-only Knowledge, Dream, and Cloud
Skill diagnostics; it deliberately does not claim write or production readiness.
Cloud Skill add/update already target the safe create-only and content-CAS
contracts. They fail with SERVER_CONTRACT_REQUIRED on older services and do
not fall back to legacy upsert routes. Binary Knowledge item updates similarly
require a new version of the same server Document; use --document and
--document-version after that version has been uploaded.
The normal login scopes remain unchanged. Request additional service scopes explicitly when needed, for example:
xmemo login --scopes memory:read,memory:write,memory:restore,knowledge:read,knowledge:write
xmemo account login [--base-url <url>] [--allow-plaintext] [--json]
xmemo account logout [--yes] [--json]
xmemo account status [--verify] [--base-url <url>] [--json]
xmemo account token status [--verify] [--json]
xmemo account token add --from-stdin --allow-plaintext [--json]
xmemo account token set --from-stdin [--allow-plaintext] [--json]
# Backward-compatible aliases (emit one-line deprecation note on stderr in human mode)
xmemo login
xmemo auth status
xmemo auth-status
xmemo token status
xmemo token add --from-stdin --allow-plaintext
# Diagnostics and environment validation
xmemo doctor [--services [memory,dream,knowledge,cloud-skill]] [--base-url <url>] [--json]
xmemo doctor --discovery [--base-url <url>] [--json]
xmemo doctor --client <client-id> [--config <path>] [--smoke] [--auth oauth|key] [--fix] [--json]
# Probes, updates, and environment
xmemo status [--url <url>] [--json]
xmemo update [--dry-run] [--json]
xmemo env [--example] [--shell bash|powershell|cmd] [--json]
xmemo privacy [--json]
xmemo --version [--json]
# Safe removal (only XMemo-owned entries and profiles are removed)
xmemo uninstall <client> --dry-run
xmemo uninstall <client> --yes
xmemo uninstall --all --dry-run
xmemo uninstall --all --yes --profiles
# Backward-compatible aliases (emit one-line deprecation note on stderr in human mode)
xmemo smoke --client codex
xmemo discovery show
Run xmemo help or xmemo <command> --help for complete, version-matched
options.
xmemo setup codex
xmemo doctor --client codex --smoke
xmemo setup cursor
Both setup paths write a user-scoped MCP entry and can install a marker-scoped
memory behavior profile. Use --no-profile to configure MCP only. Cursor's
public marketplace plugin remains OAuth-first and contains no bearer-token
configuration.
xmemo setup gemini
xmemo setup antigravity
These clients use hosted MCP OAuth. Their generated configuration carries no token value; restart the client and complete the browser login on first use.
xmemo login
xmemo setup openclaw
openclaw xmemo status
The setup command installs or updates @xmemo/openclaw-memory, installs the
XMemo Skill, reuses the shared XMemo credential, and checks plugin status.
xmemo login
xmemo setup hermes
The setup command installs or updates hermes-xmemo, configures the native
provider, and synchronizes the user-scoped XMemo credential with Hermes.
xmemo login
xmemo setup copilot
xmemo mcp proxy
Copilot CLI receives a local proxy entry. The proxy reads the credential from user-scoped storage, adds identity metadata, and forwards requests to hosted MCP without writing secrets into Copilot configuration.
| Control | Default behavior |
|---|---|
| Telemetry | No CLI analytics or usage telemetry |
| Credential output | Token values are never printed |
| Project files | Generated configuration references secrets; it does not embed them |
| Discovery | doctor, discovery show, and public capability discovery send no token |
| Identity | One stable, non-secret agent-instance ID is stored outside git |
| Writes | Setup supports preview/dry-run; broad removal requires confirmation |
| Local credential storage | Interactive login asks first; non-interactive writes require --allow-plaintext; stored tokens are unencrypted |
| Package contents | An npm files allowlist excludes tests, operations, logs, and server code |
Credential precedence and compatibility aliases are documented by:
xmemo env example --shell bash
xmemo privacy
For private or self-hosted deployments, set XMEMO_URL or pass
--url <service-url>. MEMORY_OS_URL remains a compatibility alias.
Published to npm:
bin/
docs/assets/
src/
README.md
LICENSE
Not published:
.github/
docs/analysis/
docs/architecture/
docs/design/
test/
coverage/
server code
database migrations
deployment files
logs and local state
npm install
npm run release:check
npm run lint
npm test
npm run pack:dry-run
Before proposing a release, run the complete package gate:
npm run prepublishOnly
The local stdio server can be inspected directly:
node bin/mcp-stdio.js
This repository distributes two independent products with decoupled version tracks:
@xmemo/client): Published to npm.
package.json.cli-v* (legacy tags through version 0.4.181 used v0.4.xxx).xmemo): Published to ClawHub and distributed via xmemo.dev.
skills/xmemo/scripts/xmemo-skill.mjs (SKILL_VERSION).skill-v*.Latest release badge to support automated installer and server fallback downloads.Normal releases are produced by GitHub Actions from the exact tagged commit, not from a mutable branch checkout or a developer workstation:
develop → CLI version sync → test → cli-v tag → GitHub Actions → npm publish --provenance
The CLI package and hosted MCP service intentionally have separate version streams:
package.json, package-lock.json, and the npm package
entry in server.json.server.json.version and
lhm.plugin.json. This version follows the deployed XMemo service.node scripts/check-release-version.mjs verifies both contracts. A
cli-vX.Y.Z tag must equal the CLI/npm version and publishes only npm. The
MCP Registry is published separately with the Publish MCP Registry metadata
workflow using mcp-vX.Y.Z, which must equal the hosted MCP/Registry version.
The separate npm publish workflow is manual recovery only, so creating a
GitHub Release cannot publish twice. CLI npm publishing uses OIDC trusted
publishing (environment: npm, id-token: write); static NPM_TOKEN is no
longer used. Manual recovery via .github/workflows/publish.yml requires its
own trusted publisher entry on npmjs.com.
Canonical service documentation lives at docs.xmemo.dev. This repository documents the client; the pages below document the hosted service it connects to.
| Quickstart | docs.xmemo.dev/docs/quickstart |
| MCP overview and per-client setup | docs.xmemo.dev/docs/mcp/overview |
Tool reference (remember, recall, search, …) | docs.xmemo.dev/docs/tools/remember |
| REST API | docs.xmemo.dev/docs/api/authentication |
| Troubleshooting | docs.xmemo.dev/docs/troubleshooting |
| Machine-readable index | xmemo.dev/llms.txt |
MIT © 2025–2026 Yonro