MCP Business AI Transformation
Enterprise-grade MCP server with multi-agent system that enables AI-powered business transformation across finance, healthcare, retail, manufacturing, and technology domains through specialized agents for data analysis, API execution, and report generation.
README
MCP Business AI Transformation
Enterprise-grade MCP (Model Context Protocol) server with multi-agent system for business AI transformation.
ποΈ Architecture Overview
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Agent Layer βββββΊβ MCP Gateway βββββΊβ Business APIs β
β (Orchestrator) β β (Protocol Hub) β β (External) β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β LLM Fabric β β State Manager β β Monitoring Hub β
β (Multi-Model) β β (Redis+Postgres) β β (Observability) β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
π Features
Core MCP Server
- FastAPI-based high-performance server
- MCP Protocol compliant (2024-11-05 spec)
- Multi-provider LLM support (Evolution Foundation Models, OpenAI, HuggingFace)
- Circuit breaker pattern for external API resilience
- Rate limiting with Redis-based sliding window
- JWT & API Key authentication
- Prometheus metrics and OpenTelemetry tracing
Multi-Agent System
- Specialized Agents: Data Analyst, API Executor, Business Validator, Report Generator
- Agent Registry for dynamic agent management
- Message Bus for inter-agent communication
- Task Orchestration with intelligent agent selection
- LangChain/LlamaIndex integration for advanced AI capabilities
Enterprise Features
- Real-time Dashboard with React + TypeScript
- Business Domain Support: Finance, Healthcare, Retail, Manufacturing, Technology
- Observability Stack: Prometheus, Grafana, Jaeger
- Docker Compose for easy deployment
- Production-ready with security best practices
π οΈ Technology Stack
Frontend
- Next.js 15 with App Router
- TypeScript 5 for type safety
- Tailwind CSS 4 with shadcn/ui components
- Real-time updates with WebSocket support
Backend
- Python 3.11 with FastAPI
- PostgreSQL for persistent storage
- Redis for caching and rate limiting
- AsyncIO for high concurrency
AI/ML
- Evolution Foundation Models (Cloud.ru)
- OpenAI API compatibility
- LangChain for agent orchestration
- LlamaIndex for data indexing
DevOps
- Docker containerization
- Prometheus monitoring
- Grafana dashboards
- Jaeger distributed tracing
π¦ Quick Start
Prerequisites
- Docker & Docker Compose
- Node.js 18+ (for local development)
- Python 3.11+ (for local development)
Environment Configuration
Create a .env file:
# API Keys
EVOLUTION_API_KEY=your_evolution_api_key
OPENAI_API_KEY=your_openai_api_key
HUGGINGFACE_API_KEY=your_huggingface_api_key
# Security
SECRET_KEY=your-super-secret-key-change-in-production
# Database (optional, defaults work with Docker)
DATABASE_URL=postgresql+asyncpg://postgres:password@localhost:5432/mcp_db
REDIS_URL=redis://localhost:6379
Start the System
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down
Access Points
- Frontend Dashboard: http://localhost:3000
- MCP Server API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
- Grafana Dashboard: http://localhost:3001 (admin/admin)
- Prometheus: http://localhost:9091
- Jaeger Tracing: http://localhost:16686
π§ Development
Local Development Setup
Backend (MCP Server)
cd mcp_server
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
Agent System
cd agent_system
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python main.py
Frontend
npm install
npm run dev
Project Structure
βββ src/ # Next.js frontend
β βββ app/ # App Router pages
β βββ components/ # React components
β βββ lib/ # Utility functions
βββ mcp_server/ # FastAPI MCP server
β βββ app/ # Application code
β β βββ api/v1/ # API endpoints
β β βββ core/ # Core services
β β βββ middleware/ # Custom middleware
β βββ tests/ # Test suite
βββ agent_system/ # Multi-agent system
β βββ core/ # Agent framework
β βββ agents/ # Specialized agents
β βββ llm/ # LLM providers
βββ docker-compose.yml # Multi-service deployment
βββ docs/ # Documentation
π API Usage
MCP Protocol
The server implements the MCP protocol for tool and resource management:
# Initialize connection
curl -X POST http://localhost:8000/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {}
}
}'
# List available tools
curl -X POST http://localhost:8000/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/list"
}'
# Execute a tool
curl -X POST http://localhost:8000/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "financial_analyzer",
"arguments": {
"data": {...}
}
}
}'
REST API
# Create a business task
curl -X POST http://localhost:8000/api/v1/resources/tasks \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"title": "Financial Analysis Q4",
"description": "Analyze quarterly financial data",
"domain": "finance",
"priority": "high"
}'
# Get system status
curl -X GET http://localhost:8000/api/v1/admin/system/status
# Health check
curl -X GET http://localhost:8000/api/v1/health
π Monitoring & Observability
Metrics
- Request latency and throughput
- Agent performance and task completion rates
- LLM token usage and costs
- External API success rates and circuit breaker status
Tracing
- Distributed tracing with Jaeger
- Request correlation IDs
- Agent communication tracing
Logging
- Structured logging with correlation IDs
- Log levels: DEBUG, INFO, WARNING, ERROR
- JSON format for easy parsing
π Security
Authentication
- JWT tokens for user authentication
- API keys for service-to-service communication
- Rate limiting per user/API key
Authorization
- Role-based access control (RBAC)
- Resource-level permissions
- CORS configuration
Data Protection
- Input validation and sanitization
- SQL injection prevention
- XSS protection headers
π Deployment
Production Deployment
# Set production environment variables
export NODE_ENV=production
export DEBUG=false
# Deploy with production configurations
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
Cloud.ru Evolution AI Agents
The system is designed to deploy on Cloud.ru Evolution AI Agents platform:
- Container Registry: Push Docker images to Cloud.ru registry
- AI Agent Configuration: Configure agent endpoints and API keys
- Load Balancing: Set up load balancer for high availability
- Monitoring: Configure Cloud.ru monitoring integration
π€ Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Support
- Documentation: Check the
/docsdirectory - API Docs: Visit http://localhost:8000/docs
- Issues: Create an issue on GitHub
- Discussions: Join our GitHub Discussions
πΊοΈ Roadmap
Phase 1: Core Infrastructure β
- [x] MCP Server implementation
- [x] Multi-agent system
- [x] LLM provider integration
- [x] Basic monitoring
Phase 2: Advanced Features (In Progress)
- [ ] Advanced agent orchestration
- [ ] Custom tool development framework
- [ ] Advanced analytics and reporting
- [ ] Multi-tenancy support
Phase 3: Enterprise Features (Planned)
- [ ] Advanced security features
- [ ] Compliance certifications
- [ ] Advanced monitoring and alerting
- [ ] Performance optimization
Phase 4: AI/ML Enhancements (Future)
- [ ] Custom model training
- [ ] Advanced prompt engineering
- [ ] Multi-modal AI capabilities
- [ ] AutoML integration
Built with β€οΈ for enterprise AI transformation
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.