Use XMemo as a shared memory home for AI assistants: connect a client, save useful context once, recall it later, and keep credentials out of public configuration.
# Quickstart for XMemo
Hosted XMemo quickstart for connecting MCP clients, CLIs, IDEs, and autonomous agents without putting bearer tokens in public configuration.
- CLI package: @xmemo/client
- Service URL: https://xmemo.dev
- MCP URL: https://xmemo.dev/mcp
- Setup command: npx @xmemo/client setup --url https://xmemo.dev
- Direct MCP token environment variable: XMEMO_KEY
- OAuth-supported clients: ChatGPT, VS Code / GitHub Copilot
- Persona flows: ChatGPT user, Copilot/Codex developer, team pilot owner, autonomous agent operator
- Autonomous agent preset: OAuth-first when supported; XMEMO_KEY fallback for headless runners; runner-generated XMEMO_AGENT_INSTANCE_ID required
- Supported MCP clients: chatgpt, vscode, copilot-cli, codex, gemini-cli, cursor, autonomous-agent, generic
- MCP chapter: per-client setup snippets and hosted streamable-http boundary
- Skills chapter: standalone Skill runtime, device login, and direct HTTPS operations
- SDK helpers: taskStart, taskEnd, recordDecision, recordBugFix, recordCorrection, recordEvent
- Safety guarantees: manual config review, environment-variable secrets, no token in generated URLs
## Hosted XMemo quickstart
Start with the managed XMemo service and one of these connection paths. Self-hosted, Docker, Supabase, and Python package setup are developer references, not the first path for hosted users.
- OAuth clients: https://xmemo.dev/mcp (memory:read memory:write)
- @xmemo/client setup: npx @xmemo/client setup --url https://xmemo.dev
- Direct MCP with XMEMO_KEY: https://xmemo.dev/mcp
## Memory Console controls
XMemo is not only an MCP endpoint. The Memory Console is the user-facing place to review, correct, remove, and export memory while keeping agent attribution visible.
- View and search memory
- Edit or correct entries
- Delete and export
- Agent attribution
- Privacy and credential controls
## FAQ / Troubleshooting
Use these answers when a user or marketplace reviewer gets blocked. Every answer includes an action step and a safety boundary.
Supported MCP clients
VS Code / GitHub Copilot
%APPDATA%\Code\User\mcp.json
OAuth client: keep only the hosted server URL in mcp.json; first tool call opens browser OAuth, so no XMEMO_KEY or Authorization header belongs in this file.
{
"servers": {
"XMemo": {
"type": "http",
"url": "https://xmemo.dev/mcp"
}
}
}
ChatGPT / OpenAI Apps SDK
OpenAI Platform app management dashboard
OAuth marketplace lane: configure the hosted MCP URL and OAuth metadata in the OpenAI app dashboard; never paste XMEMO_KEY or Bearer tokens into the listing.
{
"mcpServers": {
"XMemo": {
"url": "https://xmemo.dev/mcp",
"transport": "streamable-http",
"auth": {
"type": "oauth2",
"resource": "https://xmemo.dev/mcp",
"scopes": ["memory:read", "memory:write"]
}
}
}
}
Claude Code / Claude Desktop
Claude MCP settings
Direct client: Claude Code can use the same hosted MCP URL with XMEMO_KEY from the local environment or secret store; set XMEMO_AGENT_INSTANCE_ID once per local install for stable attribution.
{
"mcpServers": {
"XMemo": {
"type": "http",
"url": "https://xmemo.dev/mcp",
"headers": {
"Authorization": "Bearer ${env:XMEMO_KEY}",
"X-Memory-OS-Agent-ID": "claude",
"X-Memory-OS-Agent-Instance-ID": "${env:XMEMO_AGENT_INSTANCE_ID}"
}
}
}
}
Copilot CLI
~/.copilot/mcp-config.json
Direct client: set XMEMO_KEY in the user environment or a supported secret reference, then replace the stable instance placeholder before applying the reviewed config.
{
"mcpServers": {
"XMemo": {
"type": "http",
"url": "https://xmemo.dev/mcp",
"tools": ["*"],
"timeout": 30000,
"headers": {
"Authorization": "Bearer <replace-with-XMEMO_KEY-or-supported-secret-reference>",
"X-Memory-OS-Agent-ID": "copilot-cli",
"X-Memory-OS-Agent-Instance-ID": "<stable-local-copilot-cli-instance-id>"
}
}
}
}
Codex
~/.codex/config.toml
Direct client: Codex reads XMEMO_KEY through bearer_token_env_var and sends non-secret identity headers. Run npx @xmemo/client mcp add codex --write to generate the stable XMEMO_AGENT_INSTANCE_ID automatically.
[mcp_servers.XMemo]
url = "https://xmemo.dev/mcp"
bearer_token_env_var = "XMEMO_KEY"
http_headers = { "X-Memory-OS-Agent-ID" = "codex" }
env_http_headers = { "X-Memory-OS-Agent-Instance-ID" = "XMEMO_AGENT_INSTANCE_ID" }
Gemini CLI
~/.gemini/settings.json
OAuth client: merge this XMemo block into settings.json, set one stable XMEMO_AGENT_INSTANCE_ID for local attribution, then restart Gemini CLI and complete MCP OAuth. Do not add Authorization or XMEMO_KEY to this snippet.
{
"mcpServers": {
"XMemo": {
"httpUrl": "https://xmemo.dev/mcp",
"headers": {
"X-Memory-OS-Agent-ID": "gemini-cli",
"X-Memory-OS-Agent-Instance-ID": "${env:XMEMO_AGENT_INSTANCE_ID}"
}
}
}
}
Cursor
Cursor Settings -> MCP
OAuth client: Cursor marketplace and Settings -> MCP installs should store only the hosted server URL; first use opens browser OAuth, so no XMEMO_KEY or Authorization header belongs in the marketplace plugin.
{
"mcpServers": {
"XMemo": {
"type": "http",
"url": "https://xmemo.dev/mcp"
}
}
}
Autonomous agent
Agent runner MCP config
OAuth-first self-config preset: fetch /api/v1/mcp/config/autonomous-agent, use auth_modes.oauth when the runner supports OAuth + custom headers, fall back to auth_modes.xmemo_key for headless runners, and never ask the human for agent_id or instance_id.
{
"mcpServers": {
"XMemo": {
"type": "http",
"transport": "streamable-http",
"url": "https://xmemo.dev/mcp",
"headers": {
"X-Memory-OS-Agent-ID": "autonomous-agent",
"X-Memory-OS-Agent-Instance-ID": "${XMEMO_AGENT_INSTANCE_ID}"
},
"auth": {
"type": "oauth2",
"flow": "authorization_code",
"pkce_required": true,
"resource": "https://xmemo.dev/mcp",
"scopes": ["memory:read", "memory:write"]
},
"fallback": {
"use_when": "headless runner cannot complete OAuth sign-in or persist OAuth tokens",
"authorization_header": "Bearer ${XMEMO_KEY}"
}
}
}
}
Other
Any MCP-capable agent
Generic direct client: the client must support streamable-http and Authorization headers; set XMEMO_AGENT_ID and a stable XMEMO_AGENT_INSTANCE_ID only for non-secret attribution.
{
"mcpServers": {
"XMemo": {
"transport": "streamable-http",
"url": "https://xmemo.dev/mcp",
"headers": {
"Authorization": "Bearer ${XMEMO_KEY}",
"X-Memory-OS-Agent-ID": "${XMEMO_AGENT_ID}",
"X-Memory-OS-Agent-Instance-ID": "${XMEMO_AGENT_INSTANCE_ID}"
}
}
}
}