Docker Deployment
Deploy the NAICS MCP Server using Docker containers.
Quick Start
# Pull the latest image
docker pull ghcr.io/mfbaig35r/naics-mcp-server:latest
# Run the server
docker run -p 9090:9090 ghcr.io/mfbaig35r/naics-mcp-server:latestImage Tags
| Tag | Description |
|---|---|
latest | Latest stable release |
v1.0.0 | Specific version |
main | Latest from main branch (dev) |
Docker Compose
For production deployments, use Docker Compose:
# docker-compose.yml
version: '3.8'
services:
naics-mcp:
image: ghcr.io/mfbaig35r/naics-mcp-server:latest
container_name: naics-mcp-server
ports:
- "9090:9090"
volumes:
- naics-data:/app/data
environment:
- NAICS_LOG_LEVEL=INFO
- NAICS_HOST=0.0.0.0
- NAICS_PORT=9090
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9090/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
restart: unless-stopped
volumes:
naics-data:Start with:
docker-compose up -dPersistent Data
To persist the workbook and cache data:
docker run -p 9090:9090 \
-v naics-data:/app/data \
ghcr.io/mfbaig35r/naics-mcp-server:latestEnvironment Variables
| Variable | Default | Description |
|---|---|---|
NAICS_HOST | 0.0.0.0 | Bind address |
NAICS_PORT | 9090 | HTTP port |
NAICS_LOG_LEVEL | INFO | Log level |
NAICS_DATA_DIR | /app/data | Data directory |
MCP Client Configuration
Claude Desktop
{
"mcpServers": {
"naics": {
"command": "docker",
"args": ["run", "-i", "--rm", "ghcr.io/mfbaig35r/naics-mcp-server:latest"]
}
}
}With Persistent Volume
{
"mcpServers": {
"naics": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "naics-data:/app/data",
"ghcr.io/mfbaig35r/naics-mcp-server:latest"
]
}
}
}Building from Source
# Clone the repository
git clone https://github.com/mfbaig35r/naics-mcp-server.git
cd naics-mcp-server
# Build the image
docker build -t naics-mcp-server .
# Run locally
docker run -p 9090:9090 naics-mcp-serverMulti-Architecture Support
The official images support both amd64 and arm64 architectures:
# Works on Intel/AMD and Apple Silicon
docker pull ghcr.io/mfbaig35r/naics-mcp-server:latestHealth Checks
Verify the container is healthy:
# Liveness
curl http://localhost:9090/health
# Readiness
curl http://localhost:9090/ready
# Detailed status
curl http://localhost:9090/statusLogging
View container logs:
docker logs naics-mcp-server
# Follow logs
docker logs -f naics-mcp-serverResource Limits
For production, set resource limits:
services:
naics-mcp:
image: ghcr.io/mfbaig35r/naics-mcp-server:latest
deploy:
resources:
limits:
cpus: '2'
memory: 1G
reservations:
cpus: '0.5'
memory: 512MNetworking
Expose to Network
docker run -p 0.0.0.0:9090:9090 ghcr.io/mfbaig35r/naics-mcp-server:latestBehind Reverse Proxy
# nginx.conf
server {
listen 80;
server_name naics.example.com;
location / {
proxy_pass http://localhost:9090;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}Troubleshooting
Container Won’t Start
# Check logs
docker logs naics-mcp-server
# Run interactively
docker run -it ghcr.io/mfbaig35r/naics-mcp-server:latest /bin/shPort Conflicts
# Use a different port
docker run -p 8080:9090 ghcr.io/mfbaig35r/naics-mcp-server:latestPermission Issues
# Check volume permissions
docker run -v naics-data:/app/data \
--user $(id -u):$(id -g) \
ghcr.io/mfbaig35r/naics-mcp-server:latest