Operations
Related Topics: Security (authentication, policies) | Quality (testing, validation) | Common Tasks (quick how-to)
This section covers everything you need to deploy and operate MXCP in production environments.
Topics
Section titled “Topics”Complete configuration reference:
- Site configuration (
mxcp-site.yml) - User configuration (
~/.mxcp/config.yml) - Environment variables
- Secret management (Vault, 1Password)
Production deployment patterns:
- Docker deployment
- systemd service configuration
- Kubernetes deployment
- Signal handling and hot reload
Observability and operational monitoring:
- OpenTelemetry integration
- Drift detection
- Admin API
- Health checks
Quick Reference
Section titled “Quick Reference”Start Server
Section titled “Start Server”# stdio transport (for Claude Desktop)mxcp serve
# HTTP transportmxcp serve --transport streamable-http --port 8000
# With specific profilemxcp serve --profile productionEnvironment Variables
Section titled “Environment Variables”| Variable | Description | Default |
|---|---|---|
MXCP_CONFIG | User config path | ~/.mxcp/config.yml |
MXCP_PROFILE | Active profile | default |
MXCP_DEBUG | Enable debug logging | false |
MXCP_READONLY | Read-only database | false |
MXCP_DUCKDB_PATH | Override DuckDB path | from config |
MXCP_ADMIN_ENABLED | Enable admin API | false |
MXCP_ADMIN_SOCKET | Admin socket path | /run/mxcp/mxcp.sock |
Signal Handling
Section titled “Signal Handling”| Signal | Behavior |
|---|---|
SIGTERM | Graceful shutdown |
SIGHUP | Hot reload configuration |
SIGINT | Immediate shutdown |
CLI Commands
Section titled “CLI Commands”# List endpointsmxcp list
# Validate endpointsmxcp validate
# Run testsmxcp test
# Query audit logsmxcp log --since 1h
# Check driftmxcp drift-check
# Create drift snapshotmxcp drift-snapshotDeployment Checklist
Section titled “Deployment Checklist”Before deploying to production:
-
Security
- Authentication configured
- Policies defined
- Audit logging enabled
- Secrets in Vault/1Password
-
Configuration
- Production profile created
- Database path configured
- Correct transport settings
-
Quality
- All tests passing
- Validation successful
- Linting issues addressed
-
Operations
- Monitoring configured
- Log rotation set up
- Backup strategy defined
- Drift baseline created
Architecture Patterns
Section titled “Architecture Patterns”Single Instance
Section titled “Single Instance”Behind Reverse Proxy
Section titled “Behind Reverse Proxy”Container Deployment
Section titled “Container Deployment”Common Operations
Section titled “Common Operations”Hot Reload Configuration
Section titled “Hot Reload Configuration”Reload secrets without restart:
# Using signalkill -HUP $(pgrep -f "mxcp serve")
# Using admin APIcurl --unix-socket /run/mxcp/mxcp.sock -X POST http://localhost/reloadCheck Server Status
Section titled “Check Server Status”# Via admin APIcurl --unix-socket /run/mxcp/mxcp.sock http://localhost/status | jq
# Response includes:# - version# - uptime# - profile# - endpoint counts# - reload statusDatabase Maintenance
Section titled “Database Maintenance”# Backup databasecp db.duckdb db.duckdb.backup
# Optimize databaseduckdb db.duckdb "PRAGMA optimize"
# Check database sizedu -h db.duckdbNext Steps
Section titled “Next Steps”- Configuration - Complete configuration guide
- Deployment - Production deployment patterns
- Monitoring - Observability setup