chore: clean up repo - remove docs, tool configs, test files, images
Removed from repo and disk: - _bmad/, _bmad-output/, .agent/, .claude/, .cursor/, .gemini/, .kilocode/, .opencode/, .playwright-mcp/, .ralph/, .github/, bmalph/ - docs/ directory (outdated architecture docs) - Root markdown files (18 obsolete docs) - Root images (8 screenshots/test images) - MCP server docs and N8N workflow JSONs (7 files) - memento-note junk (test files, temp files, color guides, old DB) - Root package-lock.json, package.json.bak Updated .gitignore to prevent re-tracking. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
@@ -1,275 +0,0 @@
|
||||
# Configuration N8N - Memento MCP SSE Server
|
||||
|
||||
## 🎯 Ton IP Actuelle
|
||||
**IP Principale**: `172.26.64.1`
|
||||
|
||||
## 🔌 Configuration MCP Client dans N8N
|
||||
|
||||
### Option 1: Via Settings → MCP Access (Recommandé)
|
||||
|
||||
1. Ouvre N8N dans ton navigateur
|
||||
2. Va dans **Settings** (⚙️)
|
||||
3. Sélectionne **MCP Access**
|
||||
4. Clique sur **Add Server** ou **+**
|
||||
5. Entre cette configuration:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "memento",
|
||||
"transport": "sse",
|
||||
"url": "http://172.26.64.1:3001/sse",
|
||||
"description": "Memento Note-taking App MCP Server"
|
||||
}
|
||||
```
|
||||
|
||||
6. Sauvegarde la configuration
|
||||
7. Dans tes workflows, active **"Available in MCP"** (toggle)
|
||||
8. Utilise le node **MCP Client** pour appeler les tools
|
||||
|
||||
### Option 2: Via Variables d'Environnement
|
||||
|
||||
Si tu as accès aux variables d'environnement de N8N:
|
||||
|
||||
```bash
|
||||
export N8N_MCP_SERVERS='{
|
||||
"memento": {
|
||||
"transport": "sse",
|
||||
"url": "http://172.26.64.1:3001/sse"
|
||||
}
|
||||
}'
|
||||
```
|
||||
|
||||
Ou dans Docker:
|
||||
```yaml
|
||||
environment:
|
||||
- N8N_MCP_SERVERS={"memento":{"transport":"sse","url":"http://172.26.64.1:3001/sse"}}
|
||||
```
|
||||
|
||||
### Option 3: Via Fichier de Configuration
|
||||
|
||||
Si N8N utilise un fichier config:
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"memento": {
|
||||
"transport": "sse",
|
||||
"url": "http://172.26.64.1:3001/sse"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 🛠️ 9 Tools Disponibles
|
||||
|
||||
Une fois configuré, tu peux appeler ces tools depuis N8N:
|
||||
|
||||
### 1. create_note
|
||||
```json
|
||||
{
|
||||
"tool": "create_note",
|
||||
"arguments": {
|
||||
"content": "Ma note de test",
|
||||
"title": "Titre optionnel",
|
||||
"color": "blue",
|
||||
"type": "text",
|
||||
"images": ["data:image/png;base64,..."]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 2. get_notes
|
||||
```json
|
||||
{
|
||||
"tool": "get_notes",
|
||||
"arguments": {
|
||||
"includeArchived": false,
|
||||
"search": "optionnel"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 3. get_note
|
||||
```json
|
||||
{
|
||||
"tool": "get_note",
|
||||
"arguments": {
|
||||
"id": "note_id_ici"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 4. update_note
|
||||
```json
|
||||
{
|
||||
"tool": "update_note",
|
||||
"arguments": {
|
||||
"id": "note_id_ici",
|
||||
"title": "Nouveau titre",
|
||||
"isPinned": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 5. delete_note
|
||||
```json
|
||||
{
|
||||
"tool": "delete_note",
|
||||
"arguments": {
|
||||
"id": "note_id_ici"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 6. search_notes
|
||||
```json
|
||||
{
|
||||
"tool": "search_notes",
|
||||
"arguments": {
|
||||
"query": "recherche"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 7. get_labels
|
||||
```json
|
||||
{
|
||||
"tool": "get_labels",
|
||||
"arguments": {}
|
||||
}
|
||||
```
|
||||
|
||||
### 8. toggle_pin
|
||||
```json
|
||||
{
|
||||
"tool": "toggle_pin",
|
||||
"arguments": {
|
||||
"id": "note_id_ici"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 9. toggle_archive
|
||||
```json
|
||||
{
|
||||
"tool": "toggle_archive",
|
||||
"arguments": {
|
||||
"id": "note_id_ici"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 🚀 Démarrage du Serveur SSE
|
||||
|
||||
### Méthode 1: Script PowerShell (Simple)
|
||||
```powershell
|
||||
cd D:\dev_new_pc\Keep\mcp-server
|
||||
.\start-sse.ps1
|
||||
```
|
||||
|
||||
### Méthode 2: npm
|
||||
```bash
|
||||
cd D:\dev_new_pc\Keep\mcp-server
|
||||
npm run start:sse
|
||||
```
|
||||
|
||||
### Méthode 3: Node direct
|
||||
```bash
|
||||
cd D:\dev_new_pc\Keep\mcp-server
|
||||
node index-sse.js
|
||||
```
|
||||
|
||||
Le serveur démarrera sur:
|
||||
- **Local**: http://localhost:3001
|
||||
- **Réseau**: http://172.26.64.1:3001
|
||||
- **SSE Endpoint**: http://172.26.64.1:3001/sse
|
||||
|
||||
## ✅ Vérification
|
||||
|
||||
### Test 1: Health Check (depuis ton PC)
|
||||
```powershell
|
||||
Invoke-RestMethod -Uri "http://localhost:3001/"
|
||||
```
|
||||
|
||||
### Test 2: Health Check (depuis N8N)
|
||||
```bash
|
||||
curl http://172.26.64.1:3001/
|
||||
```
|
||||
|
||||
### Test 3: Workflow N8N
|
||||
|
||||
Crée un workflow avec:
|
||||
|
||||
1. **Manual Trigger**
|
||||
2. **MCP Client** node:
|
||||
- Server: `memento`
|
||||
- Tool: `get_notes`
|
||||
- Arguments: `{}`
|
||||
3. **Code** node pour voir le résultat
|
||||
|
||||
## 🔥 Troubleshooting
|
||||
|
||||
### Erreur: "Connection refused"
|
||||
✅ Vérifie que le serveur SSE tourne:
|
||||
```powershell
|
||||
Get-Process | Where-Object { $_.ProcessName -eq "node" }
|
||||
```
|
||||
|
||||
### Erreur: "Cannot reach server"
|
||||
✅ Vérifie le firewall Windows:
|
||||
```powershell
|
||||
# Ajouter règle firewall pour port 3001
|
||||
New-NetFirewallRule -DisplayName "Memento MCP SSE" -Direction Inbound -LocalPort 3001 -Protocol TCP -Action Allow
|
||||
```
|
||||
|
||||
### Erreur: "SSE connection timeout"
|
||||
✅ Vérifie que N8N peut atteindre ton PC:
|
||||
```bash
|
||||
# Depuis la machine N8N
|
||||
ping 172.26.64.1
|
||||
curl http://172.26.64.1:3001/
|
||||
```
|
||||
|
||||
### N8N sur Docker?
|
||||
Si N8N tourne dans Docker, utilise l'IP de l'hôte Docker, pas `172.26.64.1`.
|
||||
|
||||
Trouve l'IP du host:
|
||||
```bash
|
||||
docker inspect -f '{{range .NetworkSettings.Networks}}{{.Gateway}}{{end}}' <container_id>
|
||||
```
|
||||
|
||||
## 📊 Ports Utilisés
|
||||
|
||||
| Service | Port | URL |
|
||||
|---------|------|-----|
|
||||
| Next.js (Memento UI) | 3000 | http://localhost:3000 |
|
||||
| MCP SSE Server | 3001 | http://172.26.64.1:3001/sse |
|
||||
| REST API | 3000 | http://localhost:3000/api/notes |
|
||||
|
||||
## 🔐 Sécurité
|
||||
|
||||
⚠️ **ATTENTION**: Le serveur SSE n'a **PAS D'AUTHENTIFICATION** actuellement!
|
||||
|
||||
Pour production:
|
||||
1. Ajoute une clé API
|
||||
2. Utilise HTTPS avec certificat SSL
|
||||
3. Restreins les CORS origins
|
||||
4. Utilise un reverse proxy (nginx)
|
||||
|
||||
## 📚 Documentation Complète
|
||||
|
||||
- [MCP-SSE-ANALYSIS.md](../MCP-SSE-ANALYSIS.md) - Analyse détaillée SSE
|
||||
- [README-SSE.md](README-SSE.md) - Documentation serveur SSE
|
||||
- [README.md](../README.md) - Documentation projet
|
||||
|
||||
## 🎉 C'est Prêt!
|
||||
|
||||
Ton serveur MCP SSE est configuré et prêt pour N8N!
|
||||
|
||||
**Endpoint N8N**: `http://172.26.64.1:3001/sse`
|
||||
|
||||
---
|
||||
|
||||
**Dernière mise à jour**: 4 janvier 2026
|
||||
**IP**: 172.26.64.1
|
||||
**Port**: 3001
|
||||
**Status**: ✅ Opérationnel
|
||||
@@ -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)
|
||||
@@ -1,376 +0,0 @@
|
||||
# Workflows N8N pour Keep Notes MCP
|
||||
|
||||
## 📚 Introduction
|
||||
|
||||
Ce dossier contient 6 workflows N8N prêts à l'emploi pour votre serveur MCP Keep Notes. Chaque workflow est conçu pour une fonctionnalité spécifique et peut être importé directement dans N8N.
|
||||
|
||||
## 🚀 Workflows disponibles
|
||||
|
||||
### 1. **Create Note with Classification** (`n8n-workflow-create-note.json`)
|
||||
|
||||
**Description:** Crée des notes dans Keep Notes avec classification automatique par IA.
|
||||
|
||||
**Fonctionnalités:**
|
||||
- Création de notes avec titres, contenus, labels, notebooks
|
||||
- Classification automatique par IA pour suggérer:
|
||||
- Titres pertinents
|
||||
- Labels appropriés
|
||||
- Notebook optimal
|
||||
- Catégorie (work/personal/idea)
|
||||
|
||||
**Cas d'usage:**
|
||||
- Création rapide de notes depuis des conversations
|
||||
- Capture d'idées avec auto-organisation
|
||||
- Génération automatique de métadonnées
|
||||
|
||||
**Utilisation:**
|
||||
```json
|
||||
{
|
||||
"content": "Meeting with client next week to discuss project timeline",
|
||||
"color": "blue",
|
||||
"labels": ["work"]
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 2. **Search & Summary** (`n8n-workflow-search-summary.json`)
|
||||
|
||||
**Description:** Recherche des notes et génère un résumé avec IA.
|
||||
|
||||
**Fonctionnalités:**
|
||||
- Recherche par mot-clé dans titres et contenus
|
||||
- Filtrage intelligent des résultats
|
||||
- Génération de résumés par IA
|
||||
- Extraction des thèmes principaux
|
||||
- Identification des action items
|
||||
- Groupement de notes par thème
|
||||
|
||||
**Cas d'usage:**
|
||||
- Rapports hebdomadaires d'activité
|
||||
- Analyse de thématiques
|
||||
- Synthèse rapide de projets
|
||||
|
||||
**Utilisation:**
|
||||
```json
|
||||
{
|
||||
"searchQuery": "project timeline"
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 3. **Notebook Manager** (`n8n-workflow-notebook-management.json`)
|
||||
|
||||
**Description:** Gestion complète des notebooks (créer, lister, modifier, supprimer).
|
||||
|
||||
**Fonctionnalités:**
|
||||
- **Create**: Créer de nouveaux notebooks avec icône et couleur
|
||||
- **List**: Récupérer tous les notebooks avec leurs notes
|
||||
- **Update**: Modifier nom, icône, couleur d'un notebook
|
||||
- **Delete**: Supprimer un notebook et son contenu
|
||||
|
||||
**Cas d'usage:**
|
||||
- Organisation thématique des notes
|
||||
- Restructuration de l'espace de travail
|
||||
- Archivage de projets terminés
|
||||
|
||||
**Utilisation:**
|
||||
```json
|
||||
{
|
||||
"action": "create",
|
||||
"name": "Work Projects",
|
||||
"icon": "💼",
|
||||
"color": "#3B82F6"
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 4. **Reminder Notifications** (`n8n-workflow-reminder-notifications.json`)
|
||||
|
||||
**Description:** Automatisation des rappels et notifications pour les notes.
|
||||
|
||||
**Fonctionnalités:**
|
||||
- Vérification automatique des rappels (toutes les 30 min)
|
||||
- Notifications Slack/Email
|
||||
- Marquage des rappels comme terminés
|
||||
- Gestion des rappels récurrents (daily, weekly, monthly, yearly)
|
||||
- Mise à jour automatique des dates de rappel
|
||||
|
||||
**Cas d'usage:**
|
||||
- Gestion de tâches avec échéances
|
||||
- Rappels de réunions importantes
|
||||
- Notifications d'événements récurrents
|
||||
|
||||
**Configuration:**
|
||||
- Déclencheur: Schedule (cron: `0 */30 * * * *`)
|
||||
- Canaux: Slack et Email (configurable)
|
||||
- Récurrences: daily, weekly, monthly, yearly
|
||||
|
||||
---
|
||||
|
||||
### 5. **Label Manager** (`n8n-workflow-label-management.json`)
|
||||
|
||||
**Description:** Gestion complète des labels avec suggestion automatique par IA.
|
||||
|
||||
**Fonctionnalités:**
|
||||
- **Create**: Créer des labels avec couleur et notebook
|
||||
- **List**: Récupérer tous les labels (optionnel par notebook)
|
||||
- **Update**: Modifier nom et couleur d'un label
|
||||
- **Delete**: Supprimer un label
|
||||
- **Suggest**: Suggestion automatique de labels par IA
|
||||
|
||||
**Cas d'usage:**
|
||||
- Organisation avancée par tags
|
||||
- Classification automatique de contenu
|
||||
- Gestion de taxonomie dynamique
|
||||
|
||||
**Utilisation:**
|
||||
```json
|
||||
{
|
||||
"action": "suggest",
|
||||
"title": "Budget planning for Q4",
|
||||
"content": "Need to plan budget for the next quarter..."
|
||||
}
|
||||
```
|
||||
|
||||
**Réponse IA:**
|
||||
```json
|
||||
{
|
||||
"labels": ["finance", "budget", "quarterly", "planning"]
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 6. **Email to Note** (`n8n-workflow-email-integration.json`)
|
||||
|
||||
**Description:** Conversion automatique d'emails en notes avec classification.
|
||||
|
||||
**Fonctionnalités:**
|
||||
- Déclenchement sur nouveaux emails (IMAP)
|
||||
- Extraction automatique de données email
|
||||
- Classification par IA:
|
||||
- Thème principal
|
||||
- Détection d'urgence
|
||||
- Suggestion de labels et notebooks
|
||||
- Gestion des emails urgents (pinned, couleur rouge)
|
||||
- Notification Slack après création
|
||||
|
||||
**Cas d'usage:**
|
||||
- Capture automatique d'emails importants
|
||||
- Gestion de boîte de réception
|
||||
- Intégration email → notes intelligentes
|
||||
|
||||
**Configuration:**
|
||||
- Déclencheur: Email Trigger (IMAP)
|
||||
- Filtre: Emails non lus uniquement
|
||||
- Urgence: Détection automatique par IA
|
||||
|
||||
---
|
||||
|
||||
## 📥 Importation des Workflows
|
||||
|
||||
### Méthode 1: Import direct
|
||||
|
||||
1. Ouvrir N8N
|
||||
2. Cliquer sur **"Import from File"**
|
||||
3. Sélectionner le fichier JSON souhaité
|
||||
4. Configurer les paramètres nécessaires (Slack, Email, etc.)
|
||||
5. Activer le workflow
|
||||
|
||||
### Méthode 2: Import via API
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:5678/rest/workflows/import \
|
||||
-H "Content-Type: application/json" \
|
||||
-d @n8n-workflow-create-note.json
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ⚙️ Configuration requise
|
||||
|
||||
### Variables d'environnement
|
||||
|
||||
Dans N8N, configurez les variables suivantes:
|
||||
|
||||
```bash
|
||||
KEEP_NOTES_API_URL=http://localhost:3000
|
||||
SLACK_WEBHOOK_URL=votre_slack_webhook_url
|
||||
EMAIL_ADDRESS=votre_email@gmail.com
|
||||
EMAIL_PASSWORD=votre_mot_de_passe_app
|
||||
OPENAI_API_KEY=votre_clé_openai
|
||||
```
|
||||
|
||||
### Connexions requises
|
||||
|
||||
1. **Keep Notes API**
|
||||
- URL: `http://localhost:3000/api`
|
||||
- Authentification: Si nécessaire
|
||||
|
||||
2. **Slack**
|
||||
- Webhook URL ou OAuth token
|
||||
|
||||
3. **Email (IMAP)**
|
||||
- Serveur IMAP (ex: `imap.gmail.com`)
|
||||
- Email et mot de passe/application password
|
||||
|
||||
4. **OpenAI API**
|
||||
- Pour la classification et la génération de résumés
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Personnalisation
|
||||
|
||||
### Modifier les délais de rappel
|
||||
|
||||
Dans "Reminder Notifications", modifiez l'expression cron:
|
||||
|
||||
```cron
|
||||
# Toutes les 15 minutes
|
||||
0 */15 * * * *
|
||||
|
||||
# Toutes les heures
|
||||
0 * * * *
|
||||
|
||||
# Toutes les 2 heures
|
||||
0 */2 * * *
|
||||
```
|
||||
|
||||
### Changer les couleurs par défaut
|
||||
|
||||
Dans "Create Note", modifiez la valeur par défaut:
|
||||
|
||||
```json
|
||||
{
|
||||
"color": "purple"
|
||||
}
|
||||
```
|
||||
|
||||
### Adapter les catégories de classification
|
||||
|
||||
Dans "Email to Note", modifiez le prompt IA pour inclure vos catégories personnalisées.
|
||||
|
||||
---
|
||||
|
||||
## 🎯 Combinaison de Workflows
|
||||
|
||||
### Exemple: Pipeline complet Email → Classification → Rappel
|
||||
|
||||
```
|
||||
Email Trigger
|
||||
→ Extract Email Data
|
||||
→ AI Classify
|
||||
→ Create Note
|
||||
→ Set Reminder
|
||||
→ Notify Slack
|
||||
```
|
||||
|
||||
### Exemple: Recherche intelligente avec labels
|
||||
|
||||
```
|
||||
MCP Trigger (search)
|
||||
→ Get Notes
|
||||
→ Filter
|
||||
→ AI Suggest Labels
|
||||
→ Apply Labels
|
||||
→ Return Summary
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📊 Monitoring et Logs
|
||||
|
||||
Activer les logs dans N8N pour suivre l'exécution:
|
||||
|
||||
1. Aller dans **Settings** → **Executions**
|
||||
2. Filtrer par workflow
|
||||
3. Voir les détails de chaque exécution
|
||||
4. Déboguer les erreurs éventuelles
|
||||
|
||||
---
|
||||
|
||||
## 🔒 Sécurité
|
||||
|
||||
### Bonnes pratiques
|
||||
|
||||
1. **Ne jamais** exposer des données sensibles dans les workflows
|
||||
2. Utiliser des **variables d'environnement** pour les clés API
|
||||
3. **Limiter** l'accès aux workflows MCP avec authentification
|
||||
4. **Valider** toutes les entrées utilisateur
|
||||
5. **Auditer** régulièrement les exécutions
|
||||
|
||||
### Accès MCP
|
||||
|
||||
Pour sécuriser l'accès MCP aux workflows:
|
||||
|
||||
1. Configurer l'authentification dans le **MCP Server Trigger**
|
||||
2. Utiliser des **Bearer tokens** ou **OAuth**
|
||||
3. Restreindre l'accès par IP si nécessaire
|
||||
|
||||
---
|
||||
|
||||
## 🐛 Dépannage
|
||||
|
||||
### Erreur: "Connection refused to localhost:3000"
|
||||
|
||||
**Solution:** Vérifiez que Keep Notes est démarré sur le port 3000.
|
||||
|
||||
### Erreur: "AI classification failed"
|
||||
|
||||
**Solution:** Vérifiez votre clé OpenAI API et vos crédits.
|
||||
|
||||
### Erreur: "Email trigger not working"
|
||||
|
||||
**Solution:**
|
||||
- Activez l'accès "less secure apps" pour Gmail
|
||||
- Utilisez un "App Password" si 2FA activé
|
||||
|
||||
### Erreur: "Slack notification failed"
|
||||
|
||||
**Solution:** Vérifiez l'URL du webhook Slack et les permissions.
|
||||
|
||||
---
|
||||
|
||||
## 📚 Documentation complémentaire
|
||||
|
||||
- [N8N Documentation](https://docs.n8n.io)
|
||||
- [MCP Protocol](https://modelcontextprotocol.io)
|
||||
- [Keep Notes API](./README.md)
|
||||
|
||||
---
|
||||
|
||||
## 🤝 Contribution
|
||||
|
||||
Pour ajouter de nouveaux workflows:
|
||||
|
||||
1. Créez le fichier JSON correspondant
|
||||
2. Ajoutez la documentation dans ce fichier
|
||||
3. Testez le workflow en local
|
||||
4. Partagez-le avec l'équipe
|
||||
|
||||
---
|
||||
|
||||
## 📝 Notes importantes
|
||||
|
||||
- Tous les workflows utilisent le protocole MCP
|
||||
- L'URL de l'API Keep Notes doit être configurée correctement
|
||||
- Les workflows nécessitent que le serveur Keep Notes soit en cours d'exécution
|
||||
- Les coûts OpenAI s'appliquent pour la classification et la génération de résumés
|
||||
|
||||
---
|
||||
|
||||
## 🎉 Résumé
|
||||
|
||||
| Workflow | Utilisation principale | Complexité |
|
||||
|----------|----------------------|-------------|
|
||||
| Create Note | Création avec IA | ⭐⭐ |
|
||||
| Search & Summary | Analyse de contenu | ⭐⭐⭐ |
|
||||
| Notebook Manager | Gestion notebooks | ⭐ |
|
||||
| Reminder Notifications | Automatisation rappels | ⭐⭐⭐ |
|
||||
| Label Manager | Gestion labels | ⭐⭐ |
|
||||
| Email to Note | Intégration email | ⭐⭐⭐⭐ |
|
||||
|
||||
**Total:** 6 workflows prêts à l'emploi! 🚀
|
||||
@@ -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
|
||||
@@ -1,345 +0,0 @@
|
||||
# Keep Notes MCP Server
|
||||
|
||||
Model Context Protocol (MCP) server for integrating Keep Notes note-taking app with N8N, Cursor, and other automation tools.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
cd mcp-server
|
||||
npm install
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Quick Start (Windows)
|
||||
|
||||
Le plus simple pour démarrer le serveur MCP:
|
||||
|
||||
```powershell
|
||||
# Exécuter depuis le dossier mcp-server
|
||||
.\start-mcp.ps1
|
||||
```
|
||||
|
||||
Ou le script batch:
|
||||
|
||||
```cmd
|
||||
start-mcp.bat
|
||||
```
|
||||
|
||||
Ces scripts vérifient automatiquement les prérequis et démarrent le serveur.
|
||||
|
||||
### Standalone Server (Cross-platform)
|
||||
|
||||
```bash
|
||||
npm start
|
||||
```
|
||||
|
||||
Ou directement:
|
||||
|
||||
```bash
|
||||
node index.js
|
||||
```
|
||||
|
||||
Pour le mode SSE (Server-Sent Events):
|
||||
|
||||
```bash
|
||||
npm run start:sse
|
||||
```
|
||||
|
||||
Voir [START-MCP.md](./START-MCP.md) pour le guide complet de démarrage.
|
||||
|
||||
### With Cursor MCP
|
||||
|
||||
Add to your Cursor MCP client configuration:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"keep-notes": {
|
||||
"command": "node",
|
||||
"args": ["D:/dev_new_pc/Keep/mcp-server/index.js"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### With N8N
|
||||
|
||||
Configure the MCP node in N8N with the server details above.
|
||||
|
||||
## Available Tools
|
||||
|
||||
### Note Management
|
||||
|
||||
#### create_note
|
||||
Create a new note in Keep Notes.
|
||||
|
||||
**Parameters:**
|
||||
- `title` (string, optional): Note title
|
||||
- `content` (string, required): Note content
|
||||
- `color` (string, optional): Note color (default, red, orange, yellow, green, teal, blue, purple, pink, gray)
|
||||
- `type` (string, optional): Note type (text or checklist)
|
||||
- `checkItems` (array, optional): Checklist items
|
||||
- `labels` (array, optional): Note labels/tags
|
||||
- `isPinned` (boolean, optional): Pin the note
|
||||
- `isArchived` (boolean, optional): Archive the note
|
||||
- `images` (array, optional): Note images as base64 encoded strings
|
||||
- `links` (array, optional): Note links
|
||||
- `reminder` (string, optional): Reminder date/time (ISO 8601 format)
|
||||
- `isReminderDone` (boolean, optional): Mark reminder as done
|
||||
- `reminderRecurrence` (string, optional): Reminder recurrence (daily, weekly, monthly, yearly)
|
||||
- `reminderLocation` (string, optional): Reminder location
|
||||
- `isMarkdown` (boolean, optional): Enable markdown support
|
||||
- `size` (string, optional): Note size (small, medium, large)
|
||||
- `notebookId` (string, optional): Notebook ID to associate the note with
|
||||
|
||||
**Example:**
|
||||
```json
|
||||
{
|
||||
"title": "Shopping List",
|
||||
"content": "Buy groceries",
|
||||
"color": "blue",
|
||||
"type": "checklist",
|
||||
"checkItems": [
|
||||
{ "id": "1", "text": "Milk", "checked": false },
|
||||
{ "id": "2", "text": "Bread", "checked": false }
|
||||
],
|
||||
"labels": ["shopping", "personal"],
|
||||
"notebookId": "cuid123..."
|
||||
}
|
||||
```
|
||||
|
||||
#### get_notes
|
||||
Get all notes from Keep Notes.
|
||||
|
||||
**Parameters:**
|
||||
- `includeArchived` (boolean, optional): Include archived notes
|
||||
- `search` (string, optional): Search query to filter notes
|
||||
- `notebookId` (string, optional): Filter notes by notebook ID
|
||||
|
||||
#### get_note
|
||||
Get a specific note by ID.
|
||||
|
||||
**Parameters:**
|
||||
- `id` (string, required): Note ID
|
||||
|
||||
#### update_note
|
||||
Update an existing note.
|
||||
|
||||
**Parameters:**
|
||||
- `id` (string, required): Note ID
|
||||
- All other fields from create_note are optional
|
||||
|
||||
#### delete_note
|
||||
Delete a note by ID.
|
||||
|
||||
**Parameters:**
|
||||
- `id` (string, required): Note ID
|
||||
|
||||
#### search_notes
|
||||
Search notes by query.
|
||||
|
||||
**Parameters:**
|
||||
- `query` (string, required): Search query
|
||||
- `notebookId` (string, optional): Filter search by notebook ID
|
||||
|
||||
#### get_labels
|
||||
Get all unique labels from notes (legacy method).
|
||||
|
||||
**Parameters:** None
|
||||
|
||||
#### toggle_pin
|
||||
Toggle pin status of a note.
|
||||
|
||||
**Parameters:**
|
||||
- `id` (string, required): Note ID
|
||||
|
||||
#### toggle_archive
|
||||
Toggle archive status of a note.
|
||||
|
||||
**Parameters:**
|
||||
- `id` (string, required): Note ID
|
||||
|
||||
### Notebook Management
|
||||
|
||||
#### create_notebook
|
||||
Create a new notebook.
|
||||
|
||||
**Parameters:**
|
||||
- `name` (string, required): Notebook name
|
||||
- `icon` (string, optional): Notebook icon (emoji)
|
||||
- `color` (string, optional): Notebook color (hex code)
|
||||
- `order` (number, optional): Notebook order
|
||||
|
||||
#### get_notebooks
|
||||
Get all notebooks.
|
||||
|
||||
**Parameters:** None
|
||||
|
||||
#### get_notebook
|
||||
Get a specific notebook by ID with its notes.
|
||||
|
||||
**Parameters:**
|
||||
- `id` (string, required): Notebook ID
|
||||
|
||||
#### update_notebook
|
||||
Update an existing notebook.
|
||||
|
||||
**Parameters:**
|
||||
- `id` (string, required): Notebook ID
|
||||
- `name` (string, optional): Notebook name
|
||||
- `icon` (string, optional): Notebook icon
|
||||
- `color` (string, optional): Notebook color
|
||||
- `order` (number, optional): Notebook order
|
||||
|
||||
#### delete_notebook
|
||||
Delete a notebook by ID.
|
||||
|
||||
**Parameters:**
|
||||
- `id` (string, required): Notebook ID
|
||||
|
||||
### Label Management
|
||||
|
||||
#### create_label
|
||||
Create a new label.
|
||||
|
||||
**Parameters:**
|
||||
- `name` (string, required): Label name
|
||||
- `color` (string, optional): Label color (red, orange, yellow, green, teal, blue, purple, pink, gray)
|
||||
- `notebookId` (string, required): Notebook ID to associate the label with
|
||||
|
||||
#### get_labels_detailed
|
||||
Get all labels with details.
|
||||
|
||||
**Parameters:**
|
||||
- `notebookId` (string, optional): Filter labels by notebook ID
|
||||
|
||||
#### update_label
|
||||
Update an existing label.
|
||||
|
||||
**Parameters:**
|
||||
- `id` (string, required): Label ID
|
||||
- `name` (string, optional): Label name
|
||||
- `color` (string, optional): Label color
|
||||
|
||||
#### delete_label
|
||||
Delete a label by ID.
|
||||
|
||||
**Parameters:**
|
||||
- `id` (string, required): Label ID
|
||||
|
||||
## N8N Integration Example
|
||||
|
||||
### Create a note from email
|
||||
```json
|
||||
{
|
||||
"tool": "create_note",
|
||||
"arguments": {
|
||||
"title": "{{ $json.subject }}",
|
||||
"content": "{{ $json.body }}",
|
||||
"labels": ["email", "inbox"],
|
||||
"notebookId": "cuid123..."
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Search notes
|
||||
```json
|
||||
{
|
||||
"tool": "search_notes",
|
||||
"arguments": {
|
||||
"query": "meeting",
|
||||
"notebookId": "cuid123..."
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Create a notebook
|
||||
```json
|
||||
{
|
||||
"tool": "create_notebook",
|
||||
"arguments": {
|
||||
"name": "Work Projects",
|
||||
"icon": "💼",
|
||||
"color": "#3B82F6"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 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`
|
||||
|
||||
## Prisma Schema Reference
|
||||
|
||||
The MCP server works with the following Prisma models:
|
||||
|
||||
### Note Model
|
||||
- id: String (CUID)
|
||||
- title: String?
|
||||
- content: String
|
||||
- color: String (default: "default")
|
||||
- isPinned: Boolean
|
||||
- isArchived: Boolean
|
||||
- type: String (default: "text")
|
||||
- checkItems: String? (JSON)
|
||||
- labels: String? (JSON)
|
||||
- images: String? (JSON)
|
||||
- links: String? (JSON)
|
||||
- reminder: DateTime?
|
||||
- isReminderDone: Boolean
|
||||
- reminderRecurrence: String?
|
||||
- reminderLocation: String?
|
||||
- isMarkdown: Boolean
|
||||
- size: String (default: "small")
|
||||
- notebookId: String?
|
||||
- userId: String?
|
||||
- order: Int
|
||||
- createdAt: DateTime
|
||||
- updatedAt: DateTime
|
||||
|
||||
### Notebook Model
|
||||
- id: String (CUID)
|
||||
- name: String
|
||||
- icon: String?
|
||||
- color: String?
|
||||
- order: Int
|
||||
- userId: String
|
||||
- createdAt: DateTime
|
||||
- updatedAt: DateTime
|
||||
|
||||
### Label Model
|
||||
- id: String (CUID)
|
||||
- name: String
|
||||
- color: String (default: "gray")
|
||||
- notebookId: String?
|
||||
- userId: String?
|
||||
- createdAt: DateTime
|
||||
- updatedAt: DateTime
|
||||
|
||||
## N8N Workflows
|
||||
|
||||
Ce serveur MCP est accompagné de 6 workflows N8N prêts à l'emploi pour une intégration complète:
|
||||
|
||||
1. **Create Note with Classification** - Création de notes avec classification automatique par IA
|
||||
2. **Search & Summary** - Recherche et résumé intelligent de notes
|
||||
3. **Notebook Manager** - Gestion complète des notebooks (CRUD)
|
||||
4. **Reminder Notifications** - Automatisation des rappels avec notifications
|
||||
5. **Label Manager** - Gestion des labels avec suggestion IA
|
||||
6. **Email to Note** - Conversion automatique d'emails en notes
|
||||
|
||||
Pour plus de détails, consultez [N8N-WORKFLOWS.md](./N8N-WORKFLOWS.md)
|
||||
|
||||
### Importation des Workflows
|
||||
|
||||
Chaque workflow peut être importé directement dans N8N via le fichier JSON correspondant:
|
||||
|
||||
```bash
|
||||
# Exemple: Importer le workflow de création de notes
|
||||
# Ouvrir N8N → Import from File → Sélectionner n8n-workflow-create-note.json
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
@@ -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
|
||||
```
|
||||
@@ -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
|
||||
@@ -1,185 +0,0 @@
|
||||
{
|
||||
"name": "Keep Notes - Create with Classification",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {},
|
||||
"id": "mcp-trigger-1",
|
||||
"name": "MCP Server Trigger",
|
||||
"type": "n8n-nodes-langchain.mcptrigger",
|
||||
"typeVersion": 1,
|
||||
"position": [250, 300],
|
||||
"webhookId": "keep-notes-create",
|
||||
"description": "MCP trigger to create notes with AI classification"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "note",
|
||||
"operation": "create",
|
||||
"title": "={{ $json.title }}",
|
||||
"content": "={{ $json.content }}",
|
||||
"color": "={{ $json.color || 'default' }}",
|
||||
"type": "={{ $json.type || 'text' }}",
|
||||
"labels": "={{ $json.labels }}",
|
||||
"isPinned": "={{ $json.isPinned || false }}",
|
||||
"isArchived": "={{ $json.isArchived || false }}",
|
||||
"notebookId": "={{ $json.notebookId }}"
|
||||
},
|
||||
"id": "keep-notes-1",
|
||||
"name": "Keep Notes - Create Note",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [500, 300],
|
||||
"url": "http://localhost:3000/api/notes",
|
||||
"method": "POST",
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sendBody": true,
|
||||
"bodyParameters": {
|
||||
"parameters": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"modelId": "openai/gpt-4",
|
||||
"prompt": "Analyze this note and suggest:\n1. A concise title (if not provided)\n2. Appropriate labels from: {{ $json.availableLabels }}\n3. Best notebook ID (if available)\n\nNote content: {{ $json.content }}\n\nReturn JSON format:\n{\n \"title\": \"suggested title\",\n \"labels\": [\"label1\", \"label2\"],\n \"notebookId\": \"notebook-id\",\n \"category\": \"work/personal/idea\"\n}"
|
||||
},
|
||||
"id": "ai-classifier-1",
|
||||
"name": "AI Classifier",
|
||||
"type": "n8n-nodes-langchain.agent",
|
||||
"typeVersion": 1.1,
|
||||
"position": [750, 200],
|
||||
"continueOnFail": true
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"combinationMode": "multiplex",
|
||||
"options": {}
|
||||
},
|
||||
"id": "merge-1",
|
||||
"name": "Merge Results",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"typeVersion": 3,
|
||||
"position": [1000, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"name": "noteId",
|
||||
"value": "={{ $json.data.id }}",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"value": "={{ $json.data.title }}",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"value": "Note created successfully",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"id": "format-1",
|
||||
"name": "Format Response",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"typeVersion": 3.4,
|
||||
"position": [1250, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "json",
|
||||
"responseBody": "={{ $json }}"
|
||||
},
|
||||
"id": "mcp-response-1",
|
||||
"name": "Respond to Webhook",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.1,
|
||||
"position": [1500, 300]
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"MCP Server Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Keep Notes - Create Note",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Keep Notes - Create Note": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Classifier",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"AI Classifier": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge Results",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge Results": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Format Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Format Response": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Webhook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"staticData": null,
|
||||
"tags": [
|
||||
{
|
||||
"createdAt": "2026-01-18T00:00:00.000Z",
|
||||
"id": "keep-notes-mcp",
|
||||
"name": "Keep Notes MCP"
|
||||
}
|
||||
],
|
||||
"triggerCount": 1,
|
||||
"updatedAt": "2026-01-18T00:00:00.000Z",
|
||||
"versionId": "1"
|
||||
}
|
||||
@@ -1,307 +0,0 @@
|
||||
{
|
||||
"name": "Keep Notes - Email to Note",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"pollTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyMinute"
|
||||
}
|
||||
]
|
||||
},
|
||||
"filters": {
|
||||
"hasReadStatus": true,
|
||||
"readStatus": "unread"
|
||||
}
|
||||
},
|
||||
"id": "email-trigger",
|
||||
"name": "Email Trigger",
|
||||
"type": "n8n-nodes-base.emailTrigger",
|
||||
"typeVersion": 1.1,
|
||||
"position": [250, 300],
|
||||
"description": "Trigger when new email received"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"jsCode": "// Extract relevant information from email\nconst email = $input.item.json;\n\n// Get email subject and body\nconst subject = email.subject || 'Untitled Email';\nconst body = email.text || email.html || '';\nconst from = email.from?.value?.[0]?.address || 'unknown';\n\n// Create structured note data\nreturn {\n json: {\n title: `Email: ${subject}`,\n content: `From: ${from}\\n\\n${body}`,\n labels: ['email', 'inbox'],\n color: 'blue',\n type: 'text',\n isPinned: false,\n isArchived: false,\n metadata: {\n originalEmailId: email.messageId,\n from: from,\n date: email.date,\n attachments: email.attachments?.length || 0\n }\n }\n};"
|
||||
},
|
||||
"id": "extract-email-1",
|
||||
"name": "Extract Email Data",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"typeVersion": 2,
|
||||
"position": [500, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"modelId": "openai/gpt-4",
|
||||
"prompt": "Analyze this email and:\n1. Extract the main topic/theme (2-3 words max)\n2. Identify if it's urgent (important meeting, deadline, etc.)\n3. Suggest appropriate labels from: work, personal, finance, shopping, meeting, task, archive\n\nEmail subject: {{ $json.title }}\nEmail content: {{ $json.content }}\n\nReturn JSON:\n{\n \"topic\": \"main topic\",\n \"isUrgent\": true/false,\n \"labels\": [\"label1\", \"label2\"],\n \"notebook\": \"work/personal/ideas\"\n}"
|
||||
},
|
||||
"id": "ai-classify-email",
|
||||
"name": "AI Classify Email",
|
||||
"type": "n8n-nodes-langchain.agent",
|
||||
"typeVersion": 1.1,
|
||||
"position": [750, 300],
|
||||
"continueOnFail": true
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "urgent-check",
|
||||
"leftValue": "={{ $json.isUrgent }}",
|
||||
"rightValue": "true",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "equals"
|
||||
}
|
||||
}
|
||||
],
|
||||
"combinator": "and"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"id": "check-urgent",
|
||||
"name": "Check if Urgent",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"typeVersion": 2.1,
|
||||
"position": [1000, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"name": "isPinned",
|
||||
"value": true,
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "color",
|
||||
"value": "red",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"options": {}
|
||||
}
|
||||
},
|
||||
"id": "set-urgent-flags",
|
||||
"name": "Set Urgent Flags",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"typeVersion": 3.4,
|
||||
"position": [1250, 200]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"name": "isPinned",
|
||||
"value": false,
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "color",
|
||||
"value": "default",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"options": {}
|
||||
}
|
||||
},
|
||||
"id": "set-normal-flags",
|
||||
"name": "Set Normal Flags",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"typeVersion": 3.4,
|
||||
"position": [1250, 400]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"combinationMode": "multiplex",
|
||||
"options": {}
|
||||
},
|
||||
"id": "merge-email-data",
|
||||
"name": "Merge Email Data",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"typeVersion": 3,
|
||||
"position": [1500, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "note",
|
||||
"operation": "create",
|
||||
"url": "http://localhost:3000/api/notes",
|
||||
"method": "POST",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "title",
|
||||
"value": "={{ $json.title }}"
|
||||
},
|
||||
{
|
||||
"name": "content",
|
||||
"value": "={{ $json.content }}"
|
||||
},
|
||||
{
|
||||
"name": "color",
|
||||
"value": "={{ $json.color }}"
|
||||
},
|
||||
{
|
||||
"name": "isPinned",
|
||||
"value": "={{ $json.isPinned }}"
|
||||
},
|
||||
{
|
||||
"name": "labels",
|
||||
"value": "={{ $json.labels }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"id": "create-note-from-email",
|
||||
"name": "Create Note in Keep Notes",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [1750, 300],
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"channel": "keep-notes-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",
|
||||
"name": "Notify Slack",
|
||||
"type": "n8n-nodes-base.slack",
|
||||
"typeVersion": 2.1,
|
||||
"position": [2000, 300],
|
||||
"continueOnFail": true
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Email Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Extract Email Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Extract Email Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Classify Email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"AI Classify Email": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check if Urgent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check if Urgent": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Urgent Flags",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Set Normal Flags",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Urgent Flags": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge Email Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Normal Flags": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge Email Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge Email Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Note in Keep Notes",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Note in Keep Notes": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Notify Slack",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"staticData": null,
|
||||
"tags": [
|
||||
{
|
||||
"createdAt": "2026-01-18T00:00:00.000Z",
|
||||
"id": "keep-notes-integrations",
|
||||
"name": "Keep Notes Integrations"
|
||||
}
|
||||
],
|
||||
"triggerCount": 1,
|
||||
"updatedAt": "2026-01-18T00:00:00.000Z",
|
||||
"versionId": "1"
|
||||
}
|
||||
@@ -1,393 +0,0 @@
|
||||
{
|
||||
"name": "Keep Notes - Label Manager",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {},
|
||||
"id": "mcp-trigger-4",
|
||||
"name": "MCP Server Trigger",
|
||||
"type": "n8n-nodes-langchain.mcptrigger",
|
||||
"typeVersion": 1,
|
||||
"position": [250, 300],
|
||||
"webhookId": "keep-notes-labels",
|
||||
"description": "MCP trigger to manage labels"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"switches": {
|
||||
"values": [
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"leftValue": "={{ $json.action }}",
|
||||
"rightValue": "create",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
}
|
||||
}
|
||||
],
|
||||
"output": "create"
|
||||
},
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"leftValue": "={{ $json.action }}",
|
||||
"rightValue": "list",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
}
|
||||
}
|
||||
],
|
||||
"output": "list"
|
||||
},
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"leftValue": "={{ $json.action }}",
|
||||
"rightValue": "update",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
}
|
||||
}
|
||||
],
|
||||
"output": "update"
|
||||
},
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"leftValue": "={{ $json.action }}",
|
||||
"rightValue": "delete",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
}
|
||||
}
|
||||
],
|
||||
"output": "delete"
|
||||
},
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"leftValue": "={{ $json.action }}",
|
||||
"rightValue": "suggest",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
}
|
||||
}
|
||||
],
|
||||
"output": "suggest"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"id": "switch-labels",
|
||||
"name": "Action Switch",
|
||||
"type": "n8n-nodes-base.switch",
|
||||
"typeVersion": 3.1,
|
||||
"position": [500, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "label",
|
||||
"operation": "create",
|
||||
"url": "http://localhost:3000/api/labels",
|
||||
"method": "POST",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "name",
|
||||
"value": "={{ $json.name }}"
|
||||
},
|
||||
{
|
||||
"name": "color",
|
||||
"value": "={{ $json.color || 'blue' }}"
|
||||
},
|
||||
{
|
||||
"name": "notebookId",
|
||||
"value": "={{ $json.notebookId }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"id": "create-label",
|
||||
"name": "Create Label",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [750, 150],
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"url": "http://localhost:3000/api/labels",
|
||||
"method": "GET",
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"qs": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "notebookId",
|
||||
"value": "={{ $json.notebookId }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"id": "list-labels",
|
||||
"name": "List Labels",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [750, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "label",
|
||||
"operation": "update",
|
||||
"url": "http://localhost:3000/api/labels/{{ $json.id }}",
|
||||
"method": "PUT",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "name",
|
||||
"value": "={{ $json.name }}"
|
||||
},
|
||||
{
|
||||
"name": "color",
|
||||
"value": "={{ $json.color }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"id": "update-label",
|
||||
"name": "Update Label",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [750, 450],
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "label",
|
||||
"operation": "delete",
|
||||
"url": "http://localhost:3000/api/labels/{{ $json.id }}",
|
||||
"method": "DELETE"
|
||||
},
|
||||
"id": "delete-label",
|
||||
"name": "Delete Label",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [750, 600]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"modelId": "openai/gpt-4",
|
||||
"prompt": "Suggest 3-5 appropriate labels for this note based on its content. Return only the label names in a JSON array.\n\nNote title: {{ $json.title }}\nNote content: {{ $json.content }}\n\nExample format:\n[\"work\", \"project\", \"important\"]"
|
||||
},
|
||||
"id": "ai-suggest-labels",
|
||||
"name": "AI Suggest Labels",
|
||||
"type": "n8n-nodes-langchain.agent",
|
||||
"typeVersion": 1.1,
|
||||
"position": [750, 750]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"name": "action",
|
||||
"value": "={{ $json.action }}",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "success",
|
||||
"value": true,
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"value": "={{ $json }}",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"id": "format-labels",
|
||||
"name": "Format Response",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"typeVersion": 3.4,
|
||||
"position": [1000, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "json",
|
||||
"responseBody": "={{ $json }}"
|
||||
},
|
||||
"id": "mcp-response-labels",
|
||||
"name": "Respond to Webhook",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.1,
|
||||
"position": [1250, 300]
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"MCP Server Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Action Switch",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Action Switch": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Label",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "List Labels",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Update Label",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Delete Label",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "AI Suggest Labels",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Label": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Format Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"List Labels": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Format Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Update Label": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Format Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Delete Label": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Format Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"AI Suggest Labels": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Format Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Format Response": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Webhook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"staticData": null,
|
||||
"tags": [
|
||||
{
|
||||
"createdAt": "2026-01-18T00:00:00.000Z",
|
||||
"id": "keep-notes-mcp",
|
||||
"name": "Keep Notes MCP"
|
||||
}
|
||||
],
|
||||
"triggerCount": 1,
|
||||
"updatedAt": "2026-01-18T00:00:00.000Z",
|
||||
"versionId": "1"
|
||||
}
|
||||
@@ -1,347 +0,0 @@
|
||||
{
|
||||
"name": "Keep Notes - Notebook Manager",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {},
|
||||
"id": "mcp-trigger-3",
|
||||
"name": "MCP Server Trigger",
|
||||
"type": "n8n-nodes-langchain.mcptrigger",
|
||||
"typeVersion": 1,
|
||||
"position": [250, 300],
|
||||
"webhookId": "keep-notes-notebook",
|
||||
"description": "MCP trigger to manage notebooks"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"switches": {
|
||||
"values": [
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"leftValue": "={{ $json.action }}",
|
||||
"rightValue": "create",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
}
|
||||
}
|
||||
],
|
||||
"output": "create"
|
||||
},
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"leftValue": "={{ $json.action }}",
|
||||
"rightValue": "list",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
}
|
||||
}
|
||||
],
|
||||
"output": "list"
|
||||
},
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"leftValue": "={{ $json.action }}",
|
||||
"rightValue": "update",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
}
|
||||
}
|
||||
],
|
||||
"output": "update"
|
||||
},
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"leftValue": "={{ $json.action }}",
|
||||
"rightValue": "delete",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
}
|
||||
}
|
||||
],
|
||||
"output": "delete"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"id": "switch-1",
|
||||
"name": "Action Switch",
|
||||
"type": "n8n-nodes-base.switch",
|
||||
"typeVersion": 3.1,
|
||||
"position": [500, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "notebook",
|
||||
"operation": "create",
|
||||
"url": "http://localhost:3000/api/notebooks",
|
||||
"method": "POST",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "name",
|
||||
"value": "={{ $json.name }}"
|
||||
},
|
||||
{
|
||||
"name": "icon",
|
||||
"value": "={{ $json.icon || '📁' }}"
|
||||
},
|
||||
{
|
||||
"name": "color",
|
||||
"value": "={{ $json.color || '#3B82F6' }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"id": "create-notebook",
|
||||
"name": "Create Notebook",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [750, 150],
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"url": "http://localhost:3000/api/notebooks",
|
||||
"method": "GET",
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"id": "list-notebooks",
|
||||
"name": "List Notebooks",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [750, 300],
|
||||
"sendHeaders": true
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "notebook",
|
||||
"operation": "update",
|
||||
"url": "http://localhost:3000/api/notebooks/{{ $json.id }}",
|
||||
"method": "PUT",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "name",
|
||||
"value": "={{ $json.name }}"
|
||||
},
|
||||
{
|
||||
"name": "icon",
|
||||
"value": "={{ $json.icon }}"
|
||||
},
|
||||
{
|
||||
"name": "color",
|
||||
"value": "={{ $json.color }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"id": "update-notebook",
|
||||
"name": "Update Notebook",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [750, 450],
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "notebook",
|
||||
"operation": "delete",
|
||||
"url": "http://localhost:3000/api/notebooks/{{ $json.id }}",
|
||||
"method": "DELETE"
|
||||
},
|
||||
"id": "delete-notebook",
|
||||
"name": "Delete Notebook",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [750, 600],
|
||||
"sendHeaders": true
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"name": "action",
|
||||
"value": "={{ $json.action }}",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "success",
|
||||
"value": true,
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"value": "={{ $json }}",
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"id": "format-3",
|
||||
"name": "Format Response",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"typeVersion": 3.4,
|
||||
"position": [1000, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "json",
|
||||
"responseBody": "={{ $json }}"
|
||||
},
|
||||
"id": "mcp-response-3",
|
||||
"name": "Respond to Webhook",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.1,
|
||||
"position": [1250, 300]
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"MCP Server Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Action Switch",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Action Switch": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Notebook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "List Notebooks",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Update Notebook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Delete Notebook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Notebook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Format Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"List Notebooks": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Format Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Update Notebook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Format Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Delete Notebook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Format Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Format Response": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Webhook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"staticData": null,
|
||||
"tags": [
|
||||
{
|
||||
"createdAt": "2026-01-18T00:00:00.000Z",
|
||||
"id": "keep-notes-mcp",
|
||||
"name": "Keep Notes MCP"
|
||||
}
|
||||
],
|
||||
"triggerCount": 1,
|
||||
"updatedAt": "2026-01-18T00:00:00.000Z",
|
||||
"versionId": "1"
|
||||
}
|
||||
@@ -1,350 +0,0 @@
|
||||
{
|
||||
"name": "Keep Notes - Reminder Notifications",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"field": "cronExpression",
|
||||
"expression": "0 */30 * * * *"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"id": "schedule-1",
|
||||
"name": "Schedule (Every 30 min)",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"typeVersion": 1.2,
|
||||
"position": [250, 300],
|
||||
"description": "Check for reminders every 30 minutes"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"url": "http://localhost:3000/api/notes",
|
||||
"method": "GET",
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"id": "get-all-notes-1",
|
||||
"name": "Get All Notes",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [500, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "condition-1",
|
||||
"leftValue": "={{ $json.reminder }}",
|
||||
"rightValue": "true",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "isNotEmpty"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "condition-2",
|
||||
"leftValue": "={{ $json.isReminderDone }}",
|
||||
"rightValue": "false",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "equals"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "condition-3",
|
||||
"leftValue": "={{ $json.reminder }}",
|
||||
"rightValue": "={{ $now }}",
|
||||
"operator": {
|
||||
"type": "date",
|
||||
"operation": "before"
|
||||
}
|
||||
}
|
||||
],
|
||||
"combinator": "and"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"id": "filter-reminders-1",
|
||||
"name": "Filter Active Reminders",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"typeVersion": 2.1,
|
||||
"position": [750, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"fieldToSplitOut": "data",
|
||||
"options": {}
|
||||
},
|
||||
"id": "split-1",
|
||||
"name": "Split Reminders",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"typeVersion": 1,
|
||||
"position": [1000, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"channel": "={{ $json.notificationChannel || 'slack' }}",
|
||||
"text": "🔔 **Reminder:** {{ $json.title || 'Untitled Note' }}\n\n{{ $json.content }}\n\n📍 Location: {{ $json.reminderLocation || 'N/A' }}\n🔗 View in Keep Notes: http://localhost:3000\n\n⏰ Reminder Time: {{ $json.reminder }}",
|
||||
"otherOptions": {}
|
||||
},
|
||||
"id": "send-notification-1",
|
||||
"name": "Send Notification",
|
||||
"type": "n8n-nodes-base.slack",
|
||||
"typeVersion": 2.1,
|
||||
"position": [1250, 300],
|
||||
"continueOnFail": true
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"channel": "={{ $json.notificationEmail }}",
|
||||
"subject": "🔔 Reminder: {{ $json.title || 'Untitled Note' }}",
|
||||
"emailType": "html",
|
||||
"message": "<h2>🔔 Reminder</h2>\n\n<h3>{{ $json.title || 'Untitled Note' }}</h3>\n\n<p>{{ $json.content }}</p>\n\n<strong>Location:</strong> {{ $json.reminderLocation || 'N/A' }}<br>\n<strong>Reminder Time:</strong> {{ $json.reminder }}<br>\n<br>\n<a href=\"http://localhost:3000\">View in Keep Notes</a>",
|
||||
"options": {}
|
||||
},
|
||||
"id": "send-email-1",
|
||||
"name": "Send Email",
|
||||
"type": "n8n-nodes-base.emailSend",
|
||||
"typeVersion": 2.1,
|
||||
"position": [1250, 450],
|
||||
"continueOnFail": true
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"url": "http://localhost:3000/api/notes/{{ $json.id }}",
|
||||
"method": "PUT",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "isReminderDone",
|
||||
"value": "true"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"id": "mark-done-1",
|
||||
"name": "Mark Reminder as Done",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [1500, 300],
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "condition-4",
|
||||
"leftValue": "={{ $json.reminderRecurrence }}",
|
||||
"rightValue": "",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "isNotEmpty"
|
||||
}
|
||||
}
|
||||
],
|
||||
"combinator": "and"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"id": "check-recurrence-1",
|
||||
"name": "Check Recurrence",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"typeVersion": 2.1,
|
||||
"position": [1750, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"jsCode": "// Calculate next reminder date based on recurrence\nconst { reminderRecurrence, reminder } = $input.item.json;\nconst reminderDate = new Date(reminder);\n\nlet nextReminder;\nswitch (reminderRecurrence) {\n case 'daily':\n nextReminder = new Date(reminderDate.setDate(reminderDate.getDate() + 1));\n break;\n case 'weekly':\n nextReminder = new Date(reminderDate.setDate(reminderDate.getDate() + 7));\n break;\n case 'monthly':\n nextReminder = new Date(reminderDate.setMonth(reminderDate.getMonth() + 1));\n break;\n case 'yearly':\n nextReminder = new Date(reminderDate.setFullYear(reminderDate.getFullYear() + 1));\n break;\n default:\n nextReminder = reminderDate;\n}\n\nreturn {\n json: {\n ...$input.item.json,\n nextReminder: nextReminder.toISOString(),\n isReminderDone: false\n }\n};"
|
||||
},
|
||||
"id": "calculate-next-1",
|
||||
"name": "Calculate Next Reminder",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"typeVersion": 2,
|
||||
"position": [2000, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"url": "http://localhost:3000/api/notes/{{ $json.id }}",
|
||||
"method": "PUT",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "reminder",
|
||||
"value": "={{ $json.nextReminder }}"
|
||||
},
|
||||
{
|
||||
"name": "isReminderDone",
|
||||
"value": "false"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"id": "update-recurrence-1",
|
||||
"name": "Update Recurring Reminder",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [2250, 300],
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Schedule (Every 30 min)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get All Notes",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get All Notes": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Filter Active Reminders",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Filter Active Reminders": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Reminders",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Reminders": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Notification",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Send Email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Send Notification": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Mark Reminder as Done",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Send Email": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Mark Reminder as Done",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Mark Reminder as Done": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check Recurrence",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check Recurrence": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Calculate Next Reminder",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Calculate Next Reminder": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Update Recurring Reminder",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"staticData": null,
|
||||
"tags": [
|
||||
{
|
||||
"createdAt": "2026-01-18T00:00:00.000Z",
|
||||
"id": "keep-notes-mcp",
|
||||
"name": "Keep Notes MCP"
|
||||
}
|
||||
],
|
||||
"triggerCount": 0,
|
||||
"updatedAt": "2026-01-18T00:00:00.000Z",
|
||||
"versionId": "1"
|
||||
}
|
||||
@@ -1,247 +0,0 @@
|
||||
{
|
||||
"name": "Keep Notes - Search & Summary",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {},
|
||||
"id": "mcp-trigger-2",
|
||||
"name": "MCP Server Trigger",
|
||||
"type": "n8n-nodes-langchain.mcptrigger",
|
||||
"typeVersion": 1,
|
||||
"position": [250, 300],
|
||||
"webhookId": "keep-notes-search",
|
||||
"description": "MCP trigger to search and summarize notes"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"resource": "note",
|
||||
"operation": "get_all",
|
||||
"url": "http://localhost:3000/api/notes",
|
||||
"method": "GET"
|
||||
},
|
||||
"id": "get-notes-1",
|
||||
"name": "Get All Notes",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"typeVersion": 4.2,
|
||||
"position": [500, 300],
|
||||
"sendHeaders": true,
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"options": {
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "condition-1",
|
||||
"leftValue": "={{ $json.title }}",
|
||||
"rightValue": "={{ $('MCP Server Trigger').item.json.searchQuery }}",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "contains"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "condition-2",
|
||||
"leftValue": "={{ $json.content }}",
|
||||
"rightValue": "={{ $('MCP Server Trigger').item.json.searchQuery }}",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "contains"
|
||||
}
|
||||
}
|
||||
],
|
||||
"combinator": "or"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"id": "filter-1",
|
||||
"name": "Filter by Query",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"typeVersion": 2.1,
|
||||
"position": [750, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "aggregate",
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"fieldName": "id",
|
||||
"aggregateOperation": "count"
|
||||
},
|
||||
{
|
||||
"fieldName": "createdAt",
|
||||
"aggregateOperation": "max"
|
||||
},
|
||||
{
|
||||
"fieldName": "createdAt",
|
||||
"aggregateOperation": "min"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"id": "aggregate-1",
|
||||
"name": "Aggregate Stats",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"typeVersion": 1,
|
||||
"position": [1000, 300],
|
||||
"continueOnFail": true
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"modelId": "openai/gpt-4",
|
||||
"prompt": "You are a helpful note summarizer. Analyze these notes and provide:\n\n1. **Summary**: A concise summary of all notes (2-3 sentences)\n2. **Key Themes**: List main topics found (bullet points)\n3. **Action Items**: Extract any action items or tasks\n4. **Related Notes**: Group notes by theme\n\nNotes to analyze:\n{{ $json.notes }}\n\nProvide the result in JSON format:"
|
||||
},
|
||||
"id": "ai-summarizer-1",
|
||||
"name": "AI Summarizer",
|
||||
"type": "n8n-nodes-langchain.agent",
|
||||
"typeVersion": 1.1,
|
||||
"position": [1250, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"name": "searchQuery",
|
||||
"value": "={{ $('MCP Server Trigger').item.json.searchQuery }}",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "totalNotes",
|
||||
"value": "={{ $json.data.length }}",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "filteredCount",
|
||||
"value": "={{ $('Filter by Query').item.json.length }}",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "summary",
|
||||
"value": "={{ $json }}",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"name": "notes",
|
||||
"value": "={{ $('Filter by Query').item.json }}",
|
||||
"type": "array"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"id": "format-2",
|
||||
"name": "Format Response",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"typeVersion": 3.4,
|
||||
"position": [1500, 300]
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "json",
|
||||
"responseBody": "={{ $json }}"
|
||||
},
|
||||
"id": "mcp-response-2",
|
||||
"name": "Respond to Webhook",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.1,
|
||||
"position": [1750, 300]
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"MCP Server Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get All Notes",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get All Notes": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Filter by Query",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Filter by Query": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate Stats",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate Stats": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Summarizer",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"AI Summarizer": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Format Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Format Response": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Webhook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"staticData": null,
|
||||
"tags": [
|
||||
{
|
||||
"createdAt": "2026-01-18T00:00:00.000Z",
|
||||
"id": "keep-notes-mcp",
|
||||
"name": "Keep Notes MCP"
|
||||
}
|
||||
],
|
||||
"triggerCount": 1,
|
||||
"updatedAt": "2026-01-18T00:00:00.000Z",
|
||||
"versionId": "1"
|
||||
}
|
||||
Reference in New Issue
Block a user