chore: clean up repo for public release

- Remove BMAD framework, IDE configs, dev screenshots, test files,
  internal docs, and backup files
- Rename keep-notes/ to memento-note/
- Update all references from keep-notes to memento-note
- Add Apache 2.0 license with Commons Clause (non-commercial restriction)
- Add clean .gitignore and .env.docker.example
This commit is contained in:
Sepehr Ramezani
2026-04-20 22:48:06 +02:00
parent 402e88b788
commit e4d4e23dc7
3981 changed files with 407 additions and 530622 deletions

View File

@@ -1,139 +0,0 @@
# MCP Server Correction Summary
## Date: 2026-01-18
## Modifications effectuées pour adapter le serveur MCP au code actuel de Keep Notes
### 1. **Correction du chemin de base de données** ✅
- **Ancien chemin:** `file:${join(__dirname, '../keep-notes/prisma/dev.db')}` (incorrect)
- **Nouveau chemin:** `file:D:/dev_new_pc/Keep/keep-notes/prisma/dev.db` (chemin absolu Windows)
### 2. **Mise à jour du schéma Prisma** ✅
Ajout de tous les champs manquants dans le modèle `Note`:
- `links` (String?) - Liens dans les notes
- `reminder` (DateTime?) - Rappels
- `isReminderDone` (Boolean) - État du rappel
- `reminderRecurrence` (String?) - Récurrence des rappels
- `reminderLocation` (String?) - Lieu du rappel
- `isMarkdown` (Boolean) - Support Markdown
- `size` (String) - Taille de la note (small, medium, large)
- `notebookId` (String?) - Association avec un notebook
Ajout des modèles manquants:
- `Notebook` - Gestion des notebooks
- `Label` - Gestion des labels
- `User`, `Account`, `Session` - Authentification
- `NoteShare` - Partage de notes
- `AiFeedback`, `MemoryEchoInsight` - Fonctionnalités IA
- `UserAISettings` - Paramètres IA utilisateur
### 3. **Outils MCP ajoutés - Notebooks** ✅
- `create_notebook` - Créer un nouveau notebook
- `get_notebooks` - Récupérer tous les notebooks
- `get_notebook` - Récupérer un notebook spécifique avec ses notes
- `update_notebook` - Mettre à jour un notebook
- `delete_notebook` - Supprimer un notebook
### 4. **Outils MCP ajoutés - Labels** ✅
- `create_label` - Créer un nouveau label (nécessite notebookId)
- `get_labels_detailed` - Récupérer tous les labels avec détails
- `update_label` - Mettre à jour un label
- `delete_label` - Supprimer un label
### 5. **Mise à jour des outils existants - Notes** ✅
Ajout de paramètres dans `create_note`:
- `links` - Tableau de liens
- `reminder` - Date de rappel (ISO 8601)
- `isReminderDone` - État du rappel
- `reminderRecurrence` - Récurrence (daily, weekly, monthly, yearly)
- `reminderLocation` - Lieu du rappel
- `isMarkdown` - Activer/désactiver Markdown
- `size` - Taille de la note (small, medium, large)
- `notebookId` - ID du notebook associé
Ajout de paramètres dans `update_note`:
- Tous les paramètres ci-dessus sont optionnels pour la mise à jour
Ajout de paramètres dans `get_notes` et `search_notes`:
- `notebookId` - Filtrer par notebook
### 6. **Mise à jour de la documentation** ✅
- Renommage de "Memento" vers "Keep Notes"
- Documentation complète de tous les nouveaux outils
- Exemples d'utilisation pour N8N et Cursor
- Référence complète du schéma Prisma
- Instructions d'installation et de configuration mises à jour
### 7. **Tests de validation** ✅
✅ Connexion à la base de données réussie
✅ 56 notes trouvées dans la base de données
✅ 6 notebooks récupérés avec succès
✅ 6 labels récupérés avec succès
✅ Client Prisma généré correctement
## Structure finale du serveur MCP
### Outils disponibles (19 au total)
**Gestion des notes (9 outils):**
1. create_note
2. get_notes
3. get_note
4. update_note
5. delete_note
6. search_notes
7. get_labels (legacy)
8. toggle_pin
9. toggle_archive
**Gestion des notebooks (5 outils):**
10. create_notebook
11. get_notebooks
12. get_notebook
13. update_notebook
14. delete_notebook
**Gestion des labels (5 outils):**
15. create_label
16. get_labels_detailed
17. update_label
18. delete_label
## Fichiers modifiés/créés
-`mcp-server/index.js` - Serveur MCP principal (réécrit)
-`mcp-server/prisma/schema.prisma` - Schéma Prisma (mis à jour)
-`mcp-server/README.md` - Documentation (réécrite)
-`mcp-server/test-server.js` - Script de test (nouveau)
-`mcp-server/CHANGES.md` - Résumé des modifications (nouveau)
## Configuration Cursor
```json
{
"mcpServers": {
"keep-notes": {
"command": "node",
"args": ["D:/dev_new_pc/Keep/mcp-server/index.js"]
}
}
}
```
## Configuration N8N
Utiliser les mêmes paramètres que ci-dessus avec le nœud MCP dans N8N.
## Points importants
1. **Aucune modification du code Keep Notes** - Seul le dossier `mcp-server` a été modifié
2. **Base de données partagée** - Le MCP utilise la même base SQLite que Keep Notes
3. **Prisma synchronisé** - Le schéma Prisma du MCP correspond maintenant à celui de Keep Notes
4. **Tests réussis** - Toutes les opérations de base ont été testées et fonctionnent
## Prochaines étapes possibles (optionnelles)
- [ ] Ajouter des tests unitaires pour chaque outil MCP
- [ ] Ajouter la gestion des utilisateurs (authentification)
- [ ] Implémenter les fonctionnalités IA (Memory Echo, suggestions de titres)
- [ ] Implémenter le partage de notes (NoteShare)

File diff suppressed because it is too large Load Diff

View File

@@ -1,258 +0,0 @@
# Guide d'Installation Rapide - Workflows N8N
## 🚀 Installation en 5 minutes
### Prérequis
- ✅ N8N installé et en cours d'exécution (http://localhost:5678)
- ✅ Keep Notes en cours d'exécution (http://localhost:3000)
- ✅ Clé API OpenAI (optionnel mais recommandé)
---
## 📥 Étape 1: Importer les Workflows
### Option A: Import individuel (recommandé pour commencer)
1. Ouvrez N8N dans votre navigateur: http://localhost:5678
2. Cliquez sur **"Import from File"** dans le menu supérieur
3. Sélectionnez un des fichiers JSON:
- `n8n-workflow-create-note.json`
- `n8n-workflow-search-summary.json`
- `n8n-workflow-notebook-management.json`
- `n8n-workflow-reminder-notifications.json`
- `n8n-workflow-label-management.json`
- `n8n-workflow-email-integration.json`
4. Le workflow apparaîtra dans l'éditeur
### Option B: Import en masse (avancé)
Utilisez le script PowerShell fourni:
```powershell
.\import-workflows.ps1
```
---
## ⚙️ Étape 2: Configurer les Variables d'Environnement
Dans N8N, allez dans **Settings****Variables** et ajoutez:
```bash
KEEP_NOTES_API_URL=http://localhost:3000
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/XXX
EMAIL_ADDRESS=votre_email@gmail.com
EMAIL_PASSWORD=votre_app_password
OPENAI_API_KEY=sk-proj-XXX
```
---
## 🔌 Étape 3: Configurer les Connexions
### 3.1 Connexion Keep Notes API
Les workflows utilisent déjà l'URL `http://localhost:3000/api` par défaut.
Si Keep Notes est sur une autre URL:
1. Ouvrez un workflow
2. Cherchez les noeuds "Keep Notes - Create Note", "Get All Notes", etc.
3. Modifiez l'URL dans le champ "URL"
### 3.2 Connexion Slack
Pour les notifications Slack:
1. Créez un Incoming Webhook sur Slack
2. Copiez l'URL du webhook
3. Dans le workflow "Reminder Notifications", modifiez le noeud "Send Notification"
4. Remplacez l'URL du webhook
### 3.3 Connexion Email (IMAP)
Pour le workflow "Email to Note":
1. Activez l'accès IMAP pour votre email (ex: Gmail)
2. Si 2FA activé, générez un "App Password"
3. Configurez le noeud "Email Trigger":
- Host: `imap.gmail.com` (pour Gmail)
- Email: votre adresse
- Password: votre mot de passe/app password
### 3.4 Connexion OpenAI (Optionnel)
Pour la classification et les résumés:
1. Allez dans **Credentials****Add Credential**
2. Sélectionnez **OpenAI API**
3. Entrez votre clé API
4. Dans chaque workflow avec noeud "AI Classifier", "AI Summarizer" ou "AI Suggest Labels":
- Sélectionnez les crédtentiels OpenAI créés
---
## ▶️ Étape 4: Activer les Workflows
Pour chaque workflow importé:
1. Cliquez sur le bouton **"Activate"** (icône play en haut à droite)
2. Le workflow deviendra actif et s'exécutera selon son déclencheur
---
## 🧪 Étape 5: Tester
### Tester "Create Note with Classification"
1. Activez le workflow
2. Utilisez le MCP Trigger ou envoyez une requête POST
3. Vérifiez qu'une note est créée dans Keep Notes
```bash
curl -X POST http://localhost:5678/webhook/keep-notes-create \
-H "Content-Type: application/json" \
-d '{
"content": "Meeting with client next week to discuss project timeline",
"color": "blue"
}'
```
### Tester "Reminder Notifications"
1. Activez le workflow
2. Créez une note avec un rappel dans les 30 prochaines minutes
3. Attendez le déclenchement automatique
4. Vérifiez les notifications Slack/Email
---
## 🎯 Workflows par ordre de priorité
### Débutant (Commencez par ceux-ci)
1. **Notebook Manager** - Plus simple, aucune dépendance externe
2. **Label Manager** - Gestion de base avec option IA
3. **Create Note with Classification** - Fonctionnalité principale
### Intermédiaire
4. **Search & Summary** - Requiert OpenAI pour les résumés
5. **Reminder Notifications** - Requiert Slack/Email configuré
### Avancé
6. **Email to Note** - Plus complexe, requiert configuration IMAP
---
## 📊 Vue d'ensemble des Dépendances
| Workflow | Keep Notes | OpenAI | Slack | Email (IMAP) |
|-----------|-------------|---------|-------|---------------|
| Create Note | ✅ | ⭐ | - | - |
| Search & Summary | ✅ | ✅ | - | - |
| Notebook Manager | ✅ | - | - | - |
| Reminder Notifications | ✅ | - | ✅ | ⭐ |
| Label Manager | ✅ | ⭐ | - | - |
| Email to Note | ✅ | ✅ | ⭐ | ✅ |
Légende:
- ✅ = Requis
- ⭐ = Optionnel (pour fonctionnalités avancées)
- - = Non requis
---
## 🔧 Personnalisation Rapide
### Modifier l'URL de l'API Keep Notes
Dans tous les fichiers JSON, recherchez:
```json
"url": "http://localhost:3000/api/..."
```
Remplacez par votre URL réelle:
```json
"url": "https://votre-domaine.com/api/..."
```
### Désactiver les notifications d'un workflow
1. Ouvrez le workflow
2. Supprimez ou désactivez les noeuds de notification
3. Sauvegardez et réactivez
---
## 📈 Monitoring
### Voir les exécutions
1. Allez dans **Executions** dans le menu latéral
2. Filtrez par workflow
3. Cliquez sur une exécution pour voir les détails
4. Les données d'entrée/sortie sont visibles pour chaque noeud
### Activer les logs détaillés
Dans **Settings****Executions**, cochez:
- ✅ Save data for failed executions
- ✅ Save data for successful executions
---
## 🆘 Support et Dépannage
### Erreurs courantes
**"Connection refused to localhost:3000"**
- → Vérifiez que Keep Notes est démarré
**"AI classification failed"**
- → Vérifiez votre clé OpenAI API
**"Email trigger not working"**
- → Activez l'accès IMAP ou utilisez un App Password
**"Slack notification failed"**
- → Vérifiez l'URL du webhook Slack
### Obtenir de l'aide
1. Consultez [N8N-WORKFLOWS.md](./N8N-WORKFLOWS.md) pour la documentation détaillée
2. Vérifiez les logs d'exécution dans N8N
3. Testez chaque workflow individuellement
---
## 🎉 Prochaines étapes
Une fois les workflows configurés:
1. ✅ Explorez les workflows en mode test
2. ✅ Adaptez les prompts IA selon vos besoins
3. ✅ Créez des workflows personnalisés basés sur les exemples
4. ✅ Intégrez avec d'autres services (Notion, Google Drive, etc.)
---
## 📚 Ressources utiles
- [Documentation N8N](https://docs.n8n.io)
- [Guide MCP Protocol](https://modelcontextprotocol.io)
- [Documentation Keep Notes](./README.md)
- [Documentation complète des workflows](./N8N-WORKFLOWS.md)
---
**Temps estimé:** 5-10 minutes par workflow
**Difficulté:** Variable de ⭐ à ⭐⭐⭐
**Support:** [Issues GitHub](https://github.com/votre-repo/issues)

View File

@@ -1,673 +0,0 @@
# Keep Notes MCP SSE Server
Server-Sent Events (SSE) version of Keep Notes MCP Server for remote N8N access.
## 🎯 Purpose
This SSE server allows N8N (or other MCP clients) running on **remote machines** to connect to Keep Notes via HTTP/SSE instead of stdio.
### stdio vs SSE
|| Feature | stdio (`index.js`) | SSE (`index-sse.js`) |
||---------|-------------------|---------------------|
|| **Connection** | Local process | Network HTTP |
|| **Remote access** | ❌ No | ✅ Yes |
|| **Use case** | Claude Desktop, local tools | N8N on remote machine |
|| **Port** | N/A | 3001 |
|| **Version** | 2.0.0 | 2.0.0 |
|| **Tools** | 19 | 19 |
## 🚀 Quick Start
### 1. Install Dependencies
```bash
cd mcp-server
npm install
```
### 2. Start Server
**Option A: PowerShell Script (Recommended)**
```powershell
.\start-sse.ps1
```
**Option B: Direct Node**
```bash
npm run start:sse
# or
node index-sse.js
```
### 3. Verify Server is Running
Open browser to: `http://localhost:3001`
You should see:
```json
{
"name": "Keep Notes MCP SSE Server",
"version": "2.0.0",
"status": "running",
"endpoints": {
"sse": "/sse",
"message": "/message"
}
}
```
## 🌐 Get Your IP Address
### Windows
```powershell
ipconfig
```
Look for "IPv4 Address" (usually 192.168.x.x)
### Mac/Linux
```bash
ifconfig
# or
ip addr show
```
## 🔌 N8N Configuration
### Method 1: MCP Client Community Node
If your N8N has MCP Client node installed:
1. Open N8N Settings → MCP Access
2. Add new server:
```json
{
"name": "keep-notes",
"transport": "sse",
"url": "http://YOUR_IP:3001/sse"
}
```
Replace `YOUR_IP` with your machine's IP (e.g., `192.168.1.100`)
3. Enable "Available in MCP" for your workflow
4. Use MCP Client node to call tools
### Method 2: HTTP Request Nodes (Fallback)
Use N8N's standard HTTP Request nodes with the REST API:
- POST `http://YOUR_IP:3000/api/notes` (Keep Notes REST API)
## 🛠️ Available Tools (19)
### Notes Tools (9)
#### 1. **create_note** - Create new note with full support
```json
{
"name": "create_note",
"arguments": {
"title": "My Note",
"content": "Note content",
"color": "blue",
"type": "text",
"checkItems": [{"id": "1", "text": "Task", "checked": false}],
"labels": ["work", "important"],
"isPinned": false,
"isArchived": false,
"images": ["data:image/png;base64,..."],
"links": ["https://example.com"],
"reminder": "2026-01-20T10:00:00Z",
"isReminderDone": false,
"reminderRecurrence": "daily",
"reminderLocation": "Office",
"isMarkdown": false,
"size": "medium",
"notebookId": "cuid..."
}
}
```
**New Fields (v2.0):**
- `links` - Note links as array
- `reminder` - Reminder date/time (ISO 8601)
- `isReminderDone` - Mark reminder as done
- `reminderRecurrence` - Reminder recurrence (daily, weekly, monthly, yearly)
- `reminderLocation` - Reminder location
- `isMarkdown` - Enable markdown support
- `size` - Note size (small, medium, large)
- `notebookId` - Associate note with notebook
#### 2. **get_notes** - Get all notes (supports filters)
```json
{
"name": "get_notes",
"arguments": {
"includeArchived": false,
"search": "optional search query",
"notebookId": "cuid...",
"fullDetails": false
}
}
```
**New Filters (v2.0):**
- `notebookId` - Filter by notebook
- `fullDetails` - Return full details including images (warning: large payload)
#### 3. **get_note** - Get specific note by ID
```json
{
"name": "get_note",
"arguments": {
"id": "cuid..."
}
}
```
#### 4. **update_note** - Update existing note
Supports all fields from create_note. All are optional except `id`.
```json
{
"name": "update_note",
"arguments": {
"id": "cuid...",
"title": "Updated Title",
"color": "green",
"isPinned": true
}
}
```
#### 5. **delete_note** - Delete note
```json
{
"name": "delete_note",
"arguments": {
"id": "cuid..."
}
}
```
#### 6. **search_notes** - Search notes by query
```json
{
"name": "search_notes",
"arguments": {
"query": "project",
"notebookId": "cuid..."
}
}
```
**New (v2.0):** `notebookId` filter support
#### 7. **get_labels** - Get all unique labels (legacy method)
```json
{
"name": "get_labels",
"arguments": {}
}
```
#### 8. **toggle_pin** - Pin/unpin note
```json
{
"name": "toggle_pin",
"arguments": {
"id": "cuid..."
}
}
```
#### 9. **toggle_archive** - Archive/unarchive note
```json
{
"name": "toggle_archive",
"arguments": {
"id": "cuid..."
}
}
```
### Notebooks Tools (5) - NEW in v2.0
#### 10. **create_notebook** - Create new notebook
```json
{
"name": "create_notebook",
"arguments": {
"name": "Work Projects",
"icon": "💼",
"color": "#3B82F6",
"order": 1
}
}
```
**Returns:** Notebook with labels and notes count
#### 11. **get_notebooks** - Get all notebooks
```json
{
"name": "get_notebooks",
"arguments": {}
}
```
**Returns:** Array of notebooks with labels and notes count
#### 12. **get_notebook** - Get notebook with notes
```json
{
"name": "get_notebook",
"arguments": {
"id": "cuid..."
}
}
```
**Returns:** Notebook with labels, notes (parsed), and notes count
#### 13. **update_notebook** - Update notebook
```json
{
"name": "update_notebook",
"arguments": {
"id": "cuid...",
"name": "Updated Name",
"icon": "📁",
"color": "#10B981"
}
}
```
#### 14. **delete_notebook** - Delete notebook
```json
{
"name": "delete_notebook",
"arguments": {
"id": "cuid..."
}
}
```
**Warning:** Deletes all notes in the notebook
### Labels Tools (5) - NEW in v2.0
#### 15. **create_label** - Create new label
```json
{
"name": "create_label",
"arguments": {
"name": "Important",
"color": "red",
"notebookId": "cuid..."
}
}
```
**Required:** `name` and `notebookId`
#### 16. **get_labels_detailed** - Get labels with details
```json
{
"name": "get_labels_detailed",
"arguments": {
"notebookId": "cuid..."
}
}
```
**Returns:** Labels with notebook information
#### 17. **update_label** - Update label
```json
{
"name": "update_label",
"arguments": {
"id": "cuid...",
"name": "Updated Name",
"color": "blue"
}
}
```
#### 18. **delete_label** - Delete label
```json
{
"name": "delete_label",
"arguments": {
"id": "cuid..."
}
}
```
## 🧪 Testing the SSE Server
### Test 1: Health Check
```bash
curl http://localhost:3001/
```
### Test 2: SSE Connection
```bash
curl -N http://localhost:3001/sse
```
### Test 3: Call a Tool (get_notes)
```bash
curl -X POST http://localhost:3001/message \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "get_notes",
"arguments": {}
},
"id": 1
}'
```
### Test 4: Create Note via MCP
```powershell
$body = @{
jsonrpc = "2.0"
method = "tools/call"
params = @{
name = "create_note"
arguments = @{
content = "Test from MCP SSE"
title = "SSE Test"
color = "green"
}
}
id = 1
} | ConvertTo-Json -Depth 5
Invoke-RestMethod -Method POST -Uri "http://localhost:3001/message" `
-Body $body -ContentType "application/json"
```
### Test 5: Create Notebook
```powershell
$body = @{
jsonrpc = "2.0"
method = "tools/call"
params = @{
name = "create_notebook"
arguments = @{
name = "Test Notebook"
icon = "📁"
color = "#3B82F6"
}
}
id = 1
} | ConvertTo-Json -Depth 5
Invoke-RestMethod -Method POST -Uri "http://localhost:3001/message" `
-Body $body -ContentType "application/json"
```
### Test 6: Create Label
```powershell
$body = @{
jsonrpc = "2.0"
method = "tools/call"
params = @{
name = "create_label"
arguments = @{
name = "Test Label"
color = "blue"
notebookId = "YOUR_NOTEBOOK_ID"
}
}
id = 1
} | ConvertTo-Json -Depth 5
Invoke-RestMethod -Method POST -Uri "http://localhost:3001/message" `
-Body $body -ContentType "application/json"
```
## 🔥 Troubleshooting
### Error: Prisma Client not initialized
**Solution**: Generate Prisma Client:
```bash
npx prisma generate
```
### Error: Port 3001 already in use
**Solution 1:** Change port in `index-sse.js`:
```javascript
const PORT = process.env.PORT || 3002;
```
**Solution 2:** Kill existing process:
```powershell
Get-Process node | Where-Object {$_.Path -like "*index-sse*"}
Stop-Process -Id $process.Id
```
### Error: Cannot connect from N8N
**Checklist:**
1. ✅ Server is running (`http://localhost:3001` works locally)
2. ✅ Firewall allows port 3001
3. ✅ Using correct IP address (not `localhost`)
4. ✅ N8N can reach your network
5. ✅ Using `http://` not `https://`
**Test connectivity from N8N machine:**
```bash
curl http://YOUR_IP:3001/
```
### SSE Connection Keeps Dropping
This is normal! SSE maintains a persistent connection. If it drops:
- Client should automatically reconnect
- Check network stability
- Verify firewall/proxy settings
## 🔒 Security Notes
⚠️ **This server has NO AUTHENTICATION!**
For production use:
1. Add API key authentication
2. Use HTTPS with SSL certificates
3. Restrict CORS origins
4. Use environment variables for secrets
5. Deploy behind a reverse proxy (nginx, Caddy)
### Add Basic API Key (Example)
```javascript
// In index-sse.js, add middleware:
app.use((req, res, next) => {
const apiKey = req.headers['x-api-key'];
if (apiKey !== process.env.MCP_API_KEY) {
return res.status(401).json({ error: 'Unauthorized' });
}
next();
});
```
## 📊 Endpoints
| Method | Path | Description |
|--------|------|-------------|
| GET | `/` | Health check |
| GET | `/sse` | SSE connection endpoint |
| POST | `/message` | MCP message handler |
## 🆚 Comparison with REST API
| Feature | MCP SSE | REST API |
|---------|---------|----------|
| **Protocol** | SSE (MCP) | HTTP JSON |
| **Port** | 3001 | 3000 (Next.js) |
| **Format** | MCP JSON-RPC | REST JSON |
| **Use case** | MCP clients | Standard HTTP clients |
| **Tools** | 19 MCP tools | 4 CRUD endpoints |
**Both work!** Use MCP SSE for proper MCP integration, or REST API for simpler HTTP requests.
## 🔄 Development Workflow
### Running Both Servers
**Terminal 1: Next.js + REST API**
```bash
cd keep-notes
npm run dev
# Runs on http://localhost:3000
```
**Terminal 2: MCP SSE Server**
```bash
cd mcp-server
npm run start:sse
# Runs on http://localhost:3001
```
**Terminal 3: MCP stdio (for Claude Desktop)**
```bash
cd mcp-server
npm start
# Runs as stdio process
```
## 📝 Configuration Examples
### N8N Workflow (MCP Client)
```json
{
"nodes": [
{
"name": "Get Keep Notes",
"type": "MCP Client",
"typeVersion": 1,
"position": [250, 300],
"parameters": {
"server": "keep-notes",
"tool": "get_notes",
"arguments": {
"includeArchived": false
}
}
}
]
}
```
### Create Notebook via MCP
```json
{
"name": "Create Notebook",
"type": "MCP Client",
"parameters": {
"server": "keep-notes",
"tool": "create_notebook",
"arguments": {
"name": "Work Projects",
"icon": "💼",
"color": "#3B82F6"
}
}
}
```
### Create Label via MCP
```json
{
"name": "Create Label",
"type": "MCP Client",
"parameters": {
"server": "keep-notes",
"tool": "create_label",
"arguments": {
"name": "Important",
"color": "red",
"notebookId": "WORKBOOK_ID"
}
}
}
```
### Claude Desktop Config (stdio)
Use original `index.js` with stdio:
```json
{
"mcpServers": {
"keep-notes": {
"command": "node",
"args": ["D:/dev_new_pc/Keep/mcp-server/index.js"]
}
}
}
```
## 🚀 N8N Integration Guide
See [N8N-SETUP.md](./N8N-SETUP.md) for complete N8N workflow setup and [N8N-WORKFLOWS.md](./N8N-WORKFLOWS.md) for available workflows.
## 📚 Resources
- [MCP Protocol Documentation](https://modelcontextprotocol.io)
- [Server-Sent Events Spec](https://html.spec.whatwg.org/multipage/server-sent-events.html)
- [N8N MCP Integration Guide](https://community.n8n.io)
- [Express.js Documentation](https://expressjs.com)
## 🤝 Support
Issues? Check:
1. [START-SSE.md](./START-SSE.md) - Quick start guide
2. [README.md](../README.md) - Main project README
3. [COMPLETED-FEATURES.md](../COMPLETED-FEATURES.md) - Implementation details
---
**Version**: 2.0.0
**Last Updated**: January 18, 2026
**Status**: ✅ Production Ready

View File

@@ -55,7 +55,7 @@ Add to your Cursor MCP client configuration:
```json
{
"mcpServers": {
"keep-notes": {
"memento-note": {
"command": "node",
"args": ["D:/dev_new_pc/Keep/mcp-server/index.js"]
}
@@ -269,7 +269,7 @@ Delete a label by ID.
## Database
The MCP server connects to the same SQLite database as the Keep Notes web app located at:
`D:/dev_new_pc/Keep/keep-notes/prisma/dev.db`
`D:/dev_new_pc/Keep/memento-note/prisma/dev.db`
## Prisma Schema Reference

View File

@@ -1,359 +0,0 @@
# Guide de Démarrage - Serveur MCP Keep Notes
## 🚀 Méthodes de Démarrage
### Méthode 1: Script PowerShell (Recommandé pour Windows)
Le script vérifie automatiquement les prérequis et démarre le serveur.
```powershell
# Exécuter depuis le dossier mcp-server
.\start-mcp.ps1
```
**Avantages:**
- ✅ Vérifie que Prisma est généré
- ✅ Vérifie que Keep Notes est en cours d'exécution
- ✅ Messages d'erreur clairs
- ✅ Compatible Windows PowerShell
---
### Méthode 2: Script Batch (Windows)
```cmd
# Exécuter depuis le dossier mcp-server
start-mcp.bat
```
---
### Méthode 3: Commande directe (Cross-platform)
```bash
# Depuis le dossier mcp-server
npm start
```
Ou directement:
```bash
node index.js
```
---
### Méthode 4: Mode SSE (Alternative)
Si vous avez besoin du mode SSE (Server-Sent Events):
```bash
npm run start:sse
```
Ou via PowerShell:
```powershell
.\start-sse.ps1
```
---
## ✅ Prérequis
Avant de démarrer, assurez-vous que:
1. **Node.js est installé**
```bash
node --version
# Doit retourner v18 ou supérieur
```
2. **Dépendances sont installées**
```bash
npm install
```
3. **Client Prisma est généré**
```bash
npx prisma generate
```
4. **Keep Notes est en cours d'exécution**
- Vérifiez: http://localhost:3000
- Si non démarré, allez dans `keep-notes/` et exécutez `npm run dev`
---
## 🔧 Installation Initiale (Première fois)
### Étape 1: Installer les dépendances
```bash
cd mcp-server
npm install
```
### Étape 2: Générer le client Prisma
```bash
npx prisma generate
```
### Étape 3: Tester la connexion à la base de données
```bash
node test-server.js
```
Vous devriez voir:
```
🧪 Testing MCP Server Database Connection...
✅ Prisma Client initialized successfully
📝 Test 1: Counting notes...
Found XX notes in database
✅ All database tests passed successfully!
🚀 MCP Server is ready to use!
```
### Étape 4: Démarrer le serveur MCP
```powershell
.\start-mcp.ps1
```
---
## 🎯 Utilisation avec Cursor
### Configuration Cursor
Ouvrez les paramètres de Cursor et ajoutez:
**JSON Config:**
```json
{
"mcpServers": {
"keep-notes": {
"command": "node",
"args": ["D:/dev_new_pc/Keep/mcp-server/index.js"]
}
}
}
```
**Ou avec le script PowerShell:**
```json
{
"mcpServers": {
"keep-notes": {
"command": "pwsh",
"args": [
"-File",
"D:/dev_new_pc/Keep/mcp-server/start-mcp.ps1"
]
}
}
}
```
### Vérifier que Cursor reconnaît le MCP
1. Redémarrez Cursor
2. Ouvrez une nouvelle conversation
3. Tapez: "List all MCP tools"
4. Vous devriez voir les outils Keep Notes listés
---
## 🎯 Utilisation avec N8N
### Option 1: Via les workflows MCP
1. Importez les workflows N8N (voir `N8N-SETUP.md`)
2. Configurez les variables d'environnement
3. Activez les workflows
### Option 2: Via MCP Client Node
1. Dans N8N, ajoutez un **MCP Client Tool Node**
2. Configurez l'endpoint:
- **URL:** `stdio://` (mode par défaut)
- **Command:** `node`
- **Args:** `["D:/dev_new_pc/Keep/mcp-server/index.js"]`
3. Sélectionnez les outils que vous souhaitez exposer
---
## 📊 Vérifier le Serveur en Cours d'Exécution
### Vérifier avec PowerShell
```powershell
# Liste les processus Node
Get-Process | Where-Object {$_.ProcessName -eq "node"}
```
### Vérifier le port (si mode SSE)
```powershell
# Vérifier si le port SSE est utilisé (si configuré)
netstat -ano | findstr "3001"
```
---
## 🛑 Arrêter le Serveur
### Depuis le terminal
Appuyez sur **Ctrl+C**
### Depuis PowerShell
```powershell
# Trouver et tuer le processus
$process = Get-Process node | Where-Object {$_.Path -like "*mcp-server*"}
Stop-Process -Id $process.Id
```
---
## 🔍 Dépannage
### Erreur: "Cannot find module '@prisma/client'"
**Solution:**
```bash
npx prisma generate
```
### Erreur: "Connection refused to database"
**Solution:**
1. Vérifiez que Keep Notes est en cours d'exécution (http://localhost:3000)
2. Vérifiez le chemin de la base de données dans `index.js`
3. Exécutez `node test-server.js` pour tester
### Erreur: "Server is not responding"
**Solution:**
1. Vérifiez que le serveur est en cours d'exécution
2. Redémarrez Cursor/N8N
3. Vérifiez les logs dans le terminal
### Erreur: "Permission denied" (Windows)
**Solution:**
Exécutez PowerShell en tant qu'administrateur ou changez la politique d'exécution:
```powershell
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
```
---
## 📝 Logs et Débogage
Le serveur MCP écrit les logs dans la console:
```
Keep Notes MCP server running on stdio
```
Pour plus de détails, ajoutez `--debug` (modifiez le script):
```bash
node index.js --debug
```
---
## 🎉 Démarrage Rapide (Récapitulatif)
```bash
# 1. Allumer Keep Notes
cd keep-notes
npm run dev
# 2. Dans un autre terminal, démarrer MCP
cd mcp-server
npm start
# 3. Ouvrir Cursor/N8N et utiliser les outils MCP
```
---
## 📚 Documentation Complémentaire
- [README.md](./README.md) - Documentation complète du serveur MCP
- [N8N-SETUP.md](./N8N-SETUP.md) - Installation des workflows N8N
- [N8N-WORKFLOWS.md](./N8N-WORKFLOWS.md) - Description des workflows
- [CHANGES.md](./CHANGES.md) - Résumé des modifications
---
## 🚀 Mode SSE Alternative
Si vous avez besoin du mode SSE (Server-Sent Events) pour N8N sur une machine distante:
### Démarrage SSE
```powershell
# Exécuter depuis le dossier mcp-server
.\start-sse.ps1
```
Ou directement:
```bash
npm run start:sse
```
### Documentation SSE Complète
- **[START-SSE.md](./START-SSE.md)** - Guide complet de démarrage SSE
- **[README-SSE.md](./README-SSE.md)** - Documentation des outils SSE
- **Port SSE**: 3001 (par défaut)
- **Nombre d'outils**: 19 (9 Notes + 5 Notebooks + 5 Labels)
### Configuration N8N pour SSE
```json
{
"name": "keep-notes-sse",
"transport": "sse",
"url": "http://YOUR_IP:3001/sse"
}
```
Remplacez `YOUR_IP` par votre IP locale (ex: 192.168.1.100)
---
## 🆘 Support
**Problèmes?**
1. Vérifiez les logs dans le terminal
2. Exécutez `node test-server.js` pour tester
3. Consultez la documentation de débogage
**Commandes utiles:**
```bash
# Vérifier Node.js
node --version
# Vérifier les dépendances
npm list
# Régénérer Prisma
npx prisma generate
# Tester la base de données
node test-server.js
```

View File

@@ -1,363 +0,0 @@
# Guide de Démarrage - Serveur MCP Keep Notes (Mode SSE)
## 🚀 Démarrage Rapide du Serveur SSE
### Option 1: Script PowerShell (Recommandée pour Windows)
```powershell
# Exécuter depuis le dossier mcp-server
.\start-sse.ps1
```
**Ce script fait:**
- ✅ Vérifie que Prisma est généré
- ✅ Vérifie que Keep Notes est en cours d'exécution (port 3000)
- ✅ Génère Prisma si nécessaire
- ✅ Messages d'erreur clairs
- ✅ Démarre le serveur MCP sur le port 3001
### Option 2: Commande directe
```bash
cd mcp-server
npm run start:sse
```
Ou directement:
```bash
node index-sse.js
```
---
## ✅ Prérequis
### 1. Node.js installé
```bash
node --version
# Doit retourner v18 ou supérieur
```
### 2. Dépendances installées
```bash
cd mcp-server
npm install
```
### 3. Client Prisma généré
```bash
npx prisma generate
```
### 4. Keep Notes en cours d'exécution
Le serveur SSE nécessite que Keep Notes soit démarré sur le port 3000.
```bash
# Dans un autre terminal
cd keep-notes
npm run dev
```
### 5. Port 3001 disponible
Le serveur SSE utilise le port 3001. Vérifiez qu'il n'est pas déjà utilisé:
```bash
# Windows (PowerShell)
netstat -ano | findstr "3001"
# Mac/Linux
lsof -i :3001
```
---
## 🎯 Utilisation avec N8N
### Configuration N8N pour MCP SSE
Le serveur SSE est parfait pour N8N sur une machine distante!
#### Étape 1: Trouver votre IP
**Windows:**
```powershell
ipconfig
```
Cherchez "IPv4 Address" (ex: 192.168.1.100)
**Mac/Linux:**
```bash
ifconfig
# ou
ip addr show
```
#### Étape 2: Configurer N8N
Dans N8N, allez dans **Settings****MCP Access** et ajoutez:
```json
{
"name": "keep-notes",
"transport": "sse",
"url": "http://192.168.1.100:3001/sse"
}
```
Remplacez `192.168.1.100` par votre IP réelle.
#### Étape 3: Activer les workflows
1. Importez les workflows N8N (voir `N8N-SETUP.md`)
2. Activez chaque workflow (bouton play)
3. Les workflows peuvent maintenant appeler les outils MCP
---
## 🛠️ Outils Disponibles (19 au total)
### Notes (9 outils)
| # | Outil | Description |
|---|--------|-------------|
| 1 | create_note | Créer une nouvelle note (support complet) |
| 2 | get_notes | Récupérer toutes les notes (supporte filtres) |
| 3 | get_note | Récupérer une note par ID |
| 4 | update_note | Mettre à jour une note |
| 5 | delete_note | Supprimer une note |
| 6 | search_notes | Rechercher des notes |
| 7 | get_labels | Récupérer les labels (méthode legacy) |
| 8 | toggle_pin | Épingler/désépingler une note |
| 9 | toggle_archive | Archiver/désarchiver une note |
### Notebooks (5 outils)
| # | Outil | Description |
|---|--------|-------------|
| 10 | create_notebook | Créer un nouveau notebook |
| 11 | get_notebooks | Récupérer tous les notebooks |
| 12 | get_notebook | Récupérer un notebook avec ses notes |
| 13 | update_notebook | Mettre à jour un notebook |
| 14 | delete_notebook | Supprimer un notebook |
### Labels (5 outils)
| # | Outil | Description |
|---|--------|-------------|
| 15 | create_label | Créer un nouveau label |
| 16 | get_labels_detailed | Récupérer les labels avec détails |
| 17 | update_label | Mettre à jour un label |
| 18 | delete_label | Supprimer un label |
---
## 📊 Tests de Vérification
### Test 1: Health Check
```bash
curl http://localhost:3001/
```
**Réponse attendue:**
```json
{
"name": "Keep Notes MCP SSE Server",
"version": "2.0.0",
"status": "running",
"endpoints": {
"sse": "/sse",
"message": "/message"
}
}
```
### Test 2: SSE Connection
```bash
curl -N http://localhost:3001/sse
```
### Test 3: Appeler un outil (get_notes)
```bash
curl -X POST http://localhost:3001/message \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "get_notes",
"arguments": {}
},
"id": 1
}'
```
### Test 4: Créer une note
```powershell
$body = @{
jsonrpc = "2.0"
method = "tools/call"
params = @{
name = "create_note"
arguments = @{
content = "Test depuis MCP SSE"
title = "SSE Test"
color = "green"
}
}
id = 1
} | ConvertTo-Json -Depth 5
Invoke-RestMethod -Method POST -Uri "http://localhost:3001/message" `
-Body $body -ContentType "application/json"
```
---
## 🔧 Configuration Avancée
### Changer le port
Modifier `index-sse.js`:
```javascript
const PORT = process.env.PORT || 3002;
```
Ou utiliser une variable d'environnement:
```powershell
$env:PORT=3002; node index-sse.js
```
### Sécurisation avec API Key
Ajouter de l'authentification dans `index-sse.js`:
```javascript
app.use((req, res, next) => {
const apiKey = req.headers['x-api-key'];
if (apiKey !== process.env.MCP_API_KEY) {
return res.status(401).json({ error: 'Unauthorized' });
}
next();
});
```
---
## 🛑 Arrêter le Serveur
Appuyez sur **Ctrl+C** dans le terminal.
Le serveur fermera proprement:
- Arrêtera toutes les connexions SSE
- Déconnectera Prisma de la base de données
- Affichera un message de confirmation
---
## 📚 Documentation Complémentaire
- [README-SSE.md](./README-SSE.md) - Documentation détaillée des outils
- [README.md](./README.md) - Documentation principale du serveur MCP
- [N8N-SETUP.md](./N8N-SETUP.md) - Guide d'installation des workflows N8N
- [N8N-WORKFLOWS.md](./N8N-WORKFLOWS.md) - Description des workflows N8N
---
## 🔍 Dépannage
### Erreur: "Port 3001 already in use"
**Solution 1:** Changer le port dans `index-sse.js`:
```javascript
const PORT = process.env.PORT || 3002;
```
**Solution 2:** Trouver et tuer le processus:
```powershell
Get-Process node | Where-Object {$_.Path -like "*index-sse*"}
Stop-Process -Id $process.Id
```
### Erreur: "Cannot connect from N8N"
**Checklist:**
1. ✅ Serveur SSE en cours d'exécution (`http://localhost:3001` fonctionne)
2. ✅ Firewall autorise le port 3001
3. ✅ Utilisation de l'IP correcte (pas `localhost` depuis N8N distant)
4. ✅ N8N peut atteindre votre réseau
5. ✅ Utilisation de `http://` (pas `https://`)
**Test depuis N8N:**
```bash
curl http://YOUR_IP:3001/
```
### Erreur: "Prisma Client not initialized"
**Solution:**
```bash
cd mcp-server
npx prisma generate
```
### SSE Connection Drops
C'est normal! SSE maintient une connexion persistante. Si elle chute:
- Le client doit se reconnecter automatiquement
- Vérifier la stabilité du réseau
- Vérifier les paramètres firewall/proxy
---
## 🌐 Architecture SSE vs stdio
| Fonctionnalité | SSE (index-sse.js) | stdio (index.js) |
|---------------|----------------------|-------------------|
| **Transport** | HTTP/SSE | Process local |
| **Accès distant** | ✅ Oui | ❌ Non |
| **Port** | 3001 | N/A |
| **Utilisation N8N** | ✅ Parfait | ❌ Impossible |
| **Utilisation Cursor** | ✅ Possible | ✅ Parfait |
| **Setup** | Moyen | Simple |
| **Latence** | Faible | Très faible |
| **Outils** | 19 | 19 |
**Recommandation:**
- **SSE** pour N8N sur machine distante ✅
- **stdio** pour Cursor sur la même machine ✅
---
## 🎉 Démarrage Rapide (Récapitulatif)
```bash
# 1. Démarrer Keep Notes (terminal 1)
cd keep-notes
npm run dev
# 2. Démarrer le serveur MCP SSE (terminal 2)
cd mcp-server
.\start-sse.ps1
# 3. Configurer N8N avec: http://YOUR_IP:3001/sse
# 4. Importer et activer les workflows N8N
# 5. Utiliser les outils MCP dans vos workflows!
```
---
**Version:** 2.0.0
**Dernière mise à jour:** 18 janvier 2026
**Status:** ✅ Production Ready

View File

@@ -3,11 +3,11 @@
* Vérifier les propriétés des notes
*/
import { PrismaClient } from '../keep-notes/prisma/client-generated/index.js';
import { PrismaClient } from '../memento-note/prisma/client-generated/index.js';
const prisma = new PrismaClient({
datasources: {
db: { url: 'file:/Users/sepehr/dev/Keep/keep-notes/prisma/dev.db' },
db: { url: 'file:/Users/sepehr/dev/Keep/memento-note/prisma/dev.db' },
},
});

View File

@@ -3,11 +3,11 @@
* Supprimer toutes les notes créées
*/
import { PrismaClient } from '../keep-notes/prisma/client-generated/index.js';
import { PrismaClient } from '../memento-note/prisma/client-generated/index.js';
const prisma = new PrismaClient({
datasources: {
db: { url: 'file:/Users/sepehr/dev/Keep/keep-notes/prisma/dev.db' },
db: { url: 'file:/Users/sepehr/dev/Keep/memento-note/prisma/dev.db' },
},
});

View File

@@ -4,11 +4,11 @@
* Utilise Prisma pour créer les notes
*/
import { PrismaClient } from '../keep-notes/prisma/client-generated/index.js';
import { PrismaClient } from '../memento-note/prisma/client-generated/index.js';
const prisma = new PrismaClient({
datasources: {
db: { url: 'file:/Users/sepehr/dev/Keep/keep-notes/prisma/dev.db' },
db: { url: 'file:/Users/sepehr/dev/Keep/memento-note/prisma/dev.db' },
},
});
@@ -55,7 +55,7 @@ const documents = [
## Structure
keep/
├── keep-notes/ # Next.js App
├── memento-note/ # Next.js App
├── mcp-server/ # Serveur MCP
└── docs/ # Documentation
@@ -116,8 +116,8 @@ keep/
• npm
• SQLite3
## Installation keep-notes
cd keep-notes
## Installation memento-note
cd memento-note
npm install
npx prisma generate
npx prisma db push
@@ -143,7 +143,7 @@ Dockerfile disponible pour containerisation.`,
},
{
title: '💻 Development Guide',
content: `Guide développement keep-notes.
content: `Guide développement memento-note.
## Stack
• Next.js 16 + React 19
@@ -181,7 +181,7 @@ Server Actions ('use server')`,
content: `Architecture d'intégration.
## Communication
keep-notes ◄──► SQLite DB ◄──► mcp-server
memento-note ◄──► SQLite DB ◄──► mcp-server
## Protocole MCP
Client AI ──► MCP Server (4242) ──► SQLite
@@ -190,7 +190,7 @@ Client AI ──► MCP Server (4242) ──► SQLite
N8N Workflow ──► MCP Server ──► SQLite
## Flux de données
1. keep-notes → Server Action → Prisma → DB
1. memento-note → Server Action → Prisma → DB
2. MCP Request → Prisma → DB → Response
3. Temps réel via DB partagée`,
color: 'blue',
@@ -198,7 +198,7 @@ N8N Workflow ──► MCP Server ──► SQLite
},
{
title: '📡 API Contracts Keep Notes',
content: `API REST keep-notes.
content: `API REST memento-note.
## Base URL
http://localhost:3000/api
@@ -248,7 +248,7 @@ async function createNote() {
await prisma.note.create({...})
}`,
color: 'purple',
labels: ['architecture', 'keep-notes'],
labels: ['architecture', 'memento-note'],
},
{
title: '🔍 Code Review Cleanup Report',

View File

@@ -4,7 +4,7 @@
* Importe le contenu intégral de chaque fichier .md
*/
import { PrismaClient } from '../keep-notes/prisma/client-generated/index.js';
import { PrismaClient } from '../memento-note/prisma/client-generated/index.js';
import { readFileSync } from 'fs';
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
@@ -14,7 +14,7 @@ const __dirname = dirname(__filename);
const prisma = new PrismaClient({
datasources: {
db: { url: 'file:/Users/sepehr/dev/Keep/keep-notes/prisma/dev.db' },
db: { url: 'file:/Users/sepehr/dev/Keep/memento-note/prisma/dev.db' },
},
});
@@ -24,10 +24,10 @@ const documents = [
{ file: 'source-tree-analysis.md', title: '📁 Source Tree Analysis', color: 'green' },
{ file: 'project-overview.md', title: '🎯 Project Overview', color: 'purple' },
{ file: 'deployment-guide.md', title: '🚀 Deployment Guide', color: 'orange' },
{ file: 'development-guide-keep-notes.md', title: '💻 Development Guide', color: 'teal' },
{ file: 'development-guide-memento-note.md', title: '💻 Development Guide', color: 'teal' },
{ file: 'integration-architecture.md', title: '🔌 Integration Architecture', color: 'blue' },
{ file: 'api-contracts-keep-notes.md', title: '📡 API Contracts Keep Notes', color: 'yellow' },
{ file: 'architecture-keep-notes.md', title: '🏗️ Architecture Keep Notes', color: 'purple' },
{ file: 'api-contracts-memento-note.md', title: '📡 API Contracts Keep Notes', color: 'yellow' },
{ file: 'architecture-memento-note.md', title: '🏗️ Architecture Keep Notes', color: 'purple' },
{ file: 'code-review-cleanup-report.md', title: '🔍 Code Review Cleanup Report', color: 'red' },
{ file: 'data-models.md', title: '🗄️ Data Models', color: 'gray' },
{ file: 'component-inventory.md', title: '🧩 Component Inventory', color: 'teal' },

View File

@@ -1,123 +0,0 @@
# Import-Workflows.ps1
# Script pour importer tous les workflows N8N automatiquement
param(
[string]$n8nUrl = "http://localhost:5678",
[string]$apiKey = ""
)
Write-Host "🚀 Importation des Workflows N8N pour Keep Notes MCP" -ForegroundColor Cyan
Write-Host "=================================================" -ForegroundColor Cyan
Write-Host ""
# Vérifier si N8N est accessible
try {
$response = Invoke-WebRequest -Uri "$n8nUrl/rest/workflows" -UseBasicParsing
Write-Host "✅ N8N est accessible à $n8nUrl" -ForegroundColor Green
} catch {
Write-Host "❌ Erreur: Impossible de connecter à N8N à $n8nUrl" -ForegroundColor Red
Write-Host " Vérifiez que N8N est en cours d'exécution" -ForegroundColor Yellow
exit 1
}
Write-Host ""
# Liste des workflows à importer
$workflows = @(
@{
file = "n8n-workflow-create-note.json"
name = "Create Note with Classification"
},
@{
file = "n8n-workflow-search-summary.json"
name = "Search & Summary"
},
@{
file = "n8n-workflow-notebook-management.json"
name = "Notebook Manager"
},
@{
file = "n8n-workflow-reminder-notifications.json"
name = "Reminder Notifications"
},
@{
file = "n8n-workflow-label-management.json"
name = "Label Manager"
},
@{
file = "n8n-workflow-email-integration.json"
name = "Email to Note"
}
)
$imported = 0
$failed = 0
foreach ($workflow in $workflows) {
$filePath = $workflow.file
$name = $workflow.name
Write-Host "📥 Importation: $name" -ForegroundColor Yellow
if (-not (Test-Path $filePath)) {
Write-Host " ❌ Fichier non trouvé: $filePath" -ForegroundColor Red
$failed++
continue
}
try {
# Lire le fichier JSON
$workflowJson = Get-Content $filePath -Raw
# Préparer les en-têtes
$headers = @{
"Content-Type" = "application/json"
}
if ($apiKey) {
$headers["Authorization"] = "Bearer $apiKey"
}
# Envoyer à N8N
$response = Invoke-RestMethod `
-Uri "$n8nUrl/rest/workflows/import" `
-Method POST `
-Body $workflowJson `
-Headers $headers `
-ErrorAction Stop
Write-Host " ✅ Importé avec succès (ID: $($response.id))" -ForegroundColor Green
$imported++
} catch {
Write-Host " ❌ Erreur lors de l'import: $_" -ForegroundColor Red
$failed++
}
Write-Host ""
}
# Résumé
Write-Host "=================================================" -ForegroundColor Cyan
Write-Host "📊 Résumé de l'importation" -ForegroundColor Cyan
Write-Host "=================================================" -ForegroundColor Cyan
Write-Host ""
Write-Host "✅ Importés avec succès: $imported" -ForegroundColor Green
Write-Host "❌ Échecs: $failed" -ForegroundColor Red
Write-Host "📝 Total: $($workflows.Count)" -ForegroundColor Yellow
Write-Host ""
if ($imported -gt 0) {
Write-Host "🎉 Importation terminée!" -ForegroundColor Green
Write-Host ""
Write-Host "📌 Prochaines étapes:" -ForegroundColor Yellow
Write-Host " 1. Ouvrez N8N dans votre navigateur" -ForegroundColor White
Write-Host " 2. Configurez les variables d'environnement (Settings → Variables)" -ForegroundColor White
Write-Host " 3. Configurez les connexions (Slack, Email, OpenAI)" -ForegroundColor White
Write-Host " 4. Activez les workflows (bouton play)" -ForegroundColor White
Write-Host ""
Write-Host "📚 Documentation: N8N-SETUP.md" -ForegroundColor Cyan
} else {
Write-Host "⚠️ Aucun workflow n'a pu être importé" -ForegroundColor Yellow
Write-Host "Consultez la documentation N8N-SETUP.md pour plus d'informations" -ForegroundColor Cyan
}
Write-Host ""

View File

@@ -11,7 +11,7 @@
*
* Environment variables:
* PORT - Server port (default: 3001)
* DATABASE_URL - Prisma database URL (default: ../../keep-notes/prisma/dev.db)
* DATABASE_URL - Prisma database URL (default: ../../memento-note/prisma/dev.db)
* USER_ID - Optional user ID to filter data
* APP_BASE_URL - Optional Next.js app URL for AI features (default: http://localhost:3000)
* MCP_REQUIRE_AUTH - Set to 'true' to require x-api-key or x-user-id header
@@ -22,7 +22,7 @@
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
import { PrismaClient } from '../keep-notes/prisma/client-generated/index.js';
import { PrismaClient } from '../memento-note/prisma/client-generated/index.js';
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
import { randomUUID } from 'crypto';

View File

@@ -9,7 +9,7 @@
* - Lazy user resolution
*
* Environment variables:
* DATABASE_URL - Prisma database URL (default: ../../keep-notes/prisma/dev.db)
* DATABASE_URL - Prisma database URL (default: ../../memento-note/prisma/dev.db)
* USER_ID - Optional user ID to filter data
* APP_BASE_URL - Optional Next.js app URL for AI features (default: http://localhost:3000)
* MCP_LOG_LEVEL - Log level: debug, info, warn, error (default: info)
@@ -17,7 +17,7 @@
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import { PrismaClient } from '../keep-notes/prisma/client-generated/index.js';
import { PrismaClient } from '../memento-note/prisma/client-generated/index.js';
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
import { registerTools } from './tools.js';

View File

@@ -8,7 +8,7 @@
"type": "n8n-nodes-langchain.mcptrigger",
"typeVersion": 1,
"position": [250, 300],
"webhookId": "keep-notes-create",
"webhookId": "memento-note-create",
"description": "MCP trigger to create notes with AI classification"
},
{
@@ -24,7 +24,7 @@
"isArchived": "={{ $json.isArchived || false }}",
"notebookId": "={{ $json.notebookId }}"
},
"id": "keep-notes-1",
"id": "memento-note-1",
"name": "Keep Notes - Create Note",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
@@ -175,7 +175,7 @@
"tags": [
{
"createdAt": "2026-01-18T00:00:00.000Z",
"id": "keep-notes-mcp",
"id": "memento-note-mcp",
"name": "Keep Notes MCP"
}
],

View File

@@ -181,7 +181,7 @@
},
{
"parameters": {
"channel": "keep-notes-sync",
"channel": "memento-note-sync",
"text": "📧 New email saved to Keep Notes:\n\n**{{ $json.title }}**\n\nLabels: {{ $json.labels.join(', ') }}\nColor: {{ $json.color }}\n\nView: http://localhost:3000"
},
"id": "notify-slack",
@@ -297,7 +297,7 @@
"tags": [
{
"createdAt": "2026-01-18T00:00:00.000Z",
"id": "keep-notes-integrations",
"id": "memento-note-integrations",
"name": "Keep Notes Integrations"
}
],

View File

@@ -8,7 +8,7 @@
"type": "n8n-nodes-langchain.mcptrigger",
"typeVersion": 1,
"position": [250, 300],
"webhookId": "keep-notes-labels",
"webhookId": "memento-note-labels",
"description": "MCP trigger to manage labels"
},
{
@@ -383,7 +383,7 @@
"tags": [
{
"createdAt": "2026-01-18T00:00:00.000Z",
"id": "keep-notes-mcp",
"id": "memento-note-mcp",
"name": "Keep Notes MCP"
}
],

View File

@@ -8,7 +8,7 @@
"type": "n8n-nodes-langchain.mcptrigger",
"typeVersion": 1,
"position": [250, 300],
"webhookId": "keep-notes-notebook",
"webhookId": "memento-note-notebook",
"description": "MCP trigger to manage notebooks"
},
{
@@ -337,7 +337,7 @@
"tags": [
{
"createdAt": "2026-01-18T00:00:00.000Z",
"id": "keep-notes-mcp",
"id": "memento-note-mcp",
"name": "Keep Notes MCP"
}
],

View File

@@ -340,7 +340,7 @@
"tags": [
{
"createdAt": "2026-01-18T00:00:00.000Z",
"id": "keep-notes-mcp",
"id": "memento-note-mcp",
"name": "Keep Notes MCP"
}
],

View File

@@ -8,7 +8,7 @@
"type": "n8n-nodes-langchain.mcptrigger",
"typeVersion": 1,
"position": [250, 300],
"webhookId": "keep-notes-search",
"webhookId": "memento-note-search",
"description": "MCP trigger to search and summarize notes"
},
{
@@ -237,7 +237,7 @@
"tags": [
{
"createdAt": "2026-01-18T00:00:00.000Z",
"id": "keep-notes-mcp",
"id": "memento-note-mcp",
"name": "Keep Notes MCP"
}
],

View File

@@ -1,6 +1,6 @@
{
"name": "memento-mcp-server",
"version": "3.0.0",
"version": "3.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {

View File

@@ -282,7 +282,7 @@ const config = {
"value": "prisma-client-js"
},
"output": {
"value": "/Users/sepehr/dev/Keep/mcp-server/node_modules/.prisma/client",
"value": "/Users/sepehr/dev/Momento/mcp-server/node_modules/.prisma/client",
"fromEnvVar": null
},
"config": {
@@ -296,7 +296,7 @@ const config = {
}
],
"previewFeatures": [],
"sourceFilePath": "/Users/sepehr/dev/Keep/mcp-server/prisma/schema.prisma",
"sourceFilePath": "/Users/sepehr/dev/Momento/mcp-server/prisma/schema.prisma",
"isCustomOutput": true
},
"relativeEnvPaths": {
@@ -309,17 +309,17 @@ const config = {
"db"
],
"activeProvider": "sqlite",
"postinstall": true,
"postinstall": false,
"inlineDatasources": {
"db": {
"url": {
"fromEnvVar": null,
"value": "file:../../keep-notes/prisma/dev.db"
"value": "file:../../memento-note/prisma/dev.db"
}
}
},
"inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../node_modules/.prisma/client\"\n}\n\ndatasource db {\n provider = \"sqlite\"\n url = \"file:../../keep-notes/prisma/dev.db\"\n}\n\nmodel Note {\n id String @id @default(cuid())\n title String?\n content String\n color String @default(\"default\")\n isPinned Boolean @default(false)\n isArchived Boolean @default(false)\n type String @default(\"text\")\n checkItems String?\n labels String?\n images String?\n links String?\n reminder DateTime?\n isReminderDone Boolean @default(false)\n reminderRecurrence String?\n reminderLocation String?\n isMarkdown Boolean @default(false)\n size String @default(\"small\")\n embedding String?\n sharedWith String?\n userId String?\n order Int @default(0)\n notebookId String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n autoGenerated Boolean?\n aiProvider String?\n aiConfidence Int?\n language String?\n languageConfidence Float?\n lastAiAnalysis DateTime?\n}\n\nmodel Notebook {\n id String @id @default(cuid())\n name String\n icon String?\n color String?\n order Int\n userId String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Label {\n id String @id @default(cuid())\n name String\n color String @default(\"gray\")\n notebookId String?\n userId String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String @unique\n emailVerified DateTime?\n password String?\n role String @default(\"USER\")\n image String?\n theme String @default(\"light\")\n resetToken String? @unique\n resetTokenExpiry DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Account {\n userId String\n type String\n provider String\n providerAccountId String\n refresh_token String?\n access_token String?\n expires_at Int?\n token_type String?\n scope String?\n id_token String?\n session_state String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@id([provider, providerAccountId])\n}\n\nmodel Session {\n sessionToken String @unique\n userId String\n expires DateTime\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel VerificationToken {\n identifier String\n token String\n expires DateTime\n\n @@id([identifier, token])\n}\n\nmodel NoteShare {\n id String @id @default(cuid())\n noteId String\n userId String\n sharedBy String\n status String @default(\"pending\")\n permission String @default(\"view\")\n notifiedAt DateTime?\n respondedAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([noteId, userId])\n}\n\nmodel SystemConfig {\n key String @id\n value String\n}\n\nmodel AiFeedback {\n id String @id @default(cuid())\n noteId String\n userId String?\n feedbackType String\n feature String\n originalContent String\n correctedContent String?\n metadata String?\n createdAt DateTime @default(now())\n}\n\nmodel MemoryEchoInsight {\n id String @id @default(cuid())\n userId String?\n note1Id String\n note2Id String\n similarityScore Float\n insight String\n insightDate DateTime @default(now())\n viewed Boolean @default(false)\n feedback String?\n dismissed Boolean @default(false)\n\n @@unique([userId, insightDate])\n}\n\nmodel UserAISettings {\n userId String @id\n titleSuggestions Boolean @default(true)\n semanticSearch Boolean @default(true)\n paragraphRefactor Boolean @default(true)\n memoryEcho Boolean @default(true)\n memoryEchoFrequency String @default(\"daily\")\n aiProvider String @default(\"auto\")\n preferredLanguage String @default(\"auto\")\n fontSize String @default(\"medium\")\n demoMode Boolean @default(false)\n showRecentNotes Boolean @default(false)\n emailNotifications Boolean @default(false)\n desktopNotifications Boolean @default(false)\n anonymousAnalytics Boolean @default(false)\n}\n",
"inlineSchemaHash": "6a26806e7b9877b7e438c48efac7d74491a5f9cec9077bf64e4b64230ba79c87",
"inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../node_modules/.prisma/client\"\n}\n\ndatasource db {\n provider = \"sqlite\"\n url = \"file:../../memento-note/prisma/dev.db\"\n}\n\nmodel Note {\n id String @id @default(cuid())\n title String?\n content String\n color String @default(\"default\")\n isPinned Boolean @default(false)\n isArchived Boolean @default(false)\n type String @default(\"text\")\n checkItems String?\n labels String?\n images String?\n links String?\n reminder DateTime?\n isReminderDone Boolean @default(false)\n reminderRecurrence String?\n reminderLocation String?\n isMarkdown Boolean @default(false)\n size String @default(\"small\")\n embedding String?\n sharedWith String?\n userId String?\n order Int @default(0)\n notebookId String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n autoGenerated Boolean?\n aiProvider String?\n aiConfidence Int?\n language String?\n languageConfidence Float?\n lastAiAnalysis DateTime?\n}\n\nmodel Notebook {\n id String @id @default(cuid())\n name String\n icon String?\n color String?\n order Int\n userId String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Label {\n id String @id @default(cuid())\n name String\n color String @default(\"gray\")\n notebookId String?\n userId String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String @unique\n emailVerified DateTime?\n password String?\n role String @default(\"USER\")\n image String?\n theme String @default(\"light\")\n resetToken String? @unique\n resetTokenExpiry DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Account {\n userId String\n type String\n provider String\n providerAccountId String\n refresh_token String?\n access_token String?\n expires_at Int?\n token_type String?\n scope String?\n id_token String?\n session_state String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@id([provider, providerAccountId])\n}\n\nmodel Session {\n sessionToken String @unique\n userId String\n expires DateTime\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel VerificationToken {\n identifier String\n token String\n expires DateTime\n\n @@id([identifier, token])\n}\n\nmodel NoteShare {\n id String @id @default(cuid())\n noteId String\n userId String\n sharedBy String\n status String @default(\"pending\")\n permission String @default(\"view\")\n notifiedAt DateTime?\n respondedAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([noteId, userId])\n}\n\nmodel SystemConfig {\n key String @id\n value String\n}\n\nmodel AiFeedback {\n id String @id @default(cuid())\n noteId String\n userId String?\n feedbackType String\n feature String\n originalContent String\n correctedContent String?\n metadata String?\n createdAt DateTime @default(now())\n}\n\nmodel MemoryEchoInsight {\n id String @id @default(cuid())\n userId String?\n note1Id String\n note2Id String\n similarityScore Float\n insight String\n insightDate DateTime @default(now())\n viewed Boolean @default(false)\n feedback String?\n dismissed Boolean @default(false)\n\n @@unique([userId, insightDate])\n}\n\nmodel UserAISettings {\n userId String @id\n titleSuggestions Boolean @default(true)\n semanticSearch Boolean @default(true)\n paragraphRefactor Boolean @default(true)\n memoryEcho Boolean @default(true)\n memoryEchoFrequency String @default(\"daily\")\n aiProvider String @default(\"auto\")\n preferredLanguage String @default(\"auto\")\n fontSize String @default(\"medium\")\n demoMode Boolean @default(false)\n showRecentNotes Boolean @default(false)\n emailNotifications Boolean @default(false)\n desktopNotifications Boolean @default(false)\n anonymousAnalytics Boolean @default(false)\n}\n",
"inlineSchemaHash": "6ce10c6c9fc6897f9259cc0a3de8b8d6f20d740bb72c180eca62e4dbc01158ab",
"copyEngine": true
}
config.dirname = '/'

View File

@@ -283,7 +283,7 @@ const config = {
"value": "prisma-client-js"
},
"output": {
"value": "/Users/sepehr/dev/Keep/mcp-server/node_modules/.prisma/client",
"value": "/Users/sepehr/dev/Momento/mcp-server/node_modules/.prisma/client",
"fromEnvVar": null
},
"config": {
@@ -297,7 +297,7 @@ const config = {
}
],
"previewFeatures": [],
"sourceFilePath": "/Users/sepehr/dev/Keep/mcp-server/prisma/schema.prisma",
"sourceFilePath": "/Users/sepehr/dev/Momento/mcp-server/prisma/schema.prisma",
"isCustomOutput": true
},
"relativeEnvPaths": {
@@ -310,17 +310,17 @@ const config = {
"db"
],
"activeProvider": "sqlite",
"postinstall": true,
"postinstall": false,
"inlineDatasources": {
"db": {
"url": {
"fromEnvVar": null,
"value": "file:../../keep-notes/prisma/dev.db"
"value": "file:../../memento-note/prisma/dev.db"
}
}
},
"inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../node_modules/.prisma/client\"\n}\n\ndatasource db {\n provider = \"sqlite\"\n url = \"file:../../keep-notes/prisma/dev.db\"\n}\n\nmodel Note {\n id String @id @default(cuid())\n title String?\n content String\n color String @default(\"default\")\n isPinned Boolean @default(false)\n isArchived Boolean @default(false)\n type String @default(\"text\")\n checkItems String?\n labels String?\n images String?\n links String?\n reminder DateTime?\n isReminderDone Boolean @default(false)\n reminderRecurrence String?\n reminderLocation String?\n isMarkdown Boolean @default(false)\n size String @default(\"small\")\n embedding String?\n sharedWith String?\n userId String?\n order Int @default(0)\n notebookId String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n autoGenerated Boolean?\n aiProvider String?\n aiConfidence Int?\n language String?\n languageConfidence Float?\n lastAiAnalysis DateTime?\n}\n\nmodel Notebook {\n id String @id @default(cuid())\n name String\n icon String?\n color String?\n order Int\n userId String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Label {\n id String @id @default(cuid())\n name String\n color String @default(\"gray\")\n notebookId String?\n userId String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String @unique\n emailVerified DateTime?\n password String?\n role String @default(\"USER\")\n image String?\n theme String @default(\"light\")\n resetToken String? @unique\n resetTokenExpiry DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Account {\n userId String\n type String\n provider String\n providerAccountId String\n refresh_token String?\n access_token String?\n expires_at Int?\n token_type String?\n scope String?\n id_token String?\n session_state String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@id([provider, providerAccountId])\n}\n\nmodel Session {\n sessionToken String @unique\n userId String\n expires DateTime\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel VerificationToken {\n identifier String\n token String\n expires DateTime\n\n @@id([identifier, token])\n}\n\nmodel NoteShare {\n id String @id @default(cuid())\n noteId String\n userId String\n sharedBy String\n status String @default(\"pending\")\n permission String @default(\"view\")\n notifiedAt DateTime?\n respondedAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([noteId, userId])\n}\n\nmodel SystemConfig {\n key String @id\n value String\n}\n\nmodel AiFeedback {\n id String @id @default(cuid())\n noteId String\n userId String?\n feedbackType String\n feature String\n originalContent String\n correctedContent String?\n metadata String?\n createdAt DateTime @default(now())\n}\n\nmodel MemoryEchoInsight {\n id String @id @default(cuid())\n userId String?\n note1Id String\n note2Id String\n similarityScore Float\n insight String\n insightDate DateTime @default(now())\n viewed Boolean @default(false)\n feedback String?\n dismissed Boolean @default(false)\n\n @@unique([userId, insightDate])\n}\n\nmodel UserAISettings {\n userId String @id\n titleSuggestions Boolean @default(true)\n semanticSearch Boolean @default(true)\n paragraphRefactor Boolean @default(true)\n memoryEcho Boolean @default(true)\n memoryEchoFrequency String @default(\"daily\")\n aiProvider String @default(\"auto\")\n preferredLanguage String @default(\"auto\")\n fontSize String @default(\"medium\")\n demoMode Boolean @default(false)\n showRecentNotes Boolean @default(false)\n emailNotifications Boolean @default(false)\n desktopNotifications Boolean @default(false)\n anonymousAnalytics Boolean @default(false)\n}\n",
"inlineSchemaHash": "6a26806e7b9877b7e438c48efac7d74491a5f9cec9077bf64e4b64230ba79c87",
"inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../node_modules/.prisma/client\"\n}\n\ndatasource db {\n provider = \"sqlite\"\n url = \"file:../../memento-note/prisma/dev.db\"\n}\n\nmodel Note {\n id String @id @default(cuid())\n title String?\n content String\n color String @default(\"default\")\n isPinned Boolean @default(false)\n isArchived Boolean @default(false)\n type String @default(\"text\")\n checkItems String?\n labels String?\n images String?\n links String?\n reminder DateTime?\n isReminderDone Boolean @default(false)\n reminderRecurrence String?\n reminderLocation String?\n isMarkdown Boolean @default(false)\n size String @default(\"small\")\n embedding String?\n sharedWith String?\n userId String?\n order Int @default(0)\n notebookId String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n autoGenerated Boolean?\n aiProvider String?\n aiConfidence Int?\n language String?\n languageConfidence Float?\n lastAiAnalysis DateTime?\n}\n\nmodel Notebook {\n id String @id @default(cuid())\n name String\n icon String?\n color String?\n order Int\n userId String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Label {\n id String @id @default(cuid())\n name String\n color String @default(\"gray\")\n notebookId String?\n userId String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String @unique\n emailVerified DateTime?\n password String?\n role String @default(\"USER\")\n image String?\n theme String @default(\"light\")\n resetToken String? @unique\n resetTokenExpiry DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Account {\n userId String\n type String\n provider String\n providerAccountId String\n refresh_token String?\n access_token String?\n expires_at Int?\n token_type String?\n scope String?\n id_token String?\n session_state String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@id([provider, providerAccountId])\n}\n\nmodel Session {\n sessionToken String @unique\n userId String\n expires DateTime\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel VerificationToken {\n identifier String\n token String\n expires DateTime\n\n @@id([identifier, token])\n}\n\nmodel NoteShare {\n id String @id @default(cuid())\n noteId String\n userId String\n sharedBy String\n status String @default(\"pending\")\n permission String @default(\"view\")\n notifiedAt DateTime?\n respondedAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([noteId, userId])\n}\n\nmodel SystemConfig {\n key String @id\n value String\n}\n\nmodel AiFeedback {\n id String @id @default(cuid())\n noteId String\n userId String?\n feedbackType String\n feature String\n originalContent String\n correctedContent String?\n metadata String?\n createdAt DateTime @default(now())\n}\n\nmodel MemoryEchoInsight {\n id String @id @default(cuid())\n userId String?\n note1Id String\n note2Id String\n similarityScore Float\n insight String\n insightDate DateTime @default(now())\n viewed Boolean @default(false)\n feedback String?\n dismissed Boolean @default(false)\n\n @@unique([userId, insightDate])\n}\n\nmodel UserAISettings {\n userId String @id\n titleSuggestions Boolean @default(true)\n semanticSearch Boolean @default(true)\n paragraphRefactor Boolean @default(true)\n memoryEcho Boolean @default(true)\n memoryEchoFrequency String @default(\"daily\")\n aiProvider String @default(\"auto\")\n preferredLanguage String @default(\"auto\")\n fontSize String @default(\"medium\")\n demoMode Boolean @default(false)\n showRecentNotes Boolean @default(false)\n emailNotifications Boolean @default(false)\n desktopNotifications Boolean @default(false)\n anonymousAnalytics Boolean @default(false)\n}\n",
"inlineSchemaHash": "6ce10c6c9fc6897f9259cc0a3de8b8d6f20d740bb72c180eca62e4dbc01158ab",
"copyEngine": true
}

View File

@@ -1,5 +1,5 @@
{
"name": "prisma-client-335178138a2302fddc6069fd0c4da8598be3b531edb6ec6288b57b847324be3b",
"name": "prisma-client-07b35a59db17a461d4c7b787cc433edb9e7b79a627ae71660fd00cce5311cf75",
"main": "index.js",
"types": "index.d.ts",
"browser": "index-browser.js",

View File

@@ -5,7 +5,7 @@ generator client {
datasource db {
provider = "sqlite"
url = "file:../../keep-notes/prisma/dev.db"
url = "file:../../memento-note/prisma/dev.db"
}
model Note {

View File

@@ -1,35 +0,0 @@
{
"$schema": "https://opencode.ai/config.json",
"agent": {
"analyst": {
"prompt": "{file:./.bmad-core/agents/analyst.md}"
},
"architect": {
"prompt": "{file:./.bmad-core/agents/architect.md}"
},
"bmad-master": {
"prompt": "{file:./.bmad-core/agents/bmad-master.md}"
},
"bmad-orchestrator": {
"prompt": "{file:./.bmad-core/agents/bmad-orchestrator.md}"
},
"dev": {
"prompt": "{file:./.bmad-core/agents/dev.md}"
},
"pm": {
"prompt": "{file:./.bmad-core/agents/pm.md}"
},
"po": {
"prompt": "{file:./.bmad-core/agents/po.md}"
},
"qa": {
"prompt": "{file:./.bmad-core/agents/qa.md}"
},
"sm": {
"prompt": "{file:./.bmad-core/agents/sm.md}"
},
"ux-expert": {
"prompt": "{file:./.bmad-core/agents/ux-expert.md}"
}
}
}

View File

@@ -1,12 +1,12 @@
{
"name": "memento-mcp-server",
"version": "3.0.0",
"version": "3.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "memento-mcp-server",
"version": "3.0.0",
"version": "3.1.0",
"dependencies": {
"@modelcontextprotocol/sdk": "^1.0.4",
"@prisma/client": "^5.22.0",
@@ -17,6 +17,9 @@
"devDependencies": {
"@types/node": "^20.0.0",
"prisma": "^5.22.0"
},
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@hono/node-server": {

View File

@@ -5,7 +5,7 @@ generator client {
datasource db {
provider = "sqlite"
url = "file:../../keep-notes/prisma/dev.db"
url = "file:../../memento-note/prisma/dev.db"
}
model Note {

View File

@@ -1,15 +0,0 @@
@echo off
REM Script pour démarrer le serveur MCP Keep Notes
REM Mode: Stdio (par défaut)
echo.
echo ==========================================
echo 🚀 Keep Notes MCP Server
echo ==========================================
echo.
echo Démarrage du serveur MCP en mode Stdio...
echo Appuyez sur Ctrl+C pour arrêter
echo.
cd /d "%~dp0"
node index.js

View File

@@ -1,43 +0,0 @@
# Script pour démarrer le serveur MCP Keep Notes
# Mode: Stdio (par défaut)
Write-Host ""
Write-Host "==========================================" -ForegroundColor Cyan
Write-Host " 🚀 Keep Notes MCP Server" -ForegroundColor Cyan
Write-Host "==========================================" -ForegroundColor Cyan
Write-Host ""
Write-Host "📌 Mode: Stdio" -ForegroundColor Yellow
Write-Host "📌 Chemin: $PSScriptRoot" -ForegroundColor Yellow
Write-Host ""
Write-Host "⏳ Démarrage du serveur..." -ForegroundColor Green
Write-Host "🛑 Appuyez sur Ctrl+C pour arrêter" -ForegroundColor Red
Write-Host ""
# Vérifier si Prisma est généré
if (-not (Test-Path "node_modules\.prisma\client")) {
Write-Host "⚠️ Client Prisma non trouvé, génération en cours..." -ForegroundColor Yellow
npx prisma generate
Write-Host "✅ Client Prisma généré" -ForegroundColor Green
}
# Vérifier que Keep Notes est en cours d'exécution
try {
$response = Invoke-WebRequest -Uri "http://localhost:3000" -UseBasicParsing -TimeoutSec 2
Write-Host "✅ Keep Notes est en cours d'exécution" -ForegroundColor Green
} catch {
Write-Host "⚠️ Attention: Keep Notes n'est pas accessible sur localhost:3000" -ForegroundColor Yellow
Write-Host " Le serveur MCP risque de ne pas fonctionner correctement" -ForegroundColor Yellow
Write-Host ""
$continue = Read-Host "Voulez-vous continuer quand même? (O/N)"
if ($continue -ne "O" -and $continue -ne "o") {
Write-Host "❌ Annulation" -ForegroundColor Red
exit 1
}
}
Write-Host ""
Write-Host "🚀 Démarrage du serveur MCP..." -ForegroundColor Green
Write-Host ""
# Démarrer le serveur
node index.js

View File

@@ -1,67 +0,0 @@
# Script pour démarrer le serveur MCP Keep Notes en mode SSE
# Mode: Server-Sent Events (HTTP)
Write-Host ""
Write-Host "==========================================" -ForegroundColor Cyan
Write-Host " 🚀 Keep Notes MCP Server (SSE)" -ForegroundColor Cyan
Write-Host "==========================================" -ForegroundColor Cyan
Write-Host ""
Write-Host "📌 Mode: SSE (HTTP sur port 3001)" -ForegroundColor Yellow
Write-Host "📌 Chemin: $PSScriptRoot" -ForegroundColor Yellow
Write-Host ""
# Vérifier si Prisma est généré
if (-not (Test-Path "node_modules\.prisma\client")) {
Write-Host "⚠️ Client Prisma non trouvé, génération en cours..." -ForegroundColor Yellow
npx prisma generate
if ($LASTEXITCODE -eq 0) {
Write-Host "✅ Client Prisma généré" -ForegroundColor Green
} else {
Write-Host "❌ Erreur lors de la génération du client Prisma" -ForegroundColor Red
exit 1
}
}
# Vérifier que Keep Notes est en cours d'exécution
Write-Host "🔍 Vérification de Keep Notes..." -ForegroundColor Cyan
try {
$response = Invoke-WebRequest -Uri "http://localhost:3000" -UseBasicParsing -TimeoutSec 5
Write-Host "✅ Keep Notes est en cours d'exécution (port 3000)" -ForegroundColor Green
} catch {
Write-Host "⚠️ Attention: Keep Notes n'est pas accessible sur localhost:3000" -ForegroundColor Yellow
Write-Host " Le serveur MCP SSE risque de ne pas fonctionner correctement" -ForegroundColor Yellow
Write-Host ""
$continue = Read-Host "Voulez-vous continuer quand même? (O/N)"
if ($continue -ne "O" -and $continue -ne "o") {
Write-Host "❌ Annulation" -ForegroundColor Red
exit 1
}
}
Write-Host ""
Write-Host "⏳ Démarrage du serveur MCP SSE..." -ForegroundColor Green
Write-Host "🛑 Appuyez sur Ctrl+C pour arrêter" -ForegroundColor Red
Write-Host ""
Write-Host "🌐 Serveur accessible sur:" -ForegroundColor Cyan
Write-Host " - Local: http://localhost:3001" -ForegroundColor White
Write-Host " - Network: Trouvez votre IP avec 'ipconfig'" -ForegroundColor White
Write-Host ""
Write-Host "📋 Endpoints:" -ForegroundColor Cyan
Write-Host " - Health: GET http://localhost:3001/" -ForegroundColor White
Write-Host " - SSE: GET http://localhost:3001/sse" -ForegroundColor White
Write-Host " - Message: POST http://localhost:3001/message" -ForegroundColor White
Write-Host ""
# Démarrer le serveur
try {
node index-sse.js
} catch {
Write-Host "❌ Erreur lors du démarrage du serveur:" -ForegroundColor Red
Write-Host " $($_.Exception.Message)" -ForegroundColor Red
Write-Host ""
Write-Host "Dépannage:" -ForegroundColor Yellow
Write-Host "1. Vérifiez que le port 3001 n'est pas déjà utilisé" -ForegroundColor White
Write-Host "2. Vérifiez que Node.js est installé (node --version)" -ForegroundColor White
Write-Host "3. Vérifiez les dépendances (npm list)" -ForegroundColor White
exit 1
}

View File

@@ -1,5 +1,5 @@
#!/bin/bash
export PORT=4242
export DATABASE_URL="file:../keep-notes/prisma/dev.db"
export DATABASE_URL="file:../memento-note/prisma/dev.db"
export MCP_LOG_LEVEL=info
node index-sse.js

View File

@@ -14,7 +14,7 @@ try {
const prisma = new PrismaClient({
datasources: {
db: {
url: 'file:D:/dev_new_pc/Keep/keep-notes/prisma/dev.db'
url: 'file:D:/dev_new_pc/Keep/memento-note/prisma/dev.db'
}
}
});

View File

@@ -5,11 +5,11 @@
* node test/performance-test.js
*/
import { PrismaClient } from '../keep-notes/prisma/client-generated/index.js';
import { PrismaClient } from '../memento-note/prisma/client-generated/index.js';
const prisma = new PrismaClient({
datasources: {
db: { url: process.env.DATABASE_URL || 'file:../keep-notes/prisma/dev.db' },
db: { url: process.env.DATABASE_URL || 'file:../memento-note/prisma/dev.db' },
},
});

View File

@@ -4,13 +4,13 @@
* Les notes sont créées avec isMarkdown: true
*/
import { PrismaClient } from '../keep-notes/prisma/client-generated/index.js';
import { PrismaClient } from '../memento-note/prisma/client-generated/index.js';
import { readFileSync } from 'fs';
import { join } from 'path';
const prisma = new PrismaClient({
datasources: {
db: { url: 'file:/Users/sepehr/dev/Keep/keep-notes/prisma/dev.db' },
db: { url: 'file:/Users/sepehr/dev/Keep/memento-note/prisma/dev.db' },
},
});
@@ -20,10 +20,10 @@ const documents = [
{ file: 'source-tree-analysis.md', title: '📁 Source Tree Analysis', color: 'green' },
{ file: 'project-overview.md', title: '🎯 Project Overview', color: 'purple' },
{ file: 'deployment-guide.md', title: '🚀 Deployment Guide', color: 'orange' },
{ file: 'development-guide-keep-notes.md', title: '💻 Development Guide', color: 'teal' },
{ file: 'development-guide-memento-note.md', title: '💻 Development Guide', color: 'teal' },
{ file: 'integration-architecture.md', title: '🔌 Integration Architecture', color: 'blue' },
{ file: 'api-contracts-keep-notes.md', title: '📡 API Contracts Keep Notes', color: 'yellow' },
{ file: 'architecture-keep-notes.md', title: '🏗️ Architecture Keep Notes', color: 'purple' },
{ file: 'api-contracts-memento-note.md', title: '📡 API Contracts Keep Notes', color: 'yellow' },
{ file: 'architecture-memento-note.md', title: '🏗️ Architecture Keep Notes', color: 'purple' },
{ file: 'code-review-cleanup-report.md', title: '🔍 Code Review Cleanup Report', color: 'red' },
{ file: 'data-models.md', title: '🗄️ Data Models', color: 'gray' },
{ file: 'component-inventory.md', title: '🧩 Component Inventory', color: 'teal' },