XMemo
XMemo is a user-owned persistent memory and context server for AI agents, exposed as MCP tools for storing, retrieving, governing, and resuming memory across sessions.
Check XMemo connection and account/agent identity.
Store, update, delete/restore, read, explain, version, and analyze durable memories with paths, buckets, scopes, provenance, and dedupe.
Recall memories and build bounded context packs with time, path, type, and scope filters.
Retrieve project context, TODOs, decisions, and timeline history.
Save/restore working state and restart snapshots for session continuity and handoff.
Record/query timeline events and audit records, and view memory statistics.
Manage memory TODOs and project TODO/decision workflows.
Link, update, and remove explicit memory relationships.
Search Knowledge Bases and read exact knowledge items/revisions.
Save and recall reusable Cloud Skills/procedures.
Review/resolve memory conflicts and propose gated writes for TODOs/profiles.
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
XMemo: Memory OS for AI Agents

XMemo 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
What this repository contains
@xmemo/client: the officialxmemoCLI for setup, diagnostics, behavior profiles, and memory commands.MCP distribution: hosted Streamable HTTP configuration (
https://xmemo.dev/mcp) and the localxmemo-mcpstdio server.XMemo Skill & native integrations:
skills/xmemofor agent platforms and the native plugin index (src/plugins/index.json).Marketplace and registry metadata: canonical descriptors for MCP Registry (
server.json), LobeHub (lhm.plugin.json), and AI agents (context7.json).
The hosted service implementation is private.
Related MCP server: mesh-memory
Beyond MCP
MCP is one access surface of XMemo, not the product boundary. XMemo provides a persistent, governed memory operating layer across AI tools and agents:
Persistent Memory: store, search, list, and soft-delete durable facts, preferences, and operational knowledge across sessions.
Context Recall: retrieve focused, relevant context on demand with token-budget controls and document expansions.
Session Continuity & Working State: restart snapshots and state save/restore so agents resume context across process restarts.
Project Context & Decisions: track project-scoped facts, TODOs, and durable decisions across agent workflows.
Agent Identity & Provenance: track authorship and origin per memory record via agent instance attribution without conflating credentials.
Governed Access: scoped tokens, OAuth where the client supports it, soft/hard deletion and sensitive-memory handling (governance details).
Native Integrations & Skill: dedicated integration for OpenClaw, Hermes, XMemo Skill (ClawHub), and DeepSeek DSH (available, released and pilot-tested; integration maturity Preview).
Access Surfaces: unified via Model Context Protocol, the local CLI (
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 CLI
@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.
Architecture
Package | |
Primary command |
|
Local MCP command |
|
Hosted MCP |
|
Runtime | Node.js 20 or later |
License | MIT |
Why XMemo CLI
One control plane — login, diagnostics, configuration, profiles, updates, and smoke checks share one predictable interface.
Private by design — generated project configuration references a credential; it never embeds the credential value.
Native where it matters — OpenClaw and Hermes use dedicated memory integrations instead of duplicating the same capability through MCP.
Portable everywhere else — hosted Streamable HTTP MCP and local stdio cover modern editors, terminals, and agent runtimes.
Safe automation — supported setup and removal paths offer preview, dry-run, or explicit confirmation before making changes.
Small supply-chain surface — the npm package is governed by an explicit file allowlist and release provenance.
Quick start
Guided onboarding (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 initFlags 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 forxmemo initwith quick-start walkthrough steps.
Global installation exposes xmemo as the primary command, and also provides client and memory-os as aliases.
Manual step-by-step setup
xmemo account login
xmemo doctor
xmemo setup codex
xmemo statusReplace codex with your client. Preview a configuration before writing it:
xmemo setup cursor --dry-runRunning with npx
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 serveStart withxmemo init (or xmemo account login, xmemo doctor, and xmemo setup <client>).
Hand-edit MCP configuration only when a client has no verified setup path.
How the commands fit together
The XMemo CLI architecture is built on four core design principles:
1. Unified Resource Grammar (xmemo <resource> <action>)
Every integration component is a first-class resource with predictable lifecycle actions:
Resource | Scope | Actions | Examples |
| MCP server connection configuration |
|
|
| Host-native extension packages |
|
|
| Agent skill scripts & documentation |
|
|
| Markdown behavior steering instructions |
|
|
Composite commands:
xmemo setup [<client>...],xmemo uninstall [<client>...], andxmemo status [<client>]orchestrate these resources in a single step according to the client's declarative profile.Backward-compatible aliases: Familiar commands such as
xmemo mcp add(alias formcp install),xmemo profile uninstall(alias forprofile remove), andxmemo skill uninstall(alias forskill remove) remain fully functional and print a helpful one-line hint in interactive terminals.
2. Unified Target Resolver
When no client is explicitly passed, the CLI uses a deterministic three-tier precedence resolution model:
Explicit flag or argument:
--client <id>, positional client argument, or--all.Calling agent environment: Automatically identifies the calling agent runtime when running inside an agent session (e.g.,
CLAUDECODE/CLAUDE_CODE_ENTRYPOINTmaps toclaude-code, andCODEX_THREAD_ID/CODEX_SESSION_IDmaps tocodex).Detected installed clients: Inspects local configuration paths and markers. If exactly one matching client is found, it is automatically selected; if multiple clients are found in interactive mode, an interactive picker is presented. The CLI never silently writes configuration to arbitrary unverified paths.
3. Plan, Confirm Once, Apply (PlanRunner)
Mutating commands follow a strict, atomic execution pattern:
Build Plan: Assemble an ordered sequence of actions across resources (e.g. plugin install followed by skill configuration).
Preview: Print the entire plan (including modified paths, commands, and unified diffs) to the terminal.
Confirm Once: Prompt
[y/N]exactly once for the entire sequence. Re-running with--yesor-ybypasses the prompt;--dry-rundisplays the preview without mutation.Apply Sequentially: Steps run in dependency order, stopping immediately upon first failure. Re-running an already configured client detects that all components are up to date and reports
Nothing to do.
4. Declarative Client Registry
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().
Supported integrations
Client | Recommended command | Connection |
Codex |
| Hosted MCP + behavior profile |
Cursor |
| Hosted MCP + Bearer Token + behavior profile |
Copilot CLI |
| Local authenticated proxy |
Gemini CLI |
| Hosted MCP + OAuth |
Antigravity |
| Hosted MCP + OAuth |
OpenClaw |
| Native memory plugin + Skill |
Hermes |
| Native memory provider |
Kiro |
| Native HTTP OAuth; |
Grok |
| Hosted MCP |
Other MCP clients |
| Generated template |
The client registry also covers Devin Desktop (formerly Windsurf), Cline, Continue, Claude Desktop,
Claude Code, Kimi Code, Muse 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.
Connection modes
Hosted MCP
The recommended universal path is the XMemo Streamable HTTP endpoint:
https://xmemo.dev/mcpOAuth-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.
Local stdio MCP
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-mcpInstall-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.
Native integrations
OpenClaw and Hermes have dedicated memory providers. Their default setup avoids installing a second, duplicate XMemo tool surface:
OpenClaw: installs the pinned plugin
clawhub:@xmemo/openclaw-memory@1.0.18without--forceby default. Re-running setup gracefully detects existing installations; use--forceto reinstall or overwrite.Hermes: installs the pinned provider package
hermes-xmemo==1.1.3viapip installwithout-U.Every install command prints the exact command before executing. Use
--dry-runto 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 hermesAdd hosted MCP only when an explicit fallback is desired:
xmemo setup openclaw --with-mcp
xmemo setup hermes --with-mcpUse --mcp-only to skip the native integration and install only the hosted MCP
fallback.
XMemo Skill install
The CLI installs the verified XMemo Skill locally into agent skill folders or a target directory:
Installs into client skill directories:
Claude Code:
~/.claude/skills/xmemo-memory(global) or.claude/skills/xmemo-memory(project with--project)Codex:
~/.codex/skills/xmemo-memoryOpenClaw:
~/.openclaw/skills/xmemo-memoryAll other 21 clients remain
nulluntil officially documented.
Defaults to the pinned
@xmemo/skill@1.1.48release from npm and verifies tarball integrity (sha512 SRI) before extraction.Override version with
--version <semver>or explicitly opt into the latest release via--version latest.For air-gapped or offline installations, install from a local directory or packed tarball with
--from <dir|tgz>(optional--integrity <sha512>).Manage client skills with
skill status,skill update, andskill remove.Preview actions without writing files using
--dry-run.Safety & Consent:
Interactive install prompts
[y/N]before writing (Enter, EOF, or empty input cancels) unless--yesis specified.Existing installs refuse overwrite without
--force; when--forceis used, a backup is created in~/.xmemo/backups/skills/<client>/(outside the agent skills directory).skill removeonly 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-runStandalone curl & PowerShell installers
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.48
# 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 | iexPrompt 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 (openclawredirects toopenclaw skills install xmemo).Auto-detection: Automatically detects Claude Code (
CLAUDECODE=1) or Codex (CODEX_THREAD_ID,CODEX_SESSION_ID, orCODEX_HOME).Home directory discovery: If only
~/.claudeor only~/.codexexists in HOME, selects that agent.Fallback: Installs to
./xmemo-skillwith a warning on stderr explaining that AI agents will not automatically load the skill from this directory.
Safety & Replacement:
Refuses to overwrite existing installations unless
XMEMO_SKILL_FORCE=1is provided.When replacing, moves the previous installation to
~/.xmemo/backups/skills/<agent>/<name>-<timestamp>(safely outside agent skill search paths).After installation, prints the absolute install path, the verification doctor command (
node <path>/scripts/xmemo-skill.mjs doctor --anonymous), and a prompt to reload your agent.
Agent plugins
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 |
| Stable |
|
| Hermes Agent |
| Stable |
|
| Claude Code |
| Preview | Pinned Git clone verified against commit |
| Cursor |
| Preview | Cursor Marketplace plugin |
| Gemini CLI |
| Preview |
|
| Kiro |
| Preview | Steering rules & Power integration |
| VS Code |
| Preview | VS Code extension manual steps (pending marketplace publication) |
| DeepSeek DSH |
| Preview |
|
| ChatGPT / Codex |
| Preview | ChatGPT & Codex extension |
| Cindy |
| Preview | Native agent memory integration |
| Codex |
| Preview | Dedicated MCP configuration ( |
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:
Only verified plugin IDs from the static index are accepted; arbitrary URLs and unknown IDs are rejected with exit code 2.
Interactive install always displays the execution plan and requires explicit consent (
[y/N], defaulting to Cancel on empty input or EOF).--dry-runguarantees zero disk writes and zero spawned processes.Marketplace and manual plugins display exact step-by-step instructions from the plugin repository during
plugin install <id>(pass--opento open docs in browser).Git directory plugins (
claude-code) clone into a stable per-user location (~/.xmemo/plugins/<id>), support--dir <path>override, verify the checked-outHEADcommit byte-for-byte, and output the exact load command (claude --plugin-dir <dir>). On commit mismatch, the directory is immediately removed.Plugin child processes run in an isolated environment with authentication tokens (
XMEMO_KEY,MEMORY_OS_MCP_TOKEN,XMEMO_TOKEN) scrubbed from argv and env.
Account and authentication
Account commands
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 --yesSafe account logout (xmemo account logout)
Target removal: Removes only the user-scoped credential file owned by the CLI (
~/.config/xmemo/credentials.jsonor OS config root).Explicit confirmation: Displays the target credential path and prompts
Proceed with logout? [y/N](defaulting to No) unless--yesis specified.Client & Agent Isolation: Preserves all client MCP configuration files (Cursor, Claude, VS Code, etc.) and agent-managed OAuth sessions.
Privacy: Never displays or leaks token values in stdout, stderr, or JSON envelopes.
Scripting: Requires
--yeswhen--jsonis specified to prevent accidental headless logout.
Legacy authentication aliases
The legacy commands remain fully supported as backward-compatible aliases:
xmemo login(alias forxmemo account login)xmemo auth status(alias forxmemo account status)xmemo auth-status(alias forxmemo account status)xmemo token <status|add|set>(alias forxmemo 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.
Existing token import
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 --verifyPowerShell:
$xmemoToken = Read-Host "XMemo token"
$xmemoToken | xmemo account token add --from-stdin --allow-plaintext
Remove-Variable xmemoTokenFor 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.
Universal --json output
Every command and subcommand supports --json for predictable scripting:
On success: Outputs valid JSON on
stdoutwith exit code0.On error: Outputs a structured JSON error envelope
{ schemaVersion, ok: false, command, data: null, error: { code, message, ... } }onstdoutwith a non-zero exit code (e.g. exit code2for usage/input errors,1for internal/network errors).
Command reference
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 --jsonAll 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:writexmemo 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 showRun xmemo help or xmemo <command> --help for complete, version-matched
options.
Client notes
xmemo setup codex
xmemo doctor --client codex --smoke
xmemo setup cursorBoth 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 antigravityThese 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 statusThe 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 hermesThe 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 proxyCopilot 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.
Security by default
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 |
|
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 |
Package contents | An npm |
Credential precedence and compatibility aliases are documented by:
xmemo env example --shell bash
xmemo privacyFor private or self-hosted deployments, set XMEMO_URL or pass
--url <service-url>. MEMORY_OS_URL remains a compatibility alias.
Package boundary
Published to npm:
bin/
docs/assets/
src/
README.md
LICENSENot published:
.github/
docs/analysis/
docs/architecture/
docs/design/
test/
coverage/
server code
database migrations
deployment files
logs and local stateDevelopment
npm install
npm run release:check
npm run lint
npm test
npm run pack:dry-runBefore proposing a release, run the complete package gate:
npm run prepublishOnlyThe local stdio server can be inspected directly:
node bin/mcp-stdio.jsVersioning
This repository distributes two independent products with decoupled version tracks:
CLI (
@xmemo/client): Published to npm.Version source:
package.json.Tag convention:
cli-v*(legacy tags through version 0.4.181 usedv0.4.xxx).View versions on npm (@xmemo/client).
Skill (
xmemo): Published to ClawHub and distributed via xmemo.dev.Version source:
skills/xmemo/scripts/xmemo-skill.mjs(SKILL_VERSION).Tag convention:
skill-v*.View versions on ClawHub (xmemo). GitHub Releases for skill releases explicitly carry the
Latestrelease badge to support automated installer and server fallback downloads.
Release model
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 --provenanceThe CLI package and hosted MCP service intentionally have separate version streams:
CLI/npm version:
package.json,package-lock.json, and the npm package entry inserver.json.Hosted MCP/Registry version: the top-level
server.json.versionandlhm.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.
Documentation and support
Canonical service documentation lives at docs.xmemo.dev. This repository documents the client; the pages below document the hosted service it connects to.
Quickstart | |
MCP overview and per-client setup | |
Tool reference ( | |
REST API | |
Troubleshooting | |
Machine-readable index |
License
MIT © 2025–2026 Yonro
Available Tools
37 toolscomplete_memory_todoComplete XMemo memory TODOAInspect
Marks a TODO/action item completed when the user says a saved task is done, resolved, or no longer needed; its exact memory reference is shown by list_memory_todos.
Inputs: todo_id (required), note. Returns: result
create_memory_todoCreate XMemo memory TODOAInspect
Creates a TODO/action item in XMemo with an optional due time when the user asks to save a task, follow-up, action item, or reminder-style item to revisit at a later time.
Inputs: content (required), scope, bucket, due_at, +1 more. Returns: result
create_restart_snapshotCreate Restart SnapshotAInspect
Save active state, recent events, TODOs, and pending decisions for restart. Relevant before handoff or when context may be lost.
Inputs: scope, bucket, state_key, session_id, +5 more. Returns: result
dream_actionDream ActionAIdempotentInspect
Apply one Dream Workspace action the user explicitly asked for; never act on your own initiative.
accept_idea turns an idea into a todo; confirm_principle adopts a principle candidate; mute / unmute hides or restores one idea, principle or goal item; save_feed_card / save_feed_document saves a feed card or a feed edition; exclude_scope / include_scope stops or resumes Dream reading a scope in the owner's personal Dream settings. item_id is a card id from dream_view (for exclude_scope / include_scope, the scope label). Repeating an applied action returns status already_applied without a second write. Every result carries a receipt with a SHA-256 digest. Gates and protected-item checks apply; a run digest card cannot be changed.
Inputs: action (required), item_id (required), scope, payload, +2 more. Returns: result
dream_viewDream ViewAIdempotentInspect
Show the caller's Dream Workspace: ideas, goals, principles and saved feed cards, with the ids dream_action takes.
Reads the personal space, or one project's space. Feature, identity and entitlement gates apply; a closed gate returns a refusal view instead of cards. Not strictly read-only: with idea lenses on, the ideas tab first retires ideas whose todo is done or whose evidence was contradicted; with outcome events on, each shown idea, principle or saved card is logged once a day as a view impression. Memories and todos are never changed.
Inputs: tab, limit, scope, project_key. Returns: result
explain_memoryExplain XMemo memoryARead-onlyIdempotentInspect
Explains why a memory exists or matched a query whenever the user asks why something was saved there or why it was retrieved.
Inputs: memory_id (required), query, output_json, include_embedding. Returns: result
forgetForget XMemo memory or TODOADestructiveInspect
Delete one memory, TODO, or Ledger transaction by current/latest, an exact memory reference, an exact TODO ID from list_memory_todos, or an exact Ledger transaction ID. The default is a recoverable soft delete that restore_memory can undo; mode='hard' is permanent and unrecoverable; requires explicit user confirmation of permanent deletion. Ambiguous targets are resolved before deleting.
Inputs: mode, reason, target, memory_id, +3 more. Returns: result
get_mcp_identityCheck XMemo connectionARead-onlyIdempotentInspect
Checks XMemo connection status and the currently connected account/agent when the user asks whether XMemo is connected.
Inputs: no named parameters. Returns: result
get_project_contextGet project contextARead-onlyIdempotentInspect
Read one authorized project's bounded context pack: state, TODOs, decisions, timeline, recent memories, and optional durable recall. Requires memory:read; it does not mutate project memories, and access is audit-logged. Use an exact project_id for a whole-project snapshot; otherwise use recall_context. max_items/max_tokens bound the whole pack; recent_hours affects only timeline; durable_query requires include_durable_context.
Inputs: project_id (required), bucket, team_id, agent_id, +7 more. Returns: result
get_timelineGet memory timelineARead-onlyIdempotentInspect
Read authorized timeline events newest first. Requires memory:read and makes no memory changes. Use it for recent history or session resumption; use recall_context for semantic multi-memory context. limit is clamped to 1-500; session_id and event_type are exact filters.
Inputs: limit, scope, bucket, event_type, +1 more. Returns: result
link_memoriesLink MemoriesAInspect
Create a directed link from one of the caller's personal memories to another in the same space.
edge_kind says how the from memory relates to the to memory. Linking a pair that is already linked with the same kind returns that link with changed=false. Errors: NotFound (a memory is not visible to you), InvalidArgument (the same memory twice, or an unknown kind), Conflict.
Inputs: to_memory_id (required), from_memory_id (required), edge_kind.
list_memory_conflictsList Memory ConflictsARead-onlyIdempotentInspect
List conflicting/inconsistent memories. Relevant when the user/admin asks to review unresolved conflicts.
Inputs: limit, output_json, unresolved_only. Returns: result
list_memory_todosList XMemo memory TODOsARead-onlyIdempotentInspect
Lists open or completed TODO/action items as a concise text answer when the user asks how many tasks, follow-ups, or saved action items are currently pending or completed; do not use it to open, browse, filter, or manage the visual TODO workspace.
Inputs: limit, scope, bucket, due_before, +1 more. Returns: result
list_memory_versionsList Memory VersionsARead-onlyIdempotentInspect
Show version history for a memory. Relevant when the user asks for previous content or changes over time.
Inputs: memory_id (required), output_json. Returns: result
memory_relationshipsMemory RelationshipsARead-onlyIdempotentInspect
Read explicit personal links for one visible Memory; no automated analysis.
Inputs: memory_id (required), limit, cursor.
memory_statsShow XMemo memory statisticsARead-onlyIdempotentInspect
Shows aggregate statistics for all saved XMemo memories — counts by type, source, location, and optional time range when the user asks for counts, breakdowns, or distributions.
Inputs: scope, since, top_n, until, +4 more. Returns: result
propose_profile_mutationPropose Profile MutationAInspect
Propose a change to one profile field for later review; the active profile is never changed.
Stores value as a new memory in the proposals bucket at path 'profile.{field}' with metadata status 'proposed'.
Inputs: field (required), value (required), scope, team_id, +3 more. Returns: result
propose_todo_mutationPropose Todo MutationAInspect
Propose a todo mutation under the proposals bucket at path 'todos/{action}'.
Inputs: action (required), content (required), scope, team_id, +3 more. Returns: result
propose_writePropose WriteAInspect
Propose a write operation (memory, todo, profile etc.) when direct modifications are denied due to tier-gating.
Inputs: path (required), content (required), scope, bucket, +4 more. Returns: result
query_auditQuery AuditARead-onlyIdempotentInspect
Query audit records within the caller's authorized memory scope. source='events' selects action/time/target events; source='consolidation' selects consolidation/lifecycle/reflection history. This does not grant cross-user or system administration access.
Inputs: limit, scope, since, until, +5 more. Returns: result
read_memoryRead MemoryARead-onlyIdempotentInspect
Read one exact authorized XMemo memory or Document in character windows.
Use a bare memory ID (e.g. returned by recall or search) for the initial read (offset 0). The response includes 'revision' (e.g. '<memory_id>@v') and 'version'. To continue reading long content across multiple pages (when 'has_more' is True), callers MUST pass the returned 'revision' as memory_id along with 'next_offset'. This pins continuation pages to that exact snapshot and prevents torn reads if concurrent updates occur between requests. Querying with a bare memory ID always resolves to the latest active version (head), which is unpinned and subject to version tearing across updates. A Document item's reference ('document:') reads the whole Document the same way. For a Document, 'anchor' (a heading path) with 'ordinal' (1 = its first chunk) starts the page at that section; continue with 'next_offset' and no anchor. 'version' pins like a revision; a Document that changed since returns version_changed=true and no content, so restart at offset 0. Embeddings are never returned.
Inputs: memory_id (required), limit, anchor, offset, +2 more. Returns: result
recallRecall XMemo memoryARead-onlyIdempotentInspect
Recall a few relevance-ranked memories before answering, with path/type controls and optional working-memory preference. Unscoped by default: it searches all of your buckets; pass bucket to search only that bucket (never widened by fallback). Use it for a quick best-effort lookup; use recall_context when the answer needs a bounded multi-memory context pack.
Inputs: query (required), limit, since, until, +13 more. Returns: result
recall_cloud_skillRecall Cloud SkillARead-onlyIdempotentInspect
Recall reusable Cloud Skills, instructions, or sub-resources saved in XMemo. Supports Level 0 discovery by query, Level 1 root recall, and Level 2 resource recall with pinned revision_id.
Inputs: slug, query, resource, skill_id, +1 more. Returns: result
recall_contextBuild XMemo contextARead-onlyIdempotentInspect
Build a read-only, bounded context pack from multiple relevant memories. Use it when an answer needs several memory items or scoped/path-filtered context; use recall for a quick best-effort lookup or get_project_context for a whole-project snapshot. max_items/max_tokens bound output: memories that do not fit are omitted and reported, so raise max_tokens or use recall when you need the records themselves.
Inputs: query (required), limit, scope, since, +17 more. Returns: result
record_eventRecord EventAInspect
Record a significant session event, milestone, decision, or handoff note useful for reconstructing recent work. Not for durable facts/preferences (use remember).
Inputs: content (required), scope, bucket, event_type, +2 more. Returns: result
rememberRemember in XMemoAInspect
Save durable information for future recall; skip transient chat. Existing Projects paths attach automatically. The create_project compatibility input may create a missing project only when explicitly enabled. Financial records belong in a Ledger capability when this connection offers one; when it does not, tell the user instead of storing them as generic memory. Use create_memory_todo for actionable work.
Inputs: path (required), content (required), scope, bucket, +16 more. Returns: result
remove_memory_relationshipRemove Memory RelationshipAInspect
Remove one explicit link between personal memories; both memories are kept and only the link is marked removed.
Read the link with memory_relationships first and pass its relationship_id and version. A stale expected_version returns Conflict; repeating the same removal returns the removed link instead of an error.
Inputs: memory_id (required), relationship_id (required), expected_version (required).
resolve_memory_conflictResolve Memory ConflictADestructiveInspect
Resolve a listed memory conflict. Intended only for when the user/admin explicitly chooses a resolution strategy.
Inputs: conflict_id (required), merge_content, metadata_json, winning_memory_id, +1 more. Returns: result
restore_memoryRestore XMemo memoryAInspect
Restore a previously deleted memory. Intended only for when the user explicitly asks to restore or undo a deletion.
Inputs: memory_id (required), reason, metadata_json. Returns: result
restore_restart_snapshotRestore Restart SnapshotADestructiveInspect
Resume previous work from a saved snapshot. Relevant when the user asks to resume/restart or after context loss. By default it overwrites the current working state with the snapshot's state and writes a restore event to the timeline. To only inspect a snapshot, pass restore_state=false and record_restore_event=false with its snapshot_id; without a snapshot_id, when no saved snapshot matches, a new snapshot of the current working state is saved first.
Inputs: scope, bucket, state_key, snapshot_id, +5 more. Returns: result
save_cloud_skillSave Cloud SkillAInspect
Save a reusable procedure, rule, or SOP as a Cloud Skill in XMemo for future recall across connected AI agents.
Supports two usage modes (API Evolution Note: additive parameter 'url'):
Direct creation: Provide non-empty 'name' and 'instructions'.
Remote import: Provide 'url' (ClawHub slug/URL, GitHub repo/tree/raw URL, or direct HTTPS zip/markdown).
Inputs: url, name, slug, publish, +3 more. Returns: result
search_knowledgeSearch XMemo KnowledgeARead-onlyIdempotentInspect
Search authorized personal Knowledge Base content over published current revisions, or read one exact item/revision with bounded pagination. Requires knowledge:read.
Inputs: mode, alpha, query, offset, +5 more. Returns: result
update_memoryUpdate XMemo memoryADestructiveInspect
Updates the content, location, or type of a specific saved memory when the user asks to correct, revise, move, or reclassify it. An exact reference identifies the record.
Inputs: memory_id (required), path, scope, bucket, +14 more. Returns: result
update_memory_relationshipUpdate Memory RelationshipAInspect
Edit an explicit personal link kind using the last read version; stale edits conflict.
Inputs: edge_kind (required), memory_id (required), relationship_id (required), expected_version (required).
update_project_decisionUpdate Project DecisionAInspect
Transition a project decision. action must be one of: resolve, supersede, reopen. resolution is required for action='resolve'. new_context (and optionally options_json/impact_level/resolution_note) is required for action='supersede'.
Inputs: action (required), project_id (required), decision_id (required), resolution, +4 more. Returns: result
update_project_todoUpdate Project TodoAInspect
Transition a project TODO's status. action must be one of: accept, assign, block, unblock, complete, cancel. assignee_agent_id is required for action='assign'; reason is required for action='block' (optional for cancel); note is optional for action='complete'.
Inputs: action (required), todo_id (required), project_id (required), note, +2 more. Returns: result
update_stateUpdate working stateADestructiveInspect
Create or replace one scoped working-state record for resuming a task, next action, or blocker. Requires memory:write; it versions that state slot and refreshes its expiry without deleting other memories. Use remember for durable facts or record_event for history. Provide content or a structured state field; ttl_seconds=0 means no expiry.
Inputs: scope, bucket, content, state_key, +5 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 37 tools
Several clusters overlap heavily: recall/recall_context/read_memory/search_knowledge/get_project_context all retrieve content, and remember/update_state/record_event all write. The descriptions do explicitly cross-reference each other ("use recall for a quick lookup, recall_context when..."), which rescues many boundaries, but pairs like propose_write vs propose_profile_mutation vs propose_todo_mutation and link_memories vs update_memory_relationship still require careful reading.
Strong verb_noun pattern dominates: read_memory, update_memory, create_memory_todo, list_memory_versions, resolve_memory_conflict, save_cloud_skill, query_audit. A handful of bare verbs or noun-first names (recall, remember, forget, memory_stats, dream_view, update_state) deviate but remain readable and unsurprising.
37 tools is well above the comfortable range and the surface spans many sub-domains (memory CRUD, todos, projects, dreams, skills, audit, snapshots, proposals). While each area is real, the volume makes selection costly for an agent and pushes several tool families into near-duplicate territory.
Coverage is broad: full memory lifecycle (remember/update/forget/restore/versions/conflicts), todos, project decisions, snapshots, audit, cloud skills, and dream actions. Minor gaps exist — no explicit profile read despite propose_profile_mutation, and project creation only via a compatibility flag — but agents can work around them.
Maintenance
Related MCP Connectors
Universal memory for AI agents and tools. Save, organize and search context anywhere.
Persistent memory for AI agents. Semantic search, memory graph, W3C DID identity.
Hosted memory for AI agents over MCP. One memory shared by all your agents.
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
Related MCP Servers
- AlicenseBqualityCmaintenancePersistent memory engine for AI coding agents. Single Go binary, zero runtime dependencies, MCP-native. Stores, searches, and deduplicates memories across sessions using embedded SQLite with hybrid FTS + semantic search, memory decay, relation graph, and token-budget context assembly.1023MIT
- AlicenseNot gradedqualityDmaintenanceSelf-hosted semantic memory for AI agents. Save worklogs, decisions, and notes via MCP, then recall them across sessions by meaning rather than keyword. Backed by Postgres + pgvector with local embeddings (multilingual-e5-base).1MIT

mem0-mcpofficial
AlicenseAqualityDmaintenanceSelf-hosted Mem0 MCP server integrating Qdrant, Neo4j, and Ollama for semantic memory search, graph entity relationships, and memory management via OpenMemory API.64MIT- AlicenseNot gradedqualityBmaintenanceA local markdown memory and cross-agent context engine for AI coding assistants. It provides an MCP server with tools to search, add, retrieve, and distill persistent memory across tools like Claude Code, Cursor, and Zed.5MIT