@xmemo/client 0.4.169 → 0.4.170

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,6 +12,33 @@ setup helper code needed on a user's machine.
12
12
  The XMemo server, database, token registry, deployment files, logs, and
13
13
  internal scripts are not part of this npm package.
14
14
 
15
+ > 🧠 **XMemo is also an MCP Server** — give your AI agents persistent memory across sessions. See [MCP Setup](#mcp-setup) below.
16
+
17
+ ## MCP Server Overview
18
+
19
+ **XMemo** is a user-owned, hosted MCP memory service that lets AI agents persistently store, search, recall, update, and manage notes and memory fragments across sessions, projects, and tools.
20
+
21
+ - **MCP Endpoint**: `https://xmemo.dev/mcp` (Streamable HTTP)
22
+ - **Auth**: Bearer Token (`XMEMO_KEY`) or MCP OAuth
23
+ - **Tools**: `remember`, `recall`, `search_memory`, `update_memory`, `forget`, `redact_memory`, `explain_memory`, `create_memory_todo`, `list_memory_todos`, `complete_memory_todo`, `record_event`, `get_timeline`, `add_expense`
24
+ - **Clients**: Kimi, Claude, Cursor, Copilot, Gemini, Grok, Windsurf, Cline, Trae, Zed, Qwen, and more
25
+
26
+ ```json
27
+ {
28
+ "mcpServers": {
29
+ "XMemo": {
30
+ "type": "streamable-http",
31
+ "url": "https://xmemo.dev/mcp",
32
+ "headers": {
33
+ "Authorization": "Bearer ${XMEMO_KEY}"
34
+ }
35
+ }
36
+ }
37
+ }
38
+ ```
39
+
40
+ See [MCP Setup](#mcp-setup) for detailed client configuration.
41
+
15
42
  ## Install
16
43
 
17
44
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xmemo/client",
3
- "version": "0.4.169",
3
+ "version": "0.4.170",
4
4
  "description": "Privacy-first CLI and MCP setup helper for XMemo.",
5
5
  "mcpName": "io.github.yonro/xmemo",
6
6
  "type": "module",
@@ -35,9 +35,10 @@ export function mcpConfigTemplate(clientId, mcpUrl, options = {}) {
35
35
 
36
36
  const jsonDefinition = jsonMcpClientDefinition(clientId);
37
37
  if (jsonDefinition) {
38
+ const identityClientId = jsonDefinition.defaultIdentityId ?? clientId;
38
39
  return jsonDefinition.authentication === 'oauth'
39
- ? oauthJsonMcpTemplate(clientId, mcpUrl, jsonClientConfig(clientId, mcpUrl), options)
40
- : bearerJsonMcpTemplate(clientId, mcpUrl, jsonClientConfig(clientId, mcpUrl), options);
40
+ ? oauthJsonMcpTemplate(clientId, identityClientId, mcpUrl, jsonClientConfig(clientId, mcpUrl), options)
41
+ : bearerJsonMcpTemplate(clientId, identityClientId, mcpUrl, jsonClientConfig(clientId, mcpUrl), options);
41
42
  }
42
43
 
43
44
  return {
@@ -112,7 +113,7 @@ export function agentInstanceGenerationPolicy(clientId, options = {}) {
112
113
  };
113
114
  }
114
115
 
115
- function bearerJsonMcpTemplate(clientId, mcpUrl, snippet, options) {
116
+ function bearerJsonMcpTemplate(clientId, identityClientId, mcpUrl, snippet, options) {
116
117
  return {
117
118
  client: clientId,
118
119
  serverName: MCP_SERVER_NAME,
@@ -122,7 +123,7 @@ function bearerJsonMcpTemplate(clientId, mcpUrl, snippet, options) {
122
123
  optionalEnv: [AGENT_INSTANCE_ENV_VAR],
123
124
  authentication: 'env-bearer',
124
125
  agentIdentity: {
125
- agentId: clientId,
126
+ agentId: identityClientId,
126
127
  agentIdHeader: AGENT_ID_HEADER,
127
128
  agentInstanceEnvVar: AGENT_INSTANCE_ENV_VAR,
128
129
  agentInstanceHeader: AGENT_INSTANCE_HEADER
@@ -133,7 +134,7 @@ function bearerJsonMcpTemplate(clientId, mcpUrl, snippet, options) {
133
134
  };
134
135
  }
135
136
 
136
- function oauthJsonMcpTemplate(clientId, mcpUrl, snippet, options) {
137
+ function oauthJsonMcpTemplate(clientId, identityClientId, mcpUrl, snippet, options) {
137
138
  return {
138
139
  client: clientId,
139
140
  serverName: MCP_SERVER_NAME,
@@ -143,7 +144,7 @@ function oauthJsonMcpTemplate(clientId, mcpUrl, snippet, options) {
143
144
  optionalEnv: [AGENT_INSTANCE_ENV_VAR],
144
145
  authentication: 'oauth',
145
146
  agentIdentity: {
146
- agentId: clientId,
147
+ agentId: identityClientId,
147
148
  agentIdHeader: AGENT_ID_HEADER,
148
149
  agentInstanceEnvVar: AGENT_INSTANCE_ENV_VAR,
149
150
  agentInstanceHeader: AGENT_INSTANCE_HEADER
@@ -153,4 +154,3 @@ function oauthJsonMcpTemplate(clientId, mcpUrl, snippet, options) {
153
154
  writesTokenValue: false
154
155
  };
155
156
  }
156
-
@@ -22,9 +22,9 @@ export const JSON_MCP_CLIENT_DEFINITIONS = Object.freeze([
22
22
  httpClientDefinition('cursor', 'Cursor', 'defaultCursorConfigPath', { urlKey: 'url', authentication: 'env-bearer' }),
23
23
  httpClientDefinition('gemini-cli', 'Gemini CLI', 'defaultGeminiConfigPath', { urlKey: 'httpUrl', authentication: 'oauth' }),
24
24
  httpClientDefinition('antigravity', 'Antigravity', 'defaultAntigravityConfigPath', { urlKey: 'serverUrl', authentication: 'oauth' }),
25
- httpClientDefinition('antigravity-ide', 'Antigravity IDE', 'defaultAntigravityIdeConfigPath', { urlKey: 'url', authentication: 'oauth', defaultIdentityId: 'antigravity', extra: { type: 'http' } }),
26
- httpClientDefinition('antigravity2', 'Antigravity 2.0', 'defaultAntigravity2ConfigPath', { urlKey: 'url', authentication: 'oauth', defaultIdentityId: 'antigravity', extra: { type: 'http' } }),
27
- httpClientDefinition('antigravity-cli', 'Antigravity CLI', 'defaultAntigravityCliConfigPath', { urlKey: 'httpUrl', authentication: 'oauth', defaultIdentityId: 'antigravity' }),
25
+ httpClientDefinition('antigravity-ide', 'Antigravity IDE', 'defaultAntigravityIdeConfigPath', { urlKey: 'serverUrl', authentication: 'oauth', defaultIdentityId: 'antigravity' }),
26
+ httpClientDefinition('antigravity2', 'Antigravity 2.0', 'defaultAntigravity2ConfigPath', { urlKey: 'serverUrl', authentication: 'oauth', defaultIdentityId: 'antigravity' }),
27
+ httpClientDefinition('antigravity-cli', 'Antigravity CLI', 'defaultAntigravityCliConfigPath', { urlKey: 'serverUrl', authentication: 'oauth', defaultIdentityId: 'antigravity' }),
28
28
  httpClientDefinition('windsurf', 'Windsurf', 'defaultWindsurfConfigPath', { urlKey: 'serverUrl', authentication: 'env-bearer' }),
29
29
  httpClientDefinition('cline', 'Cline', 'defaultClineConfigPath', { urlKey: 'httpUrl', authentication: 'env-bearer' }),
30
30
  nestedTransportClientDefinition('continue', 'Continue', 'defaultContinueConfigPath'),