Columbia MCP Server
by smithery-ai
# MCP Server Deployment
## Quick Start
```bash
# 1. Clone and setup
git clone <repository-url>
cd <repository-directory>
cp docker/.env.example .env
# 2. Configure environment
./docker/scripts/validate-env.sh --env-file .env
# 3. Deploy
./docker/scripts/deploy.sh
# 4. Monitor
./docker/scripts/monitor.sh
```
## Scripts
### deploy.sh
Deploys MCP servers with monitoring and backups.
```bash
./docker/scripts/deploy.sh [--env-file .env.prod] [--compose-file docker/docker-compose.prod.yml]
```
### rollback.sh
Rolls back to a previous deployment state.
```bash
./docker/scripts/rollback.sh --backup 20250126_123456
```
### monitor.sh
Monitors health and performance metrics.
```bash
./docker/scripts/monitor.sh [--interval 60] [--alert-threshold 80]
```
## Configuration
### Environment Variables
Required variables in .env:
```env
NODE_ENV=production
REDIS_PASSWORD=<secure-password>
GRAFANA_PASSWORD=<secure-password>
```
### Redis
- Memory: 512MB max
- Persistence: AOF enabled
- Security: Protected mode, authentication required
### Nginx
- SSL/TLS enabled
- HTTP/2 support
- Rate limiting: 10r/s
- Gzip compression enabled
## Monitoring
### Metrics
- CPU/Memory usage
- Redis memory
- Response times
- Error rates
- Request rates
### Alerts
- CPU > 80%
- Memory > 85%
- Redis memory > 80%
- Response time > 1s
- Error rate > 5%
### Dashboards
- Grafana: http://localhost:3000
- Redis Commander: http://localhost:8081
- Prometheus: http://localhost:9090
## Maintenance
### Backups
Automatic daily backups:
- Redis data
- Environment configs
- Logs (7-day retention)
### Recovery
```bash
# List backups
ls -l backups/
# Restore from backup
./docker/scripts/rollback.sh --backup <timestamp>
```
### Logs
```bash
# View service logs
docker-compose -f docker/docker-compose.prod.yml logs [service]
# View monitoring logs
tail -f logs/monitoring/metrics.csv
```
## Troubleshooting
### Common Issues
1. Redis Connection Failed
```bash
# Check Redis status
docker-compose exec redis redis-cli ping
# Verify password
docker-compose exec redis redis-cli -a $REDIS_PASSWORD ping
```
2. High Memory Usage
```bash
# Check Redis memory
docker-compose exec redis redis-cli info memory
# Clear Redis cache if needed
docker-compose exec redis redis-cli FLUSHDB
```
3. Container Health Check Failed
```bash
# Check container status
docker-compose ps
# View container logs
docker-compose logs --tail=100 [container_name]
```
### Health Checks
- /health - API health status
- /metrics - Prometheus metrics
- Redis ping check
- Container health status
## Security
### Network
- Internal Docker network
- Nginx reverse proxy
- SSL/TLS termination
- Rate limiting
### Data
- Redis password protection
- Environment variable encryption
- Regular backups
- Secure file permissions
### Monitoring
- Protected metrics endpoints
- Encrypted monitoring data
- Access logging
- Alert notifications