Snyk CLI

The Snyk CLI for finding vulnerabilities in code, dependencies, containers and IaC, with a built-in MCP server and agent mode

CLIMedium risk

snyk/cli

Install

{
  "mcpServers": {
    "Snyk": {
      "command": "npx",
      "args": ["-y", "snyk@latest", "mcp", "-t", "stdio"],
      "env": {}
    }
  }
}

Requires Node.js. Set the profile via SNYK_MCP_PROFILE in env.

This is third-party code. Review the repository files before installing.

What it does

Snyk CLI checks open-source dependencies with snyk test, source code with snyk code test, Docker images with snyk container test and Terraform or Kubernetes files with snyk iac test. For each issue it shows severity, how the vulnerable module got in and fix guidance. snyk monitor saves a dependency snapshot and alerts you about new vulnerabilities. For AI agents there is an experimental snyk agent test with compact output, and snyk mcp -t stdio starts an MCP server with scanning tools and lite, full and experimental profiles.

Who it is for. For developers and security engineers who want the agent to scan code and dependencies with Snyk.

Good fit when

  • You want to scan dependencies and code for vulnerabilities from the agent
  • You need to scan Docker images or IaC files
  • Your team already uses Snyk

Not a fit when

  • You need fully local analysis without a cloud service
  • You have no Snyk account and cannot create one

Example request

Scan my directory for security issues

Limitations

A Snyk account and sign-in are required; the MCP server provides the snyk_auth tool for that. Private repositories have test limits. Many projects must be built before dependency scanning, and the package manager must be on PATH. Scanning goes through the Snyk cloud, and access from Russia is unverified. The CLI does not accept external contributions.

How to disable. Delete the Snyk block from the client's MCP config. Remove a global CLI install with npm uninstall -g snyk.

Security check

  • Reads code and dependency manifests and sends data to the Snyk cloud
  • May run the project build during scanning

README in short

The README explains which project types Snyk scans and points to install and auth docs. It gives commands for dependencies, code, containers and IaC, monitoring mode and useful flags such as --json and --severity-threshold. It mentions agent mode and test limits. MCP server setup is documented in the Snyk Studio docs.

FAQ

How do I reduce the number of tools?

Pick the lite profile with the --profile flag or the SNYK_MCP_PROFILE variable.

What does snyk agent test do?

It runs open-source, code and secrets scans in one pass with compact output for agents. The command is experimental.

Editors’ pick

NVIDIA's open stack for running OpenClaw, Hermes and LangChain Deep Agents in OpenShell sandboxes with network policy and managed inference

CLIHigh risk22.5K
Editors’ pick

Static code analysis with rules that look like source code, plus a built-in MCP server for AI agents

CLIMedium risk16.6K

Trail of Bits skills

Trail of Bits Skills Marketplace

Editors’ pick

Trail of Bits plugin marketplace for security work: smart contracts, C/C++ and Rust review, Semgrep, CodeQL and fuzzing

PluginMedium risk7.1K

A cybersecurity skill library: forensics, incident response, pentesting, cloud and malware analysis mapped to MITRE ATT&CK and NIST

SkillHigh risk32.8K