StackWiz MCP Troubleshooting Guide¶
This guide helps you diagnose and resolve common issues when using StackWiz MCP.
Quick Diagnostics¶
Check StackWiz MCP Status¶
Ask Claude:
"Check if StackWiz MCP is working properly"
Or run manually:
# Check if server is running
ps aux | grep stackwiz_mcp
# Test server health
curl http://localhost:8765/health
# View server logs
tail -f ~/.cache/stackwiz-mcp/logs/server.log
Common Issues¶
1. StackWiz MCP Not Available in Claude¶
Symptoms: - Claude says "I don't have access to StackWiz MCP" - Tools not showing up in Claude's interface
Solutions:
-
Check Claude Desktop Configuration:
-
Verify Configuration Format:
-
Restart Claude Desktop:
- Completely quit Claude Desktop
- Start it again
-
Check if StackWiz appears
-
Test Manual Start:
2. Stack Creation Fails¶
Symptoms: - Error: "Failed to create stack" - Docker compose errors
Solutions:
-
Check Docker Access:
-
Verify Base Directory:
-
Check Port Conflicts:
-
Validate Image Name:
3. DNS Creation Fails¶
Symptoms: - Error: "Failed to create DNS record" - Cloudflare API errors
Solutions:
-
Check Cloudflare Credentials:
-
Test Cloudflare API:
-
Verify Domain Zone:
- Ensure domain is in your Cloudflare account
-
Check API token has correct permissions:
- Zone:DNS:Edit
- Zone:Zone:Read
-
Manual DNS Creation:
4. Service Not Accessible¶
Symptoms: - Service running but can't access via URL - SSL certificate errors
Solutions:
-
Check Traefik:
-
Verify Labels:
-
DNS Propagation:
-
Port Forwarding (if using Proxmox):
- Ensure port 443 is forwarded from Proxmox host to VM
- Check iptables rules on Proxmox host
5. Container Keeps Restarting¶
Symptoms: - Service status shows "Restarting" - Container exits immediately
Solutions:
-
Check Logs:
-
Common Causes:
- Missing environment variables
- Incorrect file permissions
- Port already in use
-
Invalid configuration
-
Debug Mode:
6. Permission Errors¶
Symptoms: - "Permission denied" errors - Can't write to volumes
Solutions:
-
Fix Volume Permissions:
-
User/Group Issues:
7. Resource Limits Hit¶
Symptoms: - Out of memory errors - Disk space issues - CPU throttling
Solutions:
-
Check Resources:
-
Clean Up:
-
Adjust Limits: Ask Claude:
"Update the Redis service to use only 256MB of memory"
Advanced Troubleshooting¶
Enable Debug Logging¶
-
Set Debug Mode:
-
In Claude Configuration:
Direct API Testing¶
Test StackWiz MCP directly:
# List stacks
curl -X POST http://localhost:8765/tools/list_stacks \
-H "Content-Type: application/json" \
-d '{}'
# Get server info
curl http://localhost:8765/server-info
Check Docker Compose Files¶
# Validate compose file
docker compose -f /srv/dockerdata/stack-name/docker-compose.yml config
# Test without starting
docker compose -f /srv/dockerdata/stack-name/docker-compose.yml up --no-start
Network Debugging¶
# List networks
docker network ls
# Inspect network
docker network inspect traefik_proxy
# Test connectivity
docker run --rm --network traefik_proxy alpine ping -c 4 container_name
Error Reference¶
Common Error Messages¶
| Error | Cause | Solution |
|---|---|---|
Stack already exists |
Duplicate name | Use different name or remove existing |
Port is already allocated |
Port conflict | Use different port or stop conflicting service |
No such image |
Image not found | Check image name and registry |
Network not found |
Missing network | Create network: docker network create traefik_proxy |
Permission denied |
Docker permissions | Add user to docker group |
Invalid compose file |
YAML syntax error | Check indentation and syntax |
DNS record exists |
Duplicate DNS | Use different subdomain or update existing |
Cloudflare API error |
Invalid credentials | Check API token and permissions |
MCP-Specific Errors¶
| Error | Cause | Solution |
|---|---|---|
Tool not found |
MCP not loaded | Restart Claude Desktop |
Invalid parameters |
Wrong tool usage | Check tool documentation |
Timeout waiting for response |
Server not responding | Check if StackWiz MCP is running |
Connection refused |
Server not started | Start StackWiz MCP server |
Getting Help¶
1. Diagnostic Information¶
When reporting issues, include:
# System info
uname -a
python --version
docker --version
# StackWiz info
cd /srv/dockerdata/stackwiz-mcp
git log -1 --oneline
# Error logs
tail -n 50 ~/.cache/stackwiz-mcp/logs/server.log
2. Test in Isolation¶
# Create minimal test
cd /tmp
cat > test-compose.yml << EOF
version: '3.8'
services:
test:
image: nginx:alpine
ports:
- "8888:80"
EOF
docker compose -f test-compose.yml up
3. Check Documentation¶
- Review Installation Guide
- Check Tool Reference
- See Examples for working configurations
Prevention Tips¶
1. Regular Maintenance¶
2. Monitor Resources¶
Ask Claude periodically:
"Show me resource usage for all stacks" "Which services are using the most memory?"
3. Backup Configurations¶
4. Keep Updated¶
Emergency Recovery¶
If Everything Breaks¶
-
Stop All Services:
-
Restart Docker:
-
Start Essential Services:
-
Start Services One by One: Ask Claude:
"List all stacks and start them one by one, checking for errors"
Restore from Backup¶
If you have infrastructure backups:
Next Steps¶
- Usage Guide - Learn best practices
- Development Guide - Debug and extend StackWiz
- Tool Reference - Complete API documentation