docker/README.md
The n8n-mcp Docker container can be run in HTTP mode using several methods:
docker run -d -p 3000:3000 \
--name n8n-mcp-server \
-e MCP_MODE=http \
-e AUTH_TOKEN=your-secure-token-here \
ghcr.io/czlonkowski/n8n-mcp:latest
# Create a .env file
cat > .env << EOF
MCP_MODE=http
AUTH_TOKEN=your-secure-token-here
PORT=3000
EOF
# Run with docker-compose
docker-compose up -d
Create a config.json file:
{
"MCP_MODE": "http",
"AUTH_TOKEN": "your-secure-token-here",
"PORT": "3000",
"LOG_LEVEL": "info"
}
Run with the config file:
docker run -d -p 3000:3000 \
--name n8n-mcp-server \
-v $(pwd)/config.json:/app/config.json:ro \
ghcr.io/czlonkowski/n8n-mcp:latest
docker run -d -p 3000:3000 \
--name n8n-mcp-server \
-e AUTH_TOKEN=your-secure-token-here \
ghcr.io/czlonkowski/n8n-mcp:latest \
n8n-mcp serve
AUTH_TOKEN is required for HTTP mode. Generate a secure token:
openssl rand -base64 32
Environment variables take precedence over config file values
Default mode is stdio if MCP_MODE is not specified
Health check endpoint is available at http://localhost:3000/health
docker logs n8n-mcp-servernode /app/dist/mcp/index.js as a workaround-v $(pwd)/config.json:/app/config.json:rodocker exec n8n-mcp-server ls -la /app/docker/