MCP Enterprise Demo - Gestion Commerciale
Integrates OpenAI's LLM capabilities through Spring AI to power an AI assistant for business management tasks including order processing, invoice analysis, and customer data summarization.
Built on Spring Boot framework with Spring AI integration for orchestrating MCP tools and LLM interactions in an enterprise business management system.
Implements role-based access control (RBAC) for MCP capabilities, enforcing security policies that determine which AI-powered business operations users can perform based on their roles (SUPPORT, MANAGER, ADMIN).
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Enterprise Demo - Gestion Commercialeshow me the latest orders for customer CLI-001"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Enterprise Demo - Gestion Commerciale avec IA
π― PrΓ©sentation
Ce projet démontre l'intégration de MCP (Model Context Protocol) dans un Système d'Information d'entreprise pour la gestion commerciale (Commandes, Factures, Clients).
Objectif : CrΓ©er un assistant IA interne capable de :
RΓ©pondre Γ des questions mΓ©tier en langage naturel
Analyser commandes et factures
RΓ©sumer l'activitΓ© d'un client
DΓ©clencher des actions contrΓ΄lΓ©es
ποΈ Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β UTILISATEUR β
β (Support / Manager / Admin) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ASSISTANT IA (LLM) β
β (Spring AI + OpenAI/Claude) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MCP SERVER β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β CAPACITΓS MCP (Tools) β β
β β β’ findOrder β’ analyzeInvoice β β
β β β’ summarizeCustomer β’ createOrder β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β SΓCURITΓ & GOUVERNANCE β β
β β β’ ContrΓ΄le d'accΓ¨s (RBAC) β’ Audit des appels β β
β β β’ Validation mΓ©tier β’ TraΓ§abilitΓ© β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SERVICES MΓTIERS β
β βββββββββββββββββ βββββββββββββββββ βββββββββββββββββ β
β β OrderService β βInvoiceService β βCustomerServiceβ β
β βββββββββββββββββ βββββββββββββββββ βββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BASE DE DONNΓES β
β (H2 en mΓ©moire pour la dΓ©mo) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββπ RΓ΄les et CapacitΓ©s
RΓ΄le | findOrder | analyzeInvoice | summarizeCustomer | createOrder | validateOrder |
SUPPORT | β | β | β | β | β |
MANAGER | β | β | β | β | β |
ADMIN | β | β | β | β | β |
π DΓ©marrage rapide
PrΓ©requis
Java 17+
Maven 3.8+
(Optionnel) ClΓ© API OpenAI pour le LLM
Installation
# Cloner le projet
cd mcp-enterprise-demo
# Compiler
mvn clean install
# Lancer l'application
mvn spring-boot:runConfiguration OpenAI (optionnel)
export OPENAI_API_KEY=votre-clΓ©-apiπ‘ Endpoints de test
Authentification
Utilisateurs de dΓ©monstration :
support/support123(rΓ΄le SUPPORT)manager/manager123(rΓ΄le MANAGER)admin/admin123(rΓ΄le ADMIN)
Tester les capacitΓ©s MCP
# Rechercher une commande
curl -u manager:manager123 http://localhost:8080/api/chat/test/find-order/CMD-20240115-TC001
# Analyser une facture
curl -u support:support123 http://localhost:8080/api/chat/test/analyze-invoice/FAC-2024-000123
# RΓ©sumΓ© client
curl -u support:support123 http://localhost:8080/api/chat/test/customer-summary/CLI-001
# Voir les capacitΓ©s disponibles
curl -u manager:manager123 http://localhost:8080/api/chat/capabilitiesTester via l'interface web (IHM)
Une application Angular est disponible pour tester les capacitΓ©s MCP via une interface utilisateur moderne.
cd mcp-frontend
npm install
npm startL'application sera accessible sur http://localhost:4200/.
FonctionnalitΓ©s disponibles :
Dashboard - Vue d'ensemble avec capacitΓ©s MCP disponibles selon le rΓ΄le
Commandes - Recherche de commandes via MCP
Factures - Analyse de factures via MCP
Clients - RΓ©sumΓ© d'activitΓ© client via MCP
Produits - Gestion du catalogue produits
Assistant IA - Chat avec l'IA pour interagir en langage naturel
π Documentation complΓ¨te du frontend
Tester via LLM (OpenAI / Spring AI)
L'endpoint POST /api/chat/llm/message envoie le message au LLM (via Spring AI) et autorise l'appel des tools MCP selon le rΓ΄le courant.
Important : pour conserver le contexte (ex: workflow de confirmation), utilisez un conversationId et rΓ©utilisez-le Γ chaque tour.
Sous PowerShell, utilisez curl.exe (car curl est un alias de Invoke-WebRequest).
# 1) Premier message (le serveur renvoie un conversationId)
curl.exe -u manager:manager123 -H "Content-Type: application/json" -d "{\"message\":\"CrΓ©e une commande pour CLI-001 avec 2 PROD-001\"}" http://localhost:8080/api/chat/llm/message
# 2) Confirmer (rΓ©utiliser le conversationId reΓ§u Γ l'Γ©tape 1)
curl.exe -u manager:manager123 -H "Content-Type: application/json" -d "{\"message\":\"Oui je confirme\",\"conversationId\":\"<COLLER_ICI>\"}" http://localhost:8080/api/chat/llm/messageSi l'utilisateur n'a pas les droits (ex: rΓ΄le SUPPORT), le LLM est informΓ© des capacitΓ©s autorisΓ©es et doit refuser l'action au lieu d'appeler un tool non autorisΓ©.
Console H2
AccΓ©dez Γ http://localhost:8080/h2-console pour explorer la base de donnΓ©es.
JDBC URL:
jdbc:h2:mem:enterprisedbUser:
saPassword: (vide)
π Structure du projet
src/main/java/com/enterprise/mcp/
βββ McpEnterpriseApplication.java # Point d'entrΓ©e
βββ domain/
β βββ entity/ # EntitΓ©s JPA
β β βββ Customer.java
β β βββ Order.java
β β βββ OrderLine.java
β β βββ Invoice.java
β β βββ InvoiceLine.java
β βββ repository/ # Repositories Spring Data
βββ service/
β βββ CustomerService.java # Service mΓ©tier clients
β βββ OrderService.java # Service mΓ©tier commandes
β βββ InvoiceService.java # Service mΓ©tier factures
β βββ dto/ # Objets de transfert
βββ mcp/
β βββ McpCapabilityHandler.java # Gestionnaire des capacitΓ©s
β βββ McpResponse.java # RΓ©ponse standardisΓ©e
β βββ McpToolsConfiguration.java # Configuration Spring AI
βββ security/
β βββ McpRole.java # DΓ©finition des rΓ΄les
β βββ McpCapability.java # Enum des capacitΓ©s
β βββ McpSecurityContext.java # Contexte de sΓ©curitΓ©
β βββ McpAccessDeniedException.java # Exception accΓ¨s refusΓ©
βββ audit/
β βββ McpAuditService.java # Service d'audit
βββ config/
β βββ SecurityConfig.java # Configuration Spring Security
β βββ DataInitializer.java # DonnΓ©es de dΓ©monstration
βββ controller/
βββ ChatController.java # API RESTπ Formation associΓ©e
Ce projet est accompagné d'une formation complète en Markdown :
β Voir le dossier docs/formation/
β οΈ Points clΓ©s MCP
Ce que MCP fait
β Expose des capacitΓ©s mΓ©tier contrΓ΄lΓ©es Γ l'IA
β Applique la sΓ©curitΓ© par rΓ΄le (RBAC)
β Audite toutes les interactions IA
β Valide les donnΓ©es cΓ΄tΓ© serveur
β Demande confirmation pour les actions sensibles
Ce que MCP ne fait pas
β L'IA n'accΓ¨de jamais directement Γ la base de donnΓ©es
β Pas d'exΓ©cution de code arbitraire
β Pas de contournement des rΓ¨gles mΓ©tier
π Licence
Projet de dΓ©monstration Γ usage pΓ©dagogique.
π€ Auteur
Projet créé pour la formation "MCP pour ingénieurs Java".
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Appeared in Searches
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/bengaly/mcp-gestion-commerciale-demo'
If you have feedback or need assistance with the MCP directory API, please join our Discord server