n8n-mcp Docker & Self-Hosted Deployment

GitHub

A MCP for Claude Desktop / Claude Code / Windsurf / Cursor to build n8n workflows for you

22,665 stars TypeScript TypeScript 1 file ยท ~3,965 tokens #mcp#mcp-server#n8n#workflows
RAW Compose
1. Pull Image (DOCKERHUB) docker pull library/n8n-mcp
2. Docker Run (1-Click Launch) docker run -d --name n8n-mcp --restart always n8n-mcp:latest
3. Podman Run podman run -d --name n8n-mcp --restart always n8n-mcp:latest
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/library/n8n-mcp:latest
5. ORAS Pull (OCI Artifact) oras pull n8n-mcp:latest
6. Compose Deployment docker compose up -d
docker-compose.buildkit.yml
Download .yml
# Docker Compose file with BuildKit optimizations for faster builds
# This now builds without n8n dependencies for ultra-fast builds
version: '3.8'

services:
  n8n-mcp:
    build:
      context: .
      dockerfile: Dockerfile
      # Enable BuildKit
      x-bake:
        cache-from:
          - type=gha
          - type=local,src=/tmp/.buildx-cache
        cache-to:
          - type=gha,mode=max
          - type=local,dest=/tmp/.buildx-cache-new,mode=max
      args:
        BUILDKIT_INLINE_CACHE: 1
    image: n8n-mcp:latest
    container_name: n8n-mcp
    ports:
      - "${PORT:-3000}:${PORT:-3000}"
    environment:
      - MCP_MODE=${MCP_MODE:-http}
      - AUTH_TOKEN=${AUTH_TOKEN}
      - NODE_ENV=${NODE_ENV:-production}
      - LOG_LEVEL=${LOG_LEVEL:-info}
      - PORT=${PORT:-3000}
    volumes:
      # Mount data directory for persistence
      - ./data:/app/data
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "sh", "-c", "curl -f http://localhost:$${PORT:-3000}/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 5s

# Use external network if needed
networks:
  default:
    name: n8n-mcp-network