
Unofficial Multi-Architecture Docker Image for Snyk CLI MCP Server
This is an unofficial, community-maintained Docker image that packages the Snyk CLI MCP Server for containerized deployment. It enables AI agents (Claude Code, VS Code Copilot, Cursor, Windsurf, etc.) to perform security scanning via the Model Context Protocol (MCP).
Upstream: github.com/snyk/cli (Apache License 2.0)
snyk_aibom for AI Bill of Materials generation| Tool | Description |
|---|---|
snyk_sca_scan | Open source dependency vulnerability scanning (pip, pipenv, poetry, npm, etc.) |
snyk_code_scan | Static Application Security Testing (SAST) for source code |
snyk_container_scan | Container image vulnerability scanning |
snyk_iac_scan | Infrastructure as Code security scanning (Terraform, K8s, Docker Compose) |
snyk_sbom_scan | Software Bill of Materials analysis |
snyk_aibom | AI Bill of Materials for Python AI projects (models, datasets, tools) |
snyk_auth | Authenticate with Snyk |
snyk_logout | Log out of Snyk |
snyk_auth_status | Check authentication status |
snyk_trust | Trust a folder for scanning |
snyk_version | Display version information |
Your support encourages me to keep creating/supporting my open-source projects. If you found value in this project, you can buy me a coffee to keep me inspired.
CRITICAL: Do NOT expose this container directly to the internet without proper security measures (reverse proxy, SSL/TLS, authentication, firewall rules).
services:
snyk-mcp:
image: mekayelanik/snyk-mcp:latest
container_name: snyk-mcp
restart: unless-stopped
ports:
- "8010:8010"
volumes:
- /path/to/your/projects:/data:ro
environment:
- SNYK_TOKEN=${SNYK_TOKEN}
- PORT=8010
- INTERNAL_PORT=38011
- PUID=1000
- PGID=1000
- TZ=UTC
- NODE_ENV=production
- PROTOCOL=SHTTP
- ENABLE_HTTPS=false
- HTTP_VERSION_MODE=auto
- DATA_DIR=/data
- SNYK_MCP_PROFILE=full
# Optional: Snyk organization ID
# - SNYK_CFG_ORG=your-org-id
# Optional: require Bearer token auth at HAProxy layer
# - API_KEY=replace-with-strong-secret
# Optional: CORS origins
# - CORS=*
docker run -d \
--name=snyk-mcp \
--restart=unless-stopped \
-p 8010:8010 \
-v /path/to/your/projects:/data:ro \
-e SNYK_TOKEN=your-snyk-api-token \
-e PORT=8010 \
-e PROTOCOL=SHTTP \
-e SNYK_MCP_PROFILE=full \
mekayelanik/snyk-mcp:latest
| Service | Endpoint | Description |
|---|---|---|
| MCP (SHTTP) | http://host-ip:8010/mcp | Streamable HTTP MCP endpoint (recommended) |
| MCP (SSE) | http://host-ip:8010/sse | Server-Sent Events MCP endpoint |
| MCP (WS) | ws://host-ip:8010/message | WebSocket MCP endpoint |
| Health | http://host-ip:8010/healthz | Health check endpoint |
When HTTPS is enabled (ENABLE_HTTPS=true), use TLS endpoints:
| Service | Endpoint |
|---|---|
| MCP (SHTTP) | https://host-ip:8010/mcp |
| MCP (SSE) | https://host-ip:8010/sse |
| MCP (WS) | wss://host-ip:8010/message |
Security Warning: The container defaults to HTTP (
ENABLE_HTTPS=false) for easier local setup. UseENABLE_HTTPS=truewith your own certificates for production. See CERTIFICATE_SETUP_GUIDE.md for instructions.
| Variable | Default | Possible Values | Description |
|---|---|---|---|
PORT | 8010 | 1-65535 | External HAProxy listening port |
INTERNAL_PORT | 38011 | 1-65535 | Internal supergateway port (do not expose) |
PROTOCOL | SHTTP | SHTTP, SSE, WS | MCP transport protocol |
PUID | 1000 | Any valid UID | Process user ID |
PGID | 1000 | Any valid GID | Process group ID |
TZ | UTC | Any timezone | Container timezone |
NODE_ENV | (empty) | production, etc. | Node.js environment |
DATA_DIR | /data | Any path | Directory for mounted projects |
| Variable | Default | Possible Values | Description |
|---|---|---|---|
SNYK_TOKEN | (empty) | API token string | Snyk API token (required for scanning) |
SNYK_CFG_ORG | (empty) | Organization ID | Snyk organization ID |
SNYK_MCP_PROFILE | full | minimal, full, preview | Tool profile (see below) |
SNYK_DEBUG | false | true, false | Enable debug logging |
SNYK_DISABLE_ANALYTICS | (empty) | 1 | Disable Snyk analytics |
| Profile | Tools | Description |
|---|---|---|
minimal | Essential | Minimum scanning tools, low token usage |
full | 11 | All stable tools (recommended) |
preview | 11+ | Full profile plus experimental tools |
| Variable | Default | Possible Values | Description |
|---|---|---|---|
API_KEY | (empty) | 5-256 printable chars | Bearer token for HAProxy authentication |
CORS | (empty) | Origins (comma-separated) or * | Allowed CORS origins |
ENABLE_HTTPS | false | true, false | Enable TLS termination |
TLS_CERT_PATH | /etc/haproxy/certs/server.crt | File path | TLS certificate path |
TLS_KEY_PATH | /etc/haproxy/certs/server.key | File path | TLS private key path |
TLS_MIN_VERSION | TLSv1.3 | TLSv1.2, TLSv1.3 | Minimum TLS version |
HTTP_VERSION_MODE | auto | auto, h1, h2, h3, h1+h2, all | HTTP version negotiation |
RATE_LIMIT | 0 | 0-N | Max requests per RATE_LIMIT_PERIOD per IP (0 = disabled) |
RATE_LIMIT_PERIOD | 10s | 10s, 1m, 1h, etc. | Sliding window for rate limiting |
MAX_CONNECTIONS_PER_IP | 0 | 0-N | Max concurrent connections per IP (0 = disabled) |
IP_ALLOWLIST | (empty) | Comma-separated IPs/CIDRs | IPs/CIDRs to allow (all others blocked) |
IP_BLOCKLIST | (empty) | Comma-separated IPs/CIDRs | IPs/CIDRs to block |
Boolean values:
true,1,yes,onare all accepted as truthy. Everything else is falsy.
API_KEY to enforce auth at the reverse proxy level.Authorization: Bearer <API_KEY>./healthz and CORS preflight (OPTIONS) bypass authentication.RATE_LIMIT=100 to allow 100 requests per RATE_LIMIT_PERIOD (default 10s) per IP. Exceeding the limit returns HTTP 429 with a Retry-After header.MAX_CONNECTIONS_PER_IP=50 to cap concurrent connections per IP. Exceeding returns HTTP 429.IP_BLOCKLIST=192.0.2.0/24,198.51.100.5 to block specific IPs/CIDRs. Blocked IPs receive HTTP 403.IP_ALLOWLIST=10.0.0.0/8,192.168.1.0/24 to allow only listed IPs/CIDRs. All others receive HTTP 403. Localhost is always allowed.Mount your project directories to /data (or the path specified by DATA_DIR). Each subdirectory becomes a scannable project.
volumes:
# Mount entire projects directory
- /home/user/projects:/data:ro
# Or mount individual projects
- /home/user/my-python-app:/data/my-python-app:ro
- /home/user/my-node-app:/data/my-node-app:ro
Then tell your AI agent to scan using the mounted path:
/data/my-python-app for vulnerabilities"/data/my-node-app"/data/my-python-app"This image embeds mcp-proxy (sparfenyuk/mcp-proxy) as the stdio↔HTTP bridge. Key knobs:
MCP_PROXY_STATELESS=false (default): one stdio backend child is shared across all MCP sessions, JSON-RPC-id-multiplexed. Minimal memory, no per-request fork cost.MCP_PROXY_STATELESS=true: per-request transport instance. Use only when full session isolation is required — memory grows with concurrency.HAPROXY_FRONTEND_MAXCONN / HAPROXY_SERVER_MAXCONN: HAProxy-level caps. Bound bursts so the backend cannot be flooded. Defaults of 64/16 are sensible for a single replica.Root cause for the migration: supergateway 3.4.3 stateless mode (its default) spawned a child stdio process per POST and never reaped it (supercorp-ai/supergateway#108). mcp-proxy stateful default shares one stdio backend across sessions and reduced RSS by ~4.6× in our fleet testing.
Add to ~/.claude.json under mcpServers:
{
"mcpServers": {
"snyk": {
"type": "sse",
"url": "http://host-ip:8010/sse"
}
}
}
Or for Streamable HTTP:
{
"mcpServers": {
"snyk": {
"type": "http",
"url": "http://host-ip:8010/mcp"
}
}
}
All use the same JSON format. Configure in the respective config file:
.vscode/settings.json (key: mcp.servers)~/.codex/config.json (key: mcpServers)~/.cursor/mcp.json (key: mcpServers).codeium/mcp_settings.json (key: mcpServers){
"mcpServers": {
"snyk": {
"transport": "http",
"url": "http://host-ip:8010/mcp"
}
}
}
| Tag | Platform | Description |
|---|---|---|
latest | amd64, arm64 | Latest stable release |
1.1307.0-preview.91928dab0e1a2966de1d90a2f917496fa3032222 | amd64, arm64 | Specific version |
This Docker image packaging is licensed under the GNU General Public License v3.0.
This is an unofficial community packaging. It is NOT affiliated with, endorsed by, or supported by Snyk Ltd. See NOTICE for full attribution.
Your support encourages me to keep creating/supporting my open-source projects. If you found value in this project, you can buy me a coffee to keep me inspired.
Mohammad Mekayel Anik
Content type
Image
Digest
sha256:b5c0e435c…
Size
178.9 MB
Last updated
1 day ago
docker pull mekayelanik/snyk-mcp