- Add debounced state updates for title and content (500ms delay) - Immediate UI updates with delayed history saving - Prevent one-letter-per-undo issue - Add cleanup for debounce timers on unmount
5.0 KiB
5.0 KiB
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é)
- Ouvre N8N dans ton navigateur
- Va dans Settings (⚙️)
- Sélectionne MCP Access
- Clique sur Add Server ou +
- Entre cette configuration:
{
"name": "memento",
"transport": "sse",
"url": "http://172.26.64.1:3001/sse",
"description": "Memento Note-taking App MCP Server"
}
- Sauvegarde la configuration
- Dans tes workflows, active "Available in MCP" (toggle)
- 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:
export N8N_MCP_SERVERS='{
"memento": {
"transport": "sse",
"url": "http://172.26.64.1:3001/sse"
}
}'
Ou dans Docker:
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:
{
"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
{
"tool": "create_note",
"arguments": {
"content": "Ma note de test",
"title": "Titre optionnel",
"color": "blue",
"type": "text",
"images": ["data:image/png;base64,..."]
}
}
2. get_notes
{
"tool": "get_notes",
"arguments": {
"includeArchived": false,
"search": "optionnel"
}
}
3. get_note
{
"tool": "get_note",
"arguments": {
"id": "note_id_ici"
}
}
4. update_note
{
"tool": "update_note",
"arguments": {
"id": "note_id_ici",
"title": "Nouveau titre",
"isPinned": true
}
}
5. delete_note
{
"tool": "delete_note",
"arguments": {
"id": "note_id_ici"
}
}
6. search_notes
{
"tool": "search_notes",
"arguments": {
"query": "recherche"
}
}
7. get_labels
{
"tool": "get_labels",
"arguments": {}
}
8. toggle_pin
{
"tool": "toggle_pin",
"arguments": {
"id": "note_id_ici"
}
}
9. toggle_archive
{
"tool": "toggle_archive",
"arguments": {
"id": "note_id_ici"
}
}
🚀 Démarrage du Serveur SSE
Méthode 1: Script PowerShell (Simple)
cd D:\dev_new_pc\Keep\mcp-server
.\start-sse.ps1
Méthode 2: npm
cd D:\dev_new_pc\Keep\mcp-server
npm run start:sse
Méthode 3: Node direct
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)
Invoke-RestMethod -Uri "http://localhost:3001/"
Test 2: Health Check (depuis N8N)
curl http://172.26.64.1:3001/
Test 3: Workflow N8N
Crée un workflow avec:
- Manual Trigger
- MCP Client node:
- Server:
memento - Tool:
get_notes - Arguments:
{}
- Server:
- Code node pour voir le résultat
🔥 Troubleshooting
Erreur: "Connection refused"
✅ Vérifie que le serveur SSE tourne:
Get-Process | Where-Object { $_.ProcessName -eq "node" }
Erreur: "Cannot reach server"
✅ Vérifie le firewall Windows:
# 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:
# 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:
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:
- Ajoute une clé API
- Utilise HTTPS avec certificat SSL
- Restreins les CORS origins
- Utilise un reverse proxy (nginx)
📚 Documentation Complète
- MCP-SSE-ANALYSIS.md - Analyse détaillée SSE
- README-SSE.md - Documentation serveur SSE
- 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