@slorenzot/memento-mcp-server 2.0.8 → 2.1.0
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.es.md +289 -277
- package/README.md +265 -253
- package/dist/index.js +3 -3
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +65 -3
- package/dist/tools.js.map +1 -1
- package/package.json +2 -2
- package/skills/memento/SKILL.md +315 -66
package/README.es.md
CHANGED
|
@@ -5,443 +5,441 @@
|
|
|
5
5
|
[](https://www.typescriptlang.org/)
|
|
6
6
|
[](https://modelcontextprotocol.io)
|
|
7
7
|
|
|
8
|
-
> Model Context Protocol (MCP)
|
|
8
|
+
> Servidor Model Context Protocol (MCP) con 24 herramientas de memoria para integracion de agentes de IA con Claude Desktop, VS Code, OpenCode y otros clientes MCP.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Instalacion
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
#
|
|
13
|
+
# Usando Bun (recomendado)
|
|
14
14
|
bun add @slorenzot/memento-mcp-server
|
|
15
15
|
|
|
16
|
-
#
|
|
16
|
+
# Usando npm
|
|
17
17
|
npm install @slorenzot/memento-mcp-server
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## Uso Basico
|
|
21
21
|
|
|
22
|
-
###
|
|
23
|
-
```typescript
|
|
24
|
-
import { MCPServer } from '@slorenzot/memento-mcp-server';
|
|
22
|
+
### Shell
|
|
25
23
|
|
|
26
|
-
// Inicializar servidor MCP
|
|
27
|
-
const server = new MCPServer('./data/memento.db');
|
|
28
|
-
|
|
29
|
-
// Iniciar servidor (usa stdio para comunicación MCP)
|
|
30
|
-
// Nota: Este servidor está diseñado para ser ejecutado por clientes MCP
|
|
31
|
-
// No es necesario llamar start() manualmente en producción
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### Shell/Bun
|
|
35
24
|
```bash
|
|
36
25
|
# Ejecutar servidor MCP (recomendado)
|
|
37
|
-
npx -p @slorenzot/memento-mcp-server
|
|
38
|
-
|
|
39
|
-
# O usando bunx (si está instalado globalmente)
|
|
40
26
|
bunx @slorenzot/memento-mcp-server
|
|
41
27
|
|
|
42
|
-
# Usar con
|
|
43
|
-
MEMENTO_DB_PATH=/
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## 🔧 API Esencial
|
|
47
|
-
|
|
48
|
-
### Clase Principal
|
|
49
|
-
|
|
50
|
-
#### `MCPServer(dbPath?: string)`
|
|
51
|
-
|
|
52
|
-
Constructor del servidor MCP con integración automática al motor de memoria.
|
|
53
|
-
|
|
54
|
-
**Parámetros:**
|
|
55
|
-
- `dbPath` (opcional): Ruta al archivo de base de datos. Default: `'./data/memento.db'`
|
|
56
|
-
|
|
57
|
-
**Ejemplo:**
|
|
58
|
-
```typescript
|
|
59
|
-
const server = new MCPServer('./custom/path.db');
|
|
28
|
+
# Usar con ruta personalizada de base de datos
|
|
29
|
+
MEMENTO_DB_PATH=/ruta/personalizada/database.db bunx @slorenzot/memento-mcp-server
|
|
60
30
|
```
|
|
61
31
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
#### Métodos de Control
|
|
65
|
-
|
|
66
|
-
##### `start()`
|
|
67
|
-
|
|
68
|
-
Inicia el servidor MCP y comienza a escuchar solicitudes MCP via stdio.
|
|
69
|
-
|
|
70
|
-
**Retorna:** `Promise<void>`
|
|
71
|
-
|
|
72
|
-
**Nota:** Este método es llamado automáticamente cuando el servidor se inicia como proceso independiente.
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
##### `close()`
|
|
77
|
-
|
|
78
|
-
Detiene el servidor MCP y cierra la conexión con la base de datos.
|
|
79
|
-
|
|
80
|
-
**Retorna:** `void`
|
|
32
|
+
### TypeScript
|
|
81
33
|
|
|
82
|
-
**Ejemplo:**
|
|
83
34
|
```typescript
|
|
84
|
-
|
|
35
|
+
import { MCPServer } from '@slorenzot/memento-mcp-server';
|
|
85
36
|
|
|
86
|
-
|
|
87
|
-
|
|
37
|
+
const server = new MCPServer('./data/memento.db');
|
|
38
|
+
// El servidor usa stdio para comunicacion MCP
|
|
39
|
+
// Disenado para ser ejecutado por clientes MCP
|
|
88
40
|
```
|
|
89
41
|
|
|
90
|
-
|
|
42
|
+
## Herramientas MCP Disponibles
|
|
91
43
|
|
|
92
|
-
|
|
44
|
+
El servidor proporciona 24 herramientas MCP organizadas por categoria:
|
|
93
45
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
### Gestión de Observaciones
|
|
46
|
+
### Core — Observaciones
|
|
97
47
|
|
|
98
48
|
#### `mem_save`
|
|
99
|
-
Guarda una nueva observación en la memoria.
|
|
100
49
|
|
|
101
|
-
|
|
50
|
+
Guarda una observacion en memoria persistente. Llama PROACTIVAMENTE despues de tomar decisiones, corregir bugs o descubrir algo no obvio.
|
|
51
|
+
|
|
52
|
+
**Parametros:**
|
|
102
53
|
```typescript
|
|
103
54
|
{
|
|
104
|
-
title: string;
|
|
105
|
-
content: string;
|
|
106
|
-
type?: 'decision' | 'bug' | 'discovery' | 'note'
|
|
107
|
-
|
|
108
|
-
|
|
55
|
+
title: string; // Titulo corto y buscable
|
|
56
|
+
content: string; // Estructurado: Que/Porque/Donde/Aprendido
|
|
57
|
+
type?: 'decision' | 'bug' | 'discovery' | 'note' | 'summary' |
|
|
58
|
+
'learning' | 'pattern' | 'architecture' | 'config' | 'preference';
|
|
59
|
+
topic_key?: string; // Clave estable para agrupar (ej. "architecture/auth")
|
|
60
|
+
project_id?: string; // Identificador del proyecto
|
|
109
61
|
metadata?: Record<string, unknown>;
|
|
62
|
+
scope?: 'project' | 'personal'; // Alcance (por defecto: project)
|
|
63
|
+
pinned?: boolean; // Fijar para inyeccion en system prompt
|
|
64
|
+
read_only?: boolean; // Marcar como solo lectura
|
|
110
65
|
}
|
|
111
66
|
```
|
|
112
67
|
|
|
113
|
-
**Ejemplo de uso:**
|
|
114
|
-
```typescript
|
|
115
|
-
await mem_save({
|
|
116
|
-
title: 'Decisión de arquitectura',
|
|
117
|
-
content: 'Usar PostgreSQL en lugar de MySQL',
|
|
118
|
-
type: 'decision',
|
|
119
|
-
project_id: 'my-project'
|
|
120
|
-
});
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
---
|
|
124
|
-
|
|
125
68
|
#### `mem_search`
|
|
126
|
-
Busca observaciones usando búsqueda full-text.
|
|
127
69
|
|
|
128
|
-
|
|
70
|
+
Busca observaciones usando busqueda full-text (FTS5). Los resultados estan TRUNCADOS — usa `mem_get_observation` para contenido completo.
|
|
71
|
+
|
|
72
|
+
**Parametros:**
|
|
129
73
|
```typescript
|
|
130
74
|
{
|
|
131
75
|
query?: string;
|
|
132
|
-
type?:
|
|
76
|
+
type?: /* 10 tipos de observacion */;
|
|
133
77
|
project_id?: string;
|
|
134
78
|
topic_key?: string;
|
|
135
|
-
limit?: number;
|
|
79
|
+
limit?: number; // Por defecto: 10
|
|
136
80
|
offset?: number;
|
|
81
|
+
include_deleted?: boolean;
|
|
82
|
+
scope?: 'project' | 'personal';
|
|
83
|
+
sort?: 'relevance' | 'chronological'; // Por defecto: relevance
|
|
84
|
+
mode?: 'keyword' | 'semantic' | 'hybrid'; // Por defecto: keyword
|
|
137
85
|
}
|
|
138
86
|
```
|
|
139
87
|
|
|
140
|
-
---
|
|
141
|
-
|
|
142
88
|
#### `mem_get_observation`
|
|
143
|
-
Obtiene una observación específica por ID.
|
|
144
89
|
|
|
145
|
-
|
|
90
|
+
Obtiene el contenido completo de una observacion especifica por ID.
|
|
91
|
+
|
|
92
|
+
**Parametros:**
|
|
146
93
|
```typescript
|
|
147
94
|
{
|
|
148
95
|
id: number;
|
|
96
|
+
include_deleted?: boolean;
|
|
149
97
|
}
|
|
150
98
|
```
|
|
151
99
|
|
|
152
|
-
---
|
|
153
|
-
|
|
154
100
|
#### `mem_update`
|
|
155
|
-
Actualiza una observación existente.
|
|
156
101
|
|
|
157
|
-
|
|
102
|
+
Actualiza una observacion existente. Solo los campos proporcionados seran actualizados.
|
|
103
|
+
|
|
104
|
+
**Parametros:**
|
|
158
105
|
```typescript
|
|
159
106
|
{
|
|
160
107
|
id: number;
|
|
161
108
|
title?: string;
|
|
162
109
|
content?: string;
|
|
163
|
-
type?:
|
|
110
|
+
type?: /* 10 tipos de observacion */;
|
|
164
111
|
topic_key?: string;
|
|
165
|
-
|
|
112
|
+
pinned?: boolean;
|
|
166
113
|
}
|
|
167
114
|
```
|
|
168
115
|
|
|
169
|
-
|
|
116
|
+
#### `mem_replace`
|
|
170
117
|
|
|
171
|
-
|
|
172
|
-
Elimina una observación por ID.
|
|
118
|
+
Reemplaza un substring dentro de una observacion. Mas eficiente en tokens que `mem_update` para cambios pequenos. Respeta la proteccion de solo lectura.
|
|
173
119
|
|
|
174
|
-
**
|
|
120
|
+
**Parametros:**
|
|
175
121
|
```typescript
|
|
176
122
|
{
|
|
177
123
|
id: number;
|
|
124
|
+
old_text: string; // Debe ser unico en el contenido
|
|
125
|
+
new_text: string;
|
|
178
126
|
}
|
|
179
127
|
```
|
|
180
128
|
|
|
181
|
-
|
|
129
|
+
### Ciclo de Vida
|
|
182
130
|
|
|
183
|
-
|
|
131
|
+
#### `mem_delete`
|
|
184
132
|
|
|
185
|
-
|
|
186
|
-
Inicia una nueva sesión para seguimiento de conversaciones.
|
|
133
|
+
Gestion consolidada del ciclo de vida de observaciones.
|
|
187
134
|
|
|
188
|
-
**
|
|
135
|
+
**Parametros:**
|
|
189
136
|
```typescript
|
|
190
137
|
{
|
|
191
|
-
|
|
192
|
-
|
|
138
|
+
id?: number; // Requerido para soft/restore
|
|
139
|
+
action?: 'soft' | 'permanent' | 'restore' | 'list'; // Por defecto: soft
|
|
140
|
+
reason?: string; // Para accion soft
|
|
141
|
+
confirm?: boolean; // Requerido para permanent
|
|
142
|
+
project_id?: string; // Para list/permanent
|
|
143
|
+
observation_ids?: number[]; // IDs especificos a purgar
|
|
144
|
+
limit?: number; // Para accion list
|
|
193
145
|
}
|
|
194
146
|
```
|
|
195
147
|
|
|
196
|
-
|
|
148
|
+
#### `mem_merge`
|
|
197
149
|
|
|
198
|
-
|
|
199
|
-
Finaliza una sesión activa.
|
|
150
|
+
Fusiona observaciones relacionadas en un solo registro. SIEMPRE usar `dry_run: true` primero.
|
|
200
151
|
|
|
201
|
-
**
|
|
152
|
+
**Parametros:**
|
|
202
153
|
```typescript
|
|
203
154
|
{
|
|
204
|
-
|
|
155
|
+
project_id: string;
|
|
156
|
+
topic_key?: string;
|
|
157
|
+
observation_ids?: number[];
|
|
158
|
+
strategy?: 'by_topic' | 'by_similarity' | 'by_ids';
|
|
159
|
+
dry_run?: boolean;
|
|
205
160
|
}
|
|
206
161
|
```
|
|
207
162
|
|
|
208
|
-
|
|
163
|
+
#### `mem_export`
|
|
209
164
|
|
|
210
|
-
|
|
211
|
-
Lista todas las sesiones del proyecto.
|
|
165
|
+
Exporta observaciones a JSON, XML o TXT.
|
|
212
166
|
|
|
213
|
-
**
|
|
167
|
+
**Parametros:**
|
|
214
168
|
```typescript
|
|
215
169
|
{
|
|
170
|
+
format?: 'json' | 'xml' | 'txt';
|
|
216
171
|
project_id?: string;
|
|
217
|
-
|
|
218
|
-
|
|
172
|
+
type?: /* 10 tipos de observacion */;
|
|
173
|
+
topic_key?: string;
|
|
174
|
+
date_from?: string;
|
|
175
|
+
date_to?: string;
|
|
176
|
+
include_deleted?: boolean;
|
|
219
177
|
}
|
|
220
178
|
```
|
|
221
179
|
|
|
222
|
-
|
|
180
|
+
### Pin & Lock
|
|
223
181
|
|
|
224
|
-
#### `
|
|
225
|
-
Obtiene una sesión específica.
|
|
182
|
+
#### `mem_pin`
|
|
226
183
|
|
|
227
|
-
|
|
228
|
-
```typescript
|
|
229
|
-
{
|
|
230
|
-
id: number;
|
|
231
|
-
}
|
|
232
|
-
```
|
|
184
|
+
Fija una observacion para inyeccion permanente en system prompt.
|
|
233
185
|
|
|
234
|
-
|
|
186
|
+
**Parametros:** `{ id: number }`
|
|
235
187
|
|
|
236
|
-
|
|
188
|
+
#### `mem_unpin`
|
|
189
|
+
|
|
190
|
+
Elimina la observacion de la inyeccion en system prompt.
|
|
191
|
+
|
|
192
|
+
**Parametros:** `{ id: number }`
|
|
193
|
+
|
|
194
|
+
#### `mem_lock`
|
|
195
|
+
|
|
196
|
+
Marca la observacion como solo lectura (previene modificaciones del agente).
|
|
197
|
+
|
|
198
|
+
**Parametros:** `{ id: number }`
|
|
199
|
+
|
|
200
|
+
#### `mem_unlock`
|
|
201
|
+
|
|
202
|
+
Permite modificaciones en una observacion bloqueada.
|
|
203
|
+
|
|
204
|
+
**Parametros:** `{ id: number }`
|
|
205
|
+
|
|
206
|
+
### Gestion de Sesiones
|
|
207
|
+
|
|
208
|
+
#### `mem_session_start`
|
|
237
209
|
|
|
238
|
-
|
|
239
|
-
Obtiene una línea temporal de observaciones.
|
|
210
|
+
Inicia una nueva sesion de memoria. Cierra automaticamente sesiones obsoletas del proyecto.
|
|
240
211
|
|
|
241
|
-
**
|
|
212
|
+
**Parametros:**
|
|
242
213
|
```typescript
|
|
243
214
|
{
|
|
244
215
|
project_id?: string;
|
|
245
|
-
|
|
246
|
-
limit?: number;
|
|
247
|
-
offset?: number;
|
|
216
|
+
metadata?: Record<string, unknown>;
|
|
248
217
|
}
|
|
249
218
|
```
|
|
250
219
|
|
|
251
|
-
|
|
220
|
+
#### `mem_session_end`
|
|
252
221
|
|
|
253
|
-
|
|
254
|
-
Obtiene estadísticas del sistema de memoria.
|
|
222
|
+
Finaliza la sesion activa. Llama ANTES de cerrar una conversacion.
|
|
255
223
|
|
|
256
|
-
**
|
|
224
|
+
**Parametros:** `{}`
|
|
257
225
|
|
|
258
|
-
|
|
226
|
+
#### `mem_session_summary`
|
|
259
227
|
|
|
260
|
-
|
|
261
|
-
Importa observaciones desde JSON.
|
|
228
|
+
Guarda un resumen estructurado de sesion (Objetivo/Descubrimientos/Logros/Archivos). Usa esta herramienta NATIVA en lugar de `mem_save` con tipo "summary".
|
|
262
229
|
|
|
263
|
-
**
|
|
230
|
+
**Parametros:**
|
|
264
231
|
```typescript
|
|
265
232
|
{
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
type?: string;
|
|
270
|
-
project_id?: string;
|
|
271
|
-
}>;
|
|
233
|
+
content: string; // Estructurado: Objetivo/Descubrimientos/Logros/Archivos
|
|
234
|
+
project_id?: string;
|
|
235
|
+
session_id?: number;
|
|
272
236
|
}
|
|
273
237
|
```
|
|
274
238
|
|
|
275
|
-
|
|
239
|
+
#### `mem_context`
|
|
276
240
|
|
|
277
|
-
|
|
278
|
-
Exporta observaciones a JSON.
|
|
241
|
+
Recuperacion rapida de contexto. Retorna observaciones recientes ordenadas por created_at DESC. NO usa FTS5.
|
|
279
242
|
|
|
280
|
-
**
|
|
243
|
+
**Parametros:**
|
|
281
244
|
```typescript
|
|
282
245
|
{
|
|
283
246
|
project_id?: string;
|
|
284
|
-
|
|
285
|
-
|
|
247
|
+
limit?: number; // Por defecto: 20
|
|
248
|
+
scope?: 'project' | 'personal';
|
|
286
249
|
}
|
|
287
250
|
```
|
|
288
251
|
|
|
289
|
-
|
|
252
|
+
### Captura
|
|
290
253
|
|
|
291
|
-
|
|
254
|
+
#### `mem_capture_passive`
|
|
292
255
|
|
|
293
|
-
|
|
294
|
-
Verifica el estado del sistema de memoria.
|
|
256
|
+
Analiza texto para extraer aprendizajes de secciones "## Key Learnings:" o "## Aprendizajes Clave:". Deduplica por similitud Jaccard.
|
|
295
257
|
|
|
296
|
-
**
|
|
258
|
+
**Parametros:**
|
|
259
|
+
```typescript
|
|
260
|
+
{
|
|
261
|
+
content: string;
|
|
262
|
+
project_id?: string;
|
|
263
|
+
session_id?: number;
|
|
264
|
+
source?: string;
|
|
265
|
+
}
|
|
266
|
+
```
|
|
297
267
|
|
|
298
|
-
|
|
268
|
+
### Diagnostico
|
|
299
269
|
|
|
300
|
-
#### `
|
|
301
|
-
Obtiene la configuración actual del servidor.
|
|
270
|
+
#### `mem_status`
|
|
302
271
|
|
|
303
|
-
|
|
272
|
+
Herramienta de diagnostico compuesta. Reemplaza `mem_stats`, `mem_health`, `mem_config`, `mem_list_sessions`, `mem_get_session`.
|
|
304
273
|
|
|
305
|
-
|
|
274
|
+
**Parametros:**
|
|
275
|
+
```typescript
|
|
276
|
+
{
|
|
277
|
+
section?: 'all' | 'health' | 'stats' | 'config' | 'sessions';
|
|
278
|
+
session_id?: number; // Obtener detalles de sesion especifica
|
|
279
|
+
project_id?: string; // Filtrar sesiones por proyecto
|
|
280
|
+
limit?: number; // Maximo de sesiones (por defecto: 20)
|
|
281
|
+
}
|
|
282
|
+
```
|
|
306
283
|
|
|
307
|
-
|
|
284
|
+
### Journal — Audit Trail
|
|
308
285
|
|
|
309
|
-
|
|
286
|
+
#### `mem_journal_write`
|
|
310
287
|
|
|
311
|
-
|
|
288
|
+
Crea una entrada de journal inmutable. Las entradas no pueden editarse ni eliminarse. Usa `supersedes` para corregir entradas anteriores.
|
|
289
|
+
|
|
290
|
+
**Parametros:**
|
|
291
|
+
```typescript
|
|
312
292
|
{
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
}
|
|
293
|
+
title: string;
|
|
294
|
+
body: string;
|
|
295
|
+
tags?: string[];
|
|
296
|
+
project_id?: string;
|
|
297
|
+
supersedes?: number;
|
|
298
|
+
metadata?: Record<string, unknown>;
|
|
322
299
|
}
|
|
323
300
|
```
|
|
324
301
|
|
|
325
|
-
|
|
302
|
+
#### `mem_journal_read`
|
|
326
303
|
|
|
327
|
-
|
|
328
|
-
import { MCPServer } from '@slorenzot/memento-mcp-server';
|
|
329
|
-
|
|
330
|
-
// Crear servidor personalizado
|
|
331
|
-
const server = new MCPServer('./memory.db');
|
|
304
|
+
Lee una entrada de journal por ID.
|
|
332
305
|
|
|
333
|
-
|
|
334
|
-
// cuando sea ejecutado por un cliente MCP
|
|
306
|
+
**Parametros:** `{ id: number }`
|
|
335
307
|
|
|
336
|
-
|
|
337
|
-
const toolResult = await server.handleToolCall('mem_save', {
|
|
338
|
-
title: 'Test observación',
|
|
339
|
-
content: 'Contenido de prueba',
|
|
340
|
-
type: 'note',
|
|
341
|
-
project_id: 'test-project'
|
|
342
|
-
});
|
|
308
|
+
#### `mem_journal_search`
|
|
343
309
|
|
|
344
|
-
|
|
310
|
+
Busca entradas de journal con FTS5, tags y filtros de fecha.
|
|
345
311
|
|
|
346
|
-
|
|
347
|
-
|
|
312
|
+
**Parametros:**
|
|
313
|
+
```typescript
|
|
314
|
+
{
|
|
315
|
+
query?: string;
|
|
316
|
+
tags?: string[];
|
|
317
|
+
project_id?: string;
|
|
318
|
+
active_only?: boolean; // Excluir entradas reemplazadas
|
|
319
|
+
date_from?: string;
|
|
320
|
+
date_to?: string;
|
|
321
|
+
limit?: number;
|
|
322
|
+
offset?: number;
|
|
323
|
+
}
|
|
348
324
|
```
|
|
349
325
|
|
|
350
|
-
###
|
|
326
|
+
### Sync — Nube
|
|
351
327
|
|
|
352
|
-
|
|
353
|
-
// Usando herramientas MCP a través del servidor
|
|
328
|
+
#### `mem_sync_status`
|
|
354
329
|
|
|
355
|
-
|
|
356
|
-
const sessionStart = await mem_session_start({
|
|
357
|
-
project_id: 'my-app',
|
|
358
|
-
metadata: { agent: 'claude' }
|
|
359
|
-
});
|
|
330
|
+
Verifica el estado de autenticacion de sync y metadatos de la ultima sincronizacion.
|
|
360
331
|
|
|
361
|
-
|
|
332
|
+
**Parametros:** `{}`
|
|
362
333
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
content: 'Servidor configurado en puerto 3000',
|
|
367
|
-
type: 'decision',
|
|
368
|
-
project_id: 'my-app'
|
|
369
|
-
});
|
|
334
|
+
#### `mem_sync_project`
|
|
335
|
+
|
|
336
|
+
Sincronizacion bidireccional con memento-hub. Primera vez: retorna URL de verificacion y codigo de usuario.
|
|
370
337
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
338
|
+
**Parametros:**
|
|
339
|
+
```typescript
|
|
340
|
+
{
|
|
341
|
+
project_id: string;
|
|
342
|
+
device_code?: string; // Reanudar auth despues de que el usuario autoriza
|
|
343
|
+
}
|
|
344
|
+
```
|
|
376
345
|
|
|
377
|
-
|
|
346
|
+
#### `mem_logout`
|
|
378
347
|
|
|
379
|
-
|
|
380
|
-
await mem_session_end({ id: sessionStart.id });
|
|
348
|
+
Limpia el token de sincronizacion. El agente necesitara re-autenticarse.
|
|
381
349
|
|
|
382
|
-
|
|
383
|
-
const stats = await mem_stats();
|
|
384
|
-
console.log('Total observaciones:', stats.total);
|
|
385
|
-
console.log('Por tipo:', stats.by_type);
|
|
386
|
-
```
|
|
350
|
+
**Parametros:** `{}`
|
|
387
351
|
|
|
388
|
-
##
|
|
352
|
+
## Integracion con Clientes MCP
|
|
389
353
|
|
|
390
354
|
### Claude Desktop
|
|
355
|
+
|
|
391
356
|
```json
|
|
392
357
|
{
|
|
393
358
|
"mcpServers": {
|
|
394
359
|
"memento": {
|
|
395
|
-
"command": "
|
|
396
|
-
"args": [
|
|
397
|
-
"run",
|
|
398
|
-
"node_modules/@slorenzot/memento-mcp-server/dist/index.js"
|
|
399
|
-
],
|
|
360
|
+
"command": "bunx",
|
|
361
|
+
"args": ["@slorenzot/memento-mcp-server"],
|
|
400
362
|
"env": {
|
|
401
|
-
"
|
|
363
|
+
"MEMENTO_DB_PATH": "${userHome}/.memento/data/memento.db"
|
|
402
364
|
}
|
|
403
365
|
}
|
|
404
366
|
}
|
|
405
367
|
}
|
|
406
368
|
```
|
|
407
369
|
|
|
408
|
-
### VS Code (con
|
|
370
|
+
### VS Code (con extension MCP)
|
|
371
|
+
|
|
409
372
|
```json
|
|
410
373
|
{
|
|
411
374
|
"mcp.servers": {
|
|
412
375
|
"memento": {
|
|
413
|
-
"command": "
|
|
414
|
-
"args": [
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
376
|
+
"command": "bunx",
|
|
377
|
+
"args": ["@slorenzot/memento-mcp-server"]
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### OpenCode
|
|
384
|
+
|
|
385
|
+
```json
|
|
386
|
+
{
|
|
387
|
+
"mcpServers": {
|
|
388
|
+
"memento": {
|
|
389
|
+
"command": "bunx",
|
|
390
|
+
"args": ["@slorenzot/memento-mcp-server"]
|
|
418
391
|
}
|
|
419
392
|
}
|
|
420
393
|
}
|
|
421
394
|
```
|
|
422
395
|
|
|
423
|
-
##
|
|
396
|
+
## Flujo Completo de Sesion
|
|
397
|
+
|
|
398
|
+
```typescript
|
|
399
|
+
// 1. Iniciar sesion
|
|
400
|
+
await mem_session_start({ project_id: 'my-app' })
|
|
401
|
+
|
|
402
|
+
// 2. Guardar observaciones durante el trabajo
|
|
403
|
+
await mem_save({
|
|
404
|
+
title: 'Usar PostgreSQL para auth',
|
|
405
|
+
content: 'Que: Cambiar a PostgreSQL\nPorque: Mejor soporte JSON\nDonde: src/db/config.ts',
|
|
406
|
+
type: 'decision',
|
|
407
|
+
topic_key: 'architecture/database',
|
|
408
|
+
project_id: 'my-app'
|
|
409
|
+
})
|
|
410
|
+
|
|
411
|
+
// 3. Recuperacion rapida de contexto
|
|
412
|
+
await mem_context({ project_id: 'my-app', limit: 10 })
|
|
413
|
+
|
|
414
|
+
// 4. Busqueda con modo semantico
|
|
415
|
+
await mem_search({
|
|
416
|
+
query: 'configuracion base de datos',
|
|
417
|
+
mode: 'semantic',
|
|
418
|
+
project_id: 'my-app'
|
|
419
|
+
})
|
|
424
420
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
-
|
|
429
|
-
|
|
421
|
+
// 5. Guardar resumen de sesion (herramienta NATIVA)
|
|
422
|
+
await mem_session_summary({
|
|
423
|
+
content: '## Objetivo\nConfigurar base de datos\n## Descubrimientos\nPostgreSQL tiene mejor soporte JSON\n## Logros\nConfigurada conexion PostgreSQL',
|
|
424
|
+
project_id: 'my-app'
|
|
425
|
+
})
|
|
430
426
|
|
|
431
|
-
|
|
427
|
+
// 6. Finalizar sesion
|
|
428
|
+
await mem_session_end()
|
|
429
|
+
```
|
|
432
430
|
|
|
433
|
-
##
|
|
431
|
+
## Dependencias
|
|
434
432
|
|
|
435
433
|
### Dependencias Principales
|
|
436
|
-
- `@slorenzot/memento-core`
|
|
437
|
-
- `@modelcontextprotocol/sdk`
|
|
438
|
-
- `zod`
|
|
434
|
+
- `@slorenzot/memento-core` — Motor de memoria
|
|
435
|
+
- `@modelcontextprotocol/sdk` — SDK de Model Context Protocol
|
|
436
|
+
- `zod` — Validacion de esquemas
|
|
439
437
|
|
|
440
|
-
###
|
|
438
|
+
### Runtime
|
|
441
439
|
- `bun` v1.0+ (recomendado)
|
|
442
440
|
- `node` v20+ (compatible)
|
|
443
441
|
|
|
444
|
-
##
|
|
442
|
+
## Desarrollo
|
|
445
443
|
|
|
446
444
|
```bash
|
|
447
445
|
# Clonar el proyecto
|
|
@@ -451,9 +449,6 @@ cd memento/packages/mcp-server
|
|
|
451
449
|
# Instalar dependencias
|
|
452
450
|
bun install
|
|
453
451
|
|
|
454
|
-
# Desarrollo
|
|
455
|
-
bun run dev
|
|
456
|
-
|
|
457
452
|
# Build
|
|
458
453
|
bun run build
|
|
459
454
|
|
|
@@ -461,33 +456,50 @@ bun run build
|
|
|
461
456
|
bun test
|
|
462
457
|
```
|
|
463
458
|
|
|
464
|
-
##
|
|
465
|
-
|
|
466
|
-
### [0.
|
|
467
|
-
- **
|
|
468
|
-
- **
|
|
469
|
-
- **
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
- **Added**:
|
|
473
|
-
- **Added**:
|
|
474
|
-
- **Added**:
|
|
475
|
-
- **Added**:
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
459
|
+
## Changelog
|
|
460
|
+
|
|
461
|
+
### [2.0.9] — 2026-05
|
|
462
|
+
- **Added**: Herramientas de Sync (`mem_sync_status`, `mem_sync_project`, `mem_logout`)
|
|
463
|
+
- **Added**: Herramientas de Journal (`mem_journal_write`, `mem_journal_read`, `mem_journal_search`)
|
|
464
|
+
- **Added**: Herramientas Pin/Lock (`mem_pin`, `mem_unpin`, `mem_lock`, `mem_unlock`)
|
|
465
|
+
- **Added**: `mem_replace` para ediciones quirurgicas de substrings
|
|
466
|
+
- **Added**: `mem_merge` para deduplicacion de observaciones
|
|
467
|
+
- **Added**: `mem_session_summary` herramienta nativa
|
|
468
|
+
- **Added**: `mem_context` para recuperacion rapida de contexto
|
|
469
|
+
- **Added**: `mem_capture_passive` para extraccion de aprendizajes
|
|
470
|
+
- **Added**: Modos de busqueda semantica e hibrida
|
|
471
|
+
- **Added**: 6 nuevos tipos de observacion (summary, learning, pattern, architecture, config, preference)
|
|
472
|
+
- **Changed**: `mem_delete` consolidado (soft/restore/permanent/list)
|
|
473
|
+
- **Changed**: `mem_status` herramienta de diagnostico compuesta (all/health/stats/config/sessions)
|
|
474
|
+
|
|
475
|
+
### [1.0.0] — 2025
|
|
476
|
+
- **Changed**: Consolidacion de herramientas (26 → 16 herramientas activas)
|
|
477
|
+
- **Changed**: `mem_delete` con parametro `action`
|
|
478
|
+
- **Changed**: `mem_search` con parametro `sort`
|
|
479
|
+
- **Changed**: `mem_status` herramienta de diagnostico compuesta
|
|
480
|
+
- **Changed**: `mem_save` auto-sugiere topic_key
|
|
481
|
+
|
|
482
|
+
### [0.1.1] — 2024-04-04
|
|
483
|
+
- **Fixed**: Actualizacion de dependencias core
|
|
484
|
+
- **Fixed**: Correccion de metodo deleteObservation
|
|
485
|
+
|
|
486
|
+
### [0.1.0] — 2024-04-04
|
|
487
|
+
- **Added**: Version inicial del servidor MCP
|
|
488
|
+
- **Added**: 15 herramientas de gestion de memoria
|
|
489
|
+
- **Added**: Integracion completa con Model Context Protocol
|
|
490
|
+
|
|
491
|
+
## Autor
|
|
492
|
+
|
|
493
|
+
**Soulberto Lorenzo**
|
|
480
494
|
- GitHub: [@slorenzot](https://github.com/slorenzot)
|
|
481
495
|
- Email: slorenzot@gmail.com
|
|
482
496
|
|
|
483
|
-
##
|
|
497
|
+
## Licencia
|
|
484
498
|
|
|
485
|
-
Este paquete
|
|
499
|
+
Este paquete esta bajo Licencia **Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International**.
|
|
486
500
|
|
|
487
501
|
[Ver Licencia Completa](https://github.com/slorenzot/memento/blob/main/LICENSE)
|
|
488
502
|
|
|
489
503
|
---
|
|
490
504
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
**[📖 English version](./README.md)**
|
|
505
|
+
**[English version](./README.md)**
|