Skip to main content
Glama

NetBox Read/Write MCP Server

docker-compose.async.yml3.19 kB
# Docker Compose for NetBox MCP with Async Task Queue # Includes Redis and RQ worker for enterprise-scale bulk operations version: '3.8' services: # Redis for task queue storage redis: image: redis:7-alpine container_name: netbox-mcp-redis restart: unless-stopped volumes: - redis_data:/data ports: - "6379:6379" command: redis-server --appendonly yes healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 30s timeout: 10s retries: 3 networks: - netbox-mcp # NetBox MCP Server (main application) netbox-mcp: build: . container_name: netbox-mcp-server restart: unless-stopped depends_on: redis: condition: service_healthy environment: - NETBOX_URL=${NETBOX_URL} - NETBOX_TOKEN=${NETBOX_TOKEN} - REDIS_URL=redis://redis:6379/0 - NETBOX_DRY_RUN=${NETBOX_DRY_RUN:-false} - NETBOX_LOG_LEVEL=${NETBOX_LOG_LEVEL:-INFO} ports: - "8080:8080" # Health check endpoint volumes: - ./config:/app/config:ro - logs:/app/logs networks: - netbox-mcp healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080/healthz"] interval: 30s timeout: 10s retries: 3 # RQ Worker for background task processing netbox-sync-worker: build: . container_name: netbox-mcp-worker restart: unless-stopped command: ["python", "-m", "netbox_mcp.worker"] depends_on: redis: condition: service_healthy netbox-mcp: condition: service_healthy environment: - NETBOX_URL=${NETBOX_URL} - NETBOX_TOKEN=${NETBOX_TOKEN} - REDIS_URL=redis://redis:6379/0 - NETBOX_DRY_RUN=${NETBOX_DRY_RUN:-false} - NETBOX_LOG_LEVEL=${NETBOX_LOG_LEVEL:-INFO} volumes: - ./config:/app/config:ro - logs:/app/logs networks: - netbox-mcp healthcheck: test: ["CMD", "python", "-c", "from netbox_mcp.worker import worker_health_check; exit(0 if worker_health_check() else 1)"] interval: 60s timeout: 30s retries: 3 # Optional: RQ Dashboard for monitoring (development) rq-dashboard: image: eoranged/rq-dashboard:latest container_name: netbox-mcp-dashboard restart: unless-stopped depends_on: redis: condition: service_healthy environment: - RQ_DASHBOARD_REDIS_URL=redis://redis:6379/0 ports: - "9181:9181" networks: - netbox-mcp profiles: - monitoring volumes: redis_data: driver: local logs: driver: local networks: netbox-mcp: driver: bridge # Health check endpoints: # - NetBox MCP: http://localhost:8080/healthz # - RQ Dashboard: http://localhost:9181 (if monitoring profile enabled) # # Usage: # 1. Copy .env.example to .env and configure NetBox credentials # 2. Start all services: docker-compose -f docker-compose.async.yml up -d # 3. Start with monitoring: docker-compose -f docker-compose.async.yml --profile monitoring up -d # 4. View logs: docker-compose -f docker-compose.async.yml logs -f # 5. Scale workers: docker-compose -f docker-compose.async.yml up -d --scale netbox-sync-worker=3

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Deployment-Team/netbox-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server