n8n-mcp-serenity

vpaturel/n8n-mcp-serenity

3.2

If you are the rightful owner of n8n-mcp-serenity and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The n8n MCP Server Serenity v5.2 is a unified hybrid server designed for n8n, featuring automatic hot-reload and optimal performance.

Tools
4
Resources
0
Prompts
0

🚀 n8n MCP Server v7.0.0 - Ultimate Edition

Python

Serveur MCP complet pour n8n avec 96 outils, support OAuth 2.0, et Streamable HTTP (SSE)

✨ Nouveautés v7.0.0

  • 🎉 96 outils (contre 20 en v6.x)
  • 📦 16 modules d'outils organisés
  • 🧪 182 tests (100% de réussite)
  • 🔐 OAuth 2.0 + Bearer token
  • 🌊 Streamable HTTP (SSE)
  • Production ready

🛠️ 96 Outils Disponibles

📁 Core Tools (20 outils)

Workflows (10)
  • list_workflows - Liste tous les workflows
  • get_workflow - Détails basiques d'un workflow
  • get_workflow_details - Détails complets avec validation
  • create_workflow - Créer un nouveau workflow
  • update_workflow - Modifier un workflow
  • delete_workflow - Supprimer un workflow
  • duplicate_workflow - Dupliquer avec nouveau nom
  • search_workflows - Rechercher par nom
  • export_workflow - Exporter en JSON
  • import_workflow - Importer depuis JSON
Exécution (6)
  • activate_workflow - Activer un workflow
  • deactivate_workflow - Désactiver un workflow
  • execute_workflow - Exécuter manuellement
  • list_executions - Lister les exécutions
  • get_execution - Détails d'une exécution
  • delete_execution - Supprimer une exécution
Tags (2)
  • list_tags - Lister tous les tags
  • create_tag - Créer un nouveau tag
Analytics (2)
  • get_stats - Statistiques n8n
  • get_execution_report - Rapport d'exécution détaillé

🆕 Advanced Tools (76 outils)

🔐 Credentials (13 outils)

Gestion complète des credentials : list, get, create, update, delete, test, search, types, share, usage, schema, export, import

🔧 Variables (6 outils)

Variables d'environnement : list, get, create, update, delete, search

⚡ Executions Advanced (4 outils)

Gestion avancée : get_data, retry, stop, batch_delete

👥 Users (8 outils)

Gestion utilisateurs : list, get, create, update, delete, roles, settings

🏷️ Tags Advanced (3 outils)

Tags avancés : usage, merge, bulk_tag

📂 Projects (7 outils)

Gestion projets : list, get, create, update, delete, resources, add_resource

🪝 Webhooks (4 outils)

Webhooks : list, get, test, get_url

📦 Binary Data (3 outils)

Données binaires : list, get, delete

⚙️ Settings (1 outil)

Configuration : get_settings

🔄 Source Control (6 outils)

Git integration : status, pull, push, preferences, update_prefs, disconnect

🧩 Community Nodes (5 outils)

Nodes communautaires : list, install, update, uninstall, available

📊 Monitoring (3 outils)

Surveillance : health, metrics, system_info

📜 Workflow History (4 outils)

Historique : history, version, restore, compare

📄 Licenses (4 outils)

Licences : info, activate, renew, usage

🔒 External Secrets (3 outils)

Secrets externes : providers, config, test

📋 Audit (2 outils)

Audit : logs, export


📡 Utilisation

Configuration Client MCP

URL Production : https://mcp.serenity-system.fr

Configuration SSE :

{
  "mcpServers": {
    "n8n-serenity": {
      "url": "https://mcp.serenity-system.fr/sse",
      "transport": "sse",
      "headers": {
        "Authorization": "Bearer VOTRE_TOKEN"
      }
    }
  }
}

Récupérer le token :

gcloud secrets versions access latest --secret="mcp-auth-token"

🔐 Authentification

OAuth 2.0 (Recommandé)

  1. Découverte des endpoints :
curl https://mcp.serenity-system.fr/.well-known/oauth-authorization-server
  1. Autorisation :
GET /oauth/authorize?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI
  1. Échange du code :
curl -X POST https://mcp.serenity-system.fr/oauth/token \
  -d grant_type=authorization_code \
  -d code=AUTHORIZATION_CODE \
  -d client_id=YOUR_CLIENT_ID \
  -d client_secret=YOUR_CLIENT_SECRET

Bearer Token (Alternative)

TOKEN=$(gcloud secrets versions access latest --secret="mcp-auth-token")
curl -H "Authorization: Bearer $TOKEN" https://mcp.serenity-system.fr/sse

🧪 Tests

Health Check

curl https://mcp.serenity-system.fr/health

Test SSE

TOKEN=$(gcloud secrets versions access latest --secret="mcp-auth-token")
curl -N -H "Authorization: Bearer $TOKEN" \
  https://mcp.serenity-system.fr/sse

Lancer les Tests Locaux

# Installation des dépendances
pip install -r requirements.txt
pip install -r requirements-test.txt

# Exécuter tous les tests (182 tests)
pytest tests/ -v

# Avec couverture
pytest tests/ --cov=tools --cov-report=term-missing

# Tests d'un module spécifique
pytest tests/test_credentials.py -v

🚀 Déploiement

Déploiement Automatique (CI/CD)

# Commit et push
git add .
git commit -m "feat: nouvelle fonctionnalité"
git push origin main

Le workflow GitHub Actions :

  1. ✅ Vérifie le code (linting, formatting)
  2. ✅ Lance les 182 tests
  3. ✅ Build l'image Docker
  4. ✅ Déploie sur Cloud Run
  5. ✅ Teste la nouvelle version
  6. ✅ Rollback automatique si échec

Déploiement Manuel

# Build & push
docker build -t europe-west1-docker.pkg.dev/serenity-system-262416/docker-repo/n8n-mcp-ultimate:7.0.0 .
docker push europe-west1-docker.pkg.dev/serenity-system-262416/docker-repo/n8n-mcp-ultimate:7.0.0

# Deploy
gcloud run deploy mcp-server-n8n \
  --image europe-west1-docker.pkg.dev/serenity-system-262416/docker-repo/n8n-mcp-ultimate:7.0.0 \
  --region europe-west1 \
  --platform managed \
  --allow-unauthenticated

Forcer le trafic vers la dernière révision

LATEST=$(gcloud run revisions list \
  --service=mcp-server-n8n \
  --region=europe-west1 \
  --format='value(name)' \
  --limit=1)
  
gcloud run services update-traffic mcp-server-n8n \
  --region=europe-west1 \
  --to-revisions=$LATEST=100

📊 Monitoring

Dashboard GCP

Logs en temps réel

gcloud run services logs tail mcp-server-n8n --region=europe-west1

Métriques

curl https://mcp.serenity-system.fr/stats

🏗️ Architecture

n8n-mcp-ultimate-repo/
├── streamable_mcp_server.py    # Serveur principal FastAPI + MCP
├── tools/                       # 16 modules d'outils
│   ├── __init__.py
│   ├── base.py                 # Classe de base
│   ├── credentials.py          # 13 outils
│   ├── variables.py            # 6 outils
│   ├── users.py                # 8 outils
│   ├── executions_advanced.py  # 4 outils
│   ├── tags_advanced.py        # 3 outils
│   ├── projects.py             # 7 outils
│   ├── webhooks.py             # 4 outils
│   ├── binary_data.py          # 3 outils
│   ├── settings.py             # 1 outil
│   ├── source_control.py       # 6 outils
│   ├── community_nodes.py      # 5 outils
│   ├── monitoring.py           # 3 outils
│   ├── workflow_history.py     # 4 outils
│   ├── licenses.py             # 4 outils
│   ├── external_secrets.py     # 3 outils
│   └── audit.py                # 2 outils
├── tests/                       # 182 tests (100% réussite)
│   ├── conftest.py
│   ├── test_credentials.py
│   ├── test_variables.py
│   └── ... (16 fichiers de test)
├── .github/workflows/
│   └── deploy.yml              # CI/CD complet
├── Dockerfile                   # Image production
├── requirements.txt             # Dépendances
├── requirements-test.txt        # Dépendances test
├── pyproject.toml              # Configuration outils
├── ruff.toml                   # Linting
└── README.md                   # Ce fichier

🔧 Développement Local

Setup

# Clone
git clone https://github.com/vpaturel/n8n-mcp-serenity.git
cd n8n-mcp-serenity

# Virtual env
python -m venv venv
source venv/bin/activate  # Linux/Mac
# ou
venv\Scripts\activate  # Windows

# Install
pip install -r requirements.txt
pip install -r requirements-test.txt

Variables d'environnement

export N8N_HOST="https://n8n.serenity-system.fr"
export N8N_API_KEY="your-api-key"
export MCP_AUTH_TOKEN="your-token"
export OAUTH_CLIENT_ID="your-client-id"
export OAUTH_CLIENT_SECRET="your-client-secret"

Lancer le serveur

python streamable_mcp_server.py
# Serveur lancé sur http://0.0.0.0:8080

Qualité du code

# Formatting
black .

# Linting
ruff check .

# Security scan
bandit -r streamable_mcp_server.py tools/

# Tests
pytest tests/ -v --cov=tools

📈 Statistiques du Projet

📊 Projet n8n-mcp-ultimate-repo v7.0.0

Code:
  • Lignes Python: ~15,000
  • Modules: 16
  • Outils: 96
  
Tests:
  • Tests totaux: 182
  • Taux de réussite: 100%
  • Coverage outils: 100%
  • Performance: < 1.5s
  
Production:
  • Uptime: 99.9%
  • Response time: < 200ms
  • Concurrent users: 100+

🤝 Contribution

Guidelines

  1. Fork le repo
  2. Créer une branche (git checkout -b feature/AmazingFeature)
  3. Commit les changements (git commit -m 'feat: Add AmazingFeature')
  4. Push vers la branche (git push origin feature/AmazingFeature)
  5. Ouvrir une Pull Request

Standards

  • Code formaté avec black
  • Linting avec ruff
  • Tests pour toute nouvelle fonctionnalité
  • Documentation mise à jour

📝 Changelog

v7.0.0 (2025-10-23)

  • 96 outils (20 core + 76 advanced)
  • 📦 16 modules organisés
  • 🧪 182 tests (100% réussite)
  • 🔐 OAuth 2.0 complet
  • CI/CD avancé
  • 📚 Documentation complète

v6.3.0 (2025-10-21)

  • 20 outils de base
  • OAuth 2.0 initial
  • Streamable HTTP (SSE)

📄 License

MIT License - voir pour plus de détails.


🔗 Liens Utiles


💬 Support

Pour toute question ou problème :


Version: 7.0.0 | Status: ✅ Production Ready | Dernière mise à jour: 23 Octobre 2025