Provides optional data persistence capabilities for storing templates and configuration data in a Couchbase NoSQL database
Enables containerized deployment and orchestration of the template generation server with Docker and Docker Compose configurations
Powers enterprise template rendering and generation using Jinja2 templating engine with custom enterprise filters for workflow automation and digitalization processes
Supports scalable deployment and management of the template generation server in Kubernetes clusters with load balancing and high availability configurations
Referenced as a source database in database migration workflow templates for platform migration automation
Referenced as a target database in database migration workflow templates for platform migration automation
Enterprise Template Generator MCP Server
A comprehensive MCP (Model Context Protocol) server for enterprise software template generation, built with clean domain-driven design principles and focused on workflow automation for digitalization processes.
🚀 Features
Core Capabilities
Domain-Driven Design: Clean architecture with entities, value objects, and application services
Jinja2 Template Engine: Powerful template rendering with custom enterprise filters
FastMCP Integration: Modern MCP server with comprehensive tool set
Enterprise Validation: Swedish/EU compliance support (GDPR, Swedish Data Protection Act)
Workflow Automation: Specialized templates for platform/process migration
Template Categories
Workflow Automation: Platform migration, process digitalization
MCP Generator: Templates for creating new MCP servers
Data Science: Data analysis and ML workflow templates
Finance Analytics: Economic and financial analysis applications
Engineering ML: ML engineering and technical development
Infrastructure: Infrastructure as Code templates
Security: Security implementation templates
Compliance: Regulatory compliance templates
Enterprise Requirements Support
GDPR Compliance: Data minimization, right to erasure, privacy by design
Swedish Regulations: Data Protection Act, banking secrecy laws
Security: Zero Trust architecture, encryption, access control
Performance: <100ms response times, horizontal scaling
Resilience: Offline mode, automatic failover, 99.95% uptime SLA
🏗️ Architecture
🛠️ Installation
Clone and Setup
git clone <repository> cd mcp-template python3 -m venv venv source venv/bin/activate pip install -r requirements.txtRun Tests
pytest tests/ -vTest the Server
python test_server.py
⚙️ Configuration
Local Development
Run the MCP Server Directly
# Activate virtual environment source venv/bin/activate # Run the server python -m src.serverEnvironment Variables
export MCP_PORT=8000 # Server port (default: 8000) export MCP_HOST=localhost # Server host (default: localhost) export LOG_LEVEL=INFO # Logging level (DEBUG, INFO, WARNING, ERROR) export TEMPLATE_DIR=/custom/path # Custom template directory (optional)
MCP Configuration for Cline
Add this server to your Cline MCP settings (~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
):
Or use a wrapper script:
Docker Configuration
Create Dockerfile (if not exists):
FROM python:3.11-alpine WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY src/ ./src/ COPY templates/ ./templates/ ENV PYTHONPATH=/app ENV MCP_PORT=8000 EXPOSE 8000 CMD ["python", "-m", "src.server"]Build and Run:
# Build image docker build -t mcp-enterprise-templates . # Run container docker run -d \ --name enterprise-templates \ -p 8000:8000 \ -e LOG_LEVEL=INFO \ mcp-enterprise-templates
Docker Compose Setup
Create docker-compose.yml
:
Run with:
Systemd Service (Production Linux)
Create /etc/systemd/system/mcp-enterprise-templates.service
:
Enable and start:
Kubernetes Deployment
Create k8s-deployment.yaml
:
Deploy:
🚀 Quick Start Guide
Install and Configure
# Clone repository git clone <repository> cd mcp-template # Setup Python environment python3 -m venv venv source venv/bin/activate pip install -r requirements.txtAdd to Cline MCP Settings
Open VS Code
Access Cline settings
Add the configuration JSON shown above
Restart Cline to load the MCP server
Verify Installation
# Test locally python test_server.py # Check if MCP tools are available in Cline # You should see tools like: # - create_template # - render_template # - list_templatesCreate Your First Workflow
Use the
create_template
tool to define a new processProvide process name, goal, trigger, and steps
Use
render_template
to generate documentation
🔧 Troubleshooting
Common Issues
Server not starting
Check Python version (3.8+ required)
Verify all dependencies:
pip install -r requirements.txt
Check port availability:
lsof -i :8000
MCP tools not appearing in Cline
Verify JSON configuration syntax
Check file paths are absolute
Restart VS Code/Cline
Check Cline logs for errors
Template rendering errors
Ensure all required variables are provided
Check template syntax (Jinja2)
Verify variable types match template expectations
Docker issues
Ensure Docker daemon is running
Check port mappings
Verify volume mounts for templates
Debug Mode
Enable debug logging:
Check logs for detailed error messages and stack traces.
🔧 MCP Tools
The server provides the following MCP tools:
Template Management
create_template
- Create new enterprise templatesget_template
- Retrieve template detailslist_templates
- List templates with filteringupdate_template
- Update existing templatesdelete_template
- Remove templatesclone_template
- Clone existing templates
Template Operations
render_template
- Generate code from templatesvalidate_template_variables
- Validate template inputssearch_templates
- Search templates by content
System Information
get_template_stats
- System statisticsget_supported_variable_types
- Available variable typesget_supported_validation_rules
- Available validation rulesget_template_categories
- Supported categories
📝 Usage Example
Creating a Workflow Template
Rendering Templates
🏢 Enterprise Features
Compliance & Security
GDPR: Data processing agreements, lawful basis validation
Swedish Data Act: Data residency requirements
ISO 27001: Security controls and access management
Zero Trust: Continuous verification, least privilege
Performance & Reliability
High Performance: <100ms response times
Scalability: Horizontal scaling support
Resilience: Offline mode, automatic failover
Monitoring: Comprehensive logging and metrics
Swedish Enterprise Integration
Language Support: Swedish and English
Payment Systems: Swish, Bankgirot integration
Identity Providers: BankID, Freja eID support
Government APIs: Integration with Swedish public services
🧪 Testing
The project follows Test-Driven Development (TDD):
🚀 Deployment
Docker Deployment
Kubernetes Deployment
📊 Hackathon Requirements
✅ Offline Mode & Failover: Automatic failover with data center shutdown support
✅ FastMCP: Modern MCP server implementation
✅ Jinja2 Templates: Reusable enterprise templates
✅ Python: Clean, well-structured Python codebase
✅ TDD: Comprehensive test suite
✅ Virtual Environment: Proper dependency management
✅ Enterprise Ready: Swedish/EU compliance, security, performance
🤝 Contributing
Fork the repository
Create a feature branch
Write tests for new functionality
Implement the feature
Ensure all tests pass
Submit a pull request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🏆 Hackathon Demo
This MCP server demonstrates:
Enterprise-grade architecture with domain-driven design
Workflow automation for digitalization processes
Swedish/EU compliance built-in
Resilience features including offline mode and failover
Template generation for faster enterprise software development
Perfect for enterprise developers who need to generate better software faster while maintaining compliance and security standards.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables generation of enterprise-grade software templates with built-in GDPR/Swedish compliance validation, workflow automation for platform migrations, and comprehensive template management through domain-driven design principles.
Related MCP Servers
- AsecurityAlicenseAqualityFacilitates contract and template management for eSignatures, enabling users to create, send, update, and manage contracts and templates with customizable options through a user-friendly interface.Last updated -1328MIT License
- AsecurityAlicenseAqualityAutomates the creation of standardized documentation by extracting information from source files and applying templates, with integration capabilities for GitHub, Google Drive, and Perplexity AI.Last updated -33MIT License
- AsecurityAlicenseAqualityA lightweight, configurable server that fetches coding guidelines, security rules, and validation patterns from external sources to help development teams maintain code quality standards in WordPress projects.Last updated -35MIT License
- -securityAlicense-qualityProvides 11 powerful tools for Angular development with enterprise-grade templates, scaffolding capabilities, and project generation features for modern Angular 20.0.x applications.Last updated -MIT License