Ramzus/spring-ai-mcp-server-demo
If you are the rightful owner of spring-ai-mcp-server-demo and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This document provides a structured summary of a Model Context Protocol (MCP) server example for an Agentic AI demo.
π Agentic AI Demo - Smart Business Platform
Transform your business operations with AI-powered automation!
Welcome to a cutting-edge demonstration of how AI agents can seamlessly integrate with real business applications. This platform showcases a complete microservices ecosystem where AI assistants (like Claude or GitHub Copilot) can directly manage orders, process payments, and handle incidents through natural conversation.
β¨ What Makes This Special?
π€ Talk to Your Business System: Use natural language to manage orders, payments, and incidents
β‘ Real-Time Operations: AI agents perform actual business operations, not just mock data
π§ Production-Ready: Built with enterprise-grade technologies and best practices
π― Plug & Play: Easy setup with Docker - get running in minutes
π Modern Stack: Vue.js frontends, Spring Boot APIs, and intelligent MCP servers
π Quick Overview
Service | What It Does | Frontend | API |
---|---|---|---|
π¦ Orders | Manage customer orders & lifecycle | localhost:5173 | localhost:8081 |
π³ Payments | Process payments & transactions | localhost:5174 | localhost:8082 |
π¨ Incidents | Track issues & resolutions | localhost:5175 | localhost:8083 |
π§ AI Assistant | Smart automation layer | - | localhost:8085 |
ποΈ System Architecture
π₯οΈ Frontend Apps (Vue.js + TypeScript)
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Orders β β Payments β β Incidents β
β :5173 β β :5174 β β :5175 β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β β β
β‘ REST APIs (Spring Boot + Java)
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β Order API β βPayment API β βIncident API β
β :8081 β β :8082 β β :8083 β
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β β β
ββββββββββββββββββΌββββββββββββββββ
β
π€ AI Integration Layer
βββββββββββββββββββββββββββ
β MCP Servers β
β (AI β Business) β
β :8085 β
βββββββββββββββββββββββββββ
β
πΎ Data Layer
βββββββββββββββββββββββββββ
β MongoDB β
β (Document Store) β
β :27017 β
βββββββββββββββββββββββββββ
π Get Started in 3 Minutes!
Prerequisites β
- Docker Desktop installed and running
- Available ports:
5173-5175
,8081-8083
,8085
,27017
1οΈβ£ Launch Everything
# Navigate to project directory
cd agentic-ai-demo
# π Start all services (this might take 2-3 minutes first time)
docker-compose up --build -d
# β
Check everything is running
docker-compose ps
2οΈβ£ Verify It's Working
Open these links to confirm services are up:
- π Order Management UI - Manage customer orders
- π³ Payment Portal - Handle transactions
- π― Incident Dashboard - Track issues
- π Order API Health - Should show
{"status":"UP"}
3οΈβ£ Explore Sample Data
The platform comes pre-loaded with realistic business data:
- 8 sample orders in various stages (new β processing β shipped β delivered)
- 4 payment records with different statuses
- 5 incident tickets with varying priorities
π You're ready! Your complete business platform is now running!
π οΈ Management Commands
Essential Operations
# π Stop everything
docker-compose down
# π Restart a specific service
docker-compose restart order-backend
# π View logs for debugging
docker-compose logs -f [service-name]
# π§Ή Clean slate (removes all data)
docker-compose down --volumes
# ποΈ Complete cleanup (removes images too)
docker-compose down --volumes --rmi all
Health Monitoring
All services include smart health checks:
- β Auto-healing: Unhealthy containers restart automatically
- β±οΈ Quick detection: Issues detected within 30 seconds
- π Retry logic: 3 attempts before marking as failed
Check health status: docker-compose ps
π§° Technology Stack
π₯οΈ Frontend Technologies
- Vue.js 3 - Modern reactive framework with Composition API
- TypeScript - Type-safe development with excellent IDE support
- Vite - Lightning-fast build tool and hot reload
- CSS3 - Modern styling with responsive design
βοΈ Backend Technologies
- Spring Boot - Enterprise Java framework with auto-configuration
- H2 Database - Embedded SQL database for rapid development
- MongoDB - Document database for flexible data structures
- Gradle - Advanced build automation and dependency management
π Infrastructure & DevOps
- Docker - Containerization for consistent environments
- Docker Compose - Multi-container orchestration
- Health Checks - Built-in monitoring and auto-recovery
- Multi-stage Builds - Optimized container images
π€ AI Integration
- Model Context Protocol (MCP) - Standard for AI-app integration
- REST APIs - HTTP-based service communication
- Spring Boot Actuator - Production monitoring endpoints
π€ Connect Your AI Assistant
The real magic happens when you connect AI assistants to control your business operations through conversation!
π§ Quick Setup for VS Code
- Build the MCP servers (one-time setup):
# Build both MCP server JAR files
./gradlew :mcp-servers:oms-mcp-server:build
./gradlew :mcp-servers:incident-mcp-server:build
- Configure VS Code - Add to your
settings.json
:
{
"mcp": {
"servers": {
"oms-mcp-server": {
"type": "stdio",
"command": "java",
"args": ["-jar", "YOUR_PROJECT_PATH/mcp-servers/oms-mcp-server/build/libs/oms-mcp-server-0.0.1-SNAPSHOT.jar"]
},
"incident-mcp-server": {
"type": "stdio",
"command": "java",
"args": ["-jar", "YOUR_PROJECT_PATH/mcp-servers/incident-mcp-server/build/libs/incident-mcp-server-0.0.1-SNAPSHOT.jar"]
}
}
},
"chat.mcp.discovery.enabled": true
}
- Replace
YOUR_PROJECT_PATH
with your actual project path.
π¬ Talk to Your Business System
Once connected, try these natural language commands:
What You Say | What Happens |
---|---|
"Show me all pending orders" | π Lists orders waiting to be processed |
"Create a payment for order #1001 for $150" | π³ Processes a new payment transaction |
"What high-priority incidents are open?" | π¨ Filters critical issues needing attention |
"Move order #1001 to the next stage" | β‘ Advances order through workflow |
"Show me all failed payments" | πΈ Displays transactions that need retry |
π‘ Pro Tip: The AI maintains full business context and validates operations, so you can have natural conversations about complex business workflows!
β Troubleshooting
π¨ Services won't start
Problem: docker-compose up
fails or services show as unhealthy
Solutions:
# Check if ports are already in use
lsof -i :5173 -i :8081 -i :8082 -i :8083 -i :8085 -i :27017
# Clean up any existing containers
docker-compose down --volumes
docker system prune -f
# Restart Docker Desktop and try again
docker-compose up --build -d
π Can't connect to AI assistants
Problem: MCP servers not recognized by VS Code or Claude
Solutions:
-
Verify JAR files exist:
ls -la mcp-servers/*/build/libs/*.jar
-
Rebuild if missing:
./gradlew :mcp-servers:oms-mcp-server:build ./gradlew :mcp-servers:incident-mcp-server:build
-
Check VS Code settings path - Use absolute paths in settings.json
-
Restart VS Code after configuration changes
πΎ Data not persisting
Problem: Sample data disappears after restart
Solution: This is expected behavior. The H2 databases are in-memory for demo purposes. MongoDB data persists in Docker volumes.
π― What's Next?
Ready to extend this platform? Here are some ideas:
- π Add Authentication - Implement user login and role-based access
- π§ Email Notifications - Send alerts for order status changes
- π Analytics Dashboard - Add business intelligence and reporting
- π Event Streaming - Implement Apache Kafka for real-time events
- π§ͺ Testing Suite - Add comprehensive integration tests
- π Multi-tenancy - Support multiple organizations
π Support & Contributing
- π Found a bug? Open an issue with detailed reproduction steps
- π‘ Have an idea? We'd love to hear your suggestions
- π€ Want to contribute? Check out our contribution guidelines
- π Need help? Join our community discussions
π Star this repo if you found it helpful!
Built with β€οΈ for the AI development community