StackWiz MCP Usage Guide¶
This guide explains how to use StackWiz MCP with Claude to manage your Docker infrastructure through natural language.
Getting Started¶
Basic Interaction Pattern¶
When using StackWiz MCP with Claude, you can: 1. Describe what you want - Use natural language 2. Claude interprets - Translates to MCP commands 3. StackWiz executes - Performs Docker operations 4. Get feedback - See results and next steps
Your First Stack¶
Try this simple request:
"Create a basic web server using nginx"
Claude will:
- Create a stack called nginx
- Set up Docker Compose configuration
- Configure Traefik for SSL
- Start the service
- Provide the access URL
Common Use Cases¶
1. Creating Services¶
Simple Service Deployment¶
"I need a Grafana instance for monitoring"
Result:
- Stack: grafana
- URL: https://grafana.rbnk.uk
- Automatic SSL certificate
- Persistent data volume
Service with Specific Requirements¶
"Deploy PostgreSQL 15 with a database called 'myapp' and password 'secure123'"
Result:
- Stack: postgres
- Custom database and credentials
- Persistent data volume
- Connection details provided
Complex Application Stack¶
"Create a complete todo application with Pocketbase backend and a frontend"
Result:
- Two stacks: todo-pb (backend) and todo (frontend)
- Backend URL: https://todo-pb.rbnk.uk
- Frontend URL: https://todo.rbnk.uk
- Automatic API configuration
2. Managing Services¶
View All Services¶
"Show me all running Docker services"
Claude will display: - Service names and status - Resource usage - URLs and endpoints - Health status
Control Services¶
"Stop the Grafana service" "Restart the PostgreSQL database" "Remove the test-app stack completely"
Access Logs¶
"Show me the last 50 lines of logs from the nginx service" "Follow the live logs from my todo-app backend"
3. DNS Management¶
Create DNS Records¶
"Create a DNS record for api.rbnk.uk pointing to this server"
Advanced DNS¶
"Add a CNAME record for www pointing to rbnk.uk" "Create an MX record for mail handling"
4. Troubleshooting¶
Service Issues¶
"My Grafana service isn't working, can you check what's wrong?"
Claude will: - Check service status - Review recent logs - Identify common issues - Suggest fixes
Configuration Updates¶
"I need to change the PostgreSQL port to 5433" "Add an environment variable API_KEY=xyz to my app"
Advanced Usage¶
Custom Configurations¶
You can provide detailed specifications:
"Create a Redis cache with: - 2GB memory limit - Persistence enabled - Password authentication - Custom configuration file"
Multi-Service Deployments¶
Deploy related services together:
"I need a complete monitoring stack with: - Prometheus for metrics - Grafana for visualization
- Loki for logs - All connected together"
Integration with Existing Services¶
"Create a new API service that connects to the existing PostgreSQL database"
Batch Operations¶
"Update all services to use the latest images" "Add resource limits to all running services"
Best Practices¶
1. Service Naming¶
Use clear, descriptive names:
- ✅ analytics-api, user-database, blog-frontend
- ❌ api, db, app
2. Security¶
Always specify: - Strong passwords for databases - Appropriate access controls - Resource limits
Example:
"Create a MySQL database with a strong random password and limit it to 1GB RAM"
3. Persistence¶
Mention data requirements:
"Deploy Grafana with persistent storage for dashboards"
4. Networking¶
Specify connectivity needs:
"Create an internal PostgreSQL database not exposed to the internet"
5. Monitoring¶
Include observability:
"Deploy my API with Prometheus metrics enabled"
Interactive Workflows¶
StackWiz MCP supports guided deployments:
Web Application Deployment¶
"Help me deploy a web application"
Claude will ask: 1. What type of application? 2. Do you need a database? 3. What domain should it use? 4. Any special requirements?
Database Setup¶
"I need to set up a production database"
Claude will guide through: 1. Database type selection 2. Security configuration 3. Backup setup 4. Monitoring integration
Understanding Responses¶
Success Response Example¶
✅ Successfully created stack: grafana
📁 Stack Location: /srv/dockerdata/grafana
🌐 Access URL: https://grafana.rbnk.uk
🔐 Default Credentials: admin/admin (change on first login)
📊 Status: Running (healthy)
Next steps:
1. Access Grafana at https://grafana.rbnk.uk
2. Log in with default credentials
3. Change the admin password
4. Start adding data sources
Error Response Example¶
❌ Failed to create stack: postgres
Error: Port 5432 is already in use
Suggestion: Use a different port or stop the conflicting service
To investigate:
- Check what's using port 5432: sudo lsof -i :5432
- List running services: docker ps
Working with Pocketbase¶
Pocketbase stacks have special features:
Create a Pocketbase App¶
"Create a task management app with Pocketbase"
Features included: - SQLite database - Built-in auth system - Admin dashboard - Real-time subscriptions - File storage
Access Pocketbase¶
After deployment:
- API: https://myapp-pb.rbnk.uk/api/
- Admin: https://myapp-pb.rbnk.uk/_/
- Create admin account on first access
Tips for Effective Use¶
1. Be Specific¶
Instead of: "Create a database" Try: "Create a PostgreSQL 15 database for my e-commerce application with 4GB memory limit"
2. Mention Requirements Upfront¶
Instead of: "Deploy Redis" (then asking for persistence) Try: "Deploy Redis with persistence and password protection"
3. Use Contextual Information¶
Instead of: "Create another service like the last one" Try: "Create a staging environment for my todo-app with the same configuration"
4. Ask for Options¶
"What are my options for deploying a Python web application?" "Show me different database options for a small project"
5. Verify Before Major Changes¶
"What would happen if I remove the postgres stack?" "Show me what services depend on the traefik network"
Common Patterns¶
Development to Production¶
-
Start with development:
"Create a development PostgreSQL database for testing"
-
Move to production:
"Create a production PostgreSQL database with: - Strong password - Automated backups - Resource limits - Monitoring enabled"
Microservices Architecture¶
Deploy services incrementally: 1. > "Create an API gateway using Traefik" 2. > "Add a user authentication service" 3. > "Deploy a product catalog API" 4. > "Add a Redis cache for sessions"
Full Stack Application¶
-
"Create a Pocketbase backend for my social media app"
-
"Create a React frontend that connects to the Pocketbase API"
-
"Add a Redis cache for performance"
-
"Set up monitoring with Grafana"
Getting Help¶
Check Documentation¶
"Show me the documentation for the create_stack tool" "What parameters does manage_stack accept?"
Understand Capabilities¶
"What can StackWiz MCP do?" "Show me all available tools"
Debug Issues¶
"Help me debug why my service won't start" "Check the health of all services"
Next Steps¶
- Tool Reference - Detailed API documentation
- Examples - Specific deployment scenarios
- Troubleshooting - Common issues and solutions