Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Connect Cline to Snyk

How to set up Snyk Studio and the Snyk MCP server in Cline

Connect Cline to the local Snyk MCP server to scan code and dependencies from your coding assistant.

This setup provides MCP access. It does not install Studio Secure at inception hooks. Rules instruct the agent when to scan and depend on the model following those instructions.

For clients supported by the Studio CLI installer, use Getting started with Snyk Studio. For enterprise deployment, use the Agentic Development Security (ADS) installer.

Prerequisites

Consult the official Cline documentation for Cline installation instructions.

Install the Snyk MCP server in Cline using npx

This installation instruction assumes you have a Node.js local development environment setup with the npx executable.

Open the Cline MCP configuration from MCP Servers in the top toolbar. Select Configure, then Configure MCP Servers. Visit the Cline MCP documentation.

Manage MCP Servers icon in the Cline bottom panel

Click the Configure MCP Servers button from the MCP Servers tab:

Configure MCP Servers button on the MCP Servers tab

To install the Snyk MCP server, add the following mcpServers configuration block to the Cline MCP Servers configuration file:

Install the Snyk MCP server in Cline using Snyk CLI

Ensure that the Snyk CLI is installed and that the snyk executable is available in your system path.

To install the Snyk MCP server with the Snyk CLI, follow these instructions:

  • Add the following mcpServers configuration block to the Cline MCP Servers configuration file:

If you installed snyk using npm as a global module and you are using fnm to manage your versions, then you must specify the absolute path to the snyk executable. For example: /Users/username/.local/state/fnm_multishells/8831_1753881185071/bin/snyk.

After saving the MCP Servers configuration, confirm the Snyk MCP server is successfully installed and listed in the Cline UI.

Snyk MCP server listed as installed in Cline

Set up the Snyk MCP server

Authenticate with Snyk and complete the client's trust request for the repository directory when prompted.

The assistant invokes the authentication and trust workflows. Complete any browser confirmation request.

Cline running a Snyk workflow through the MCP server

You can explicitly prompt to authenticate your account as follows:

Asking Cline to authenticate the Snyk account

After enabling Act mode and approving the request, the agent opens a browser for you to authenticate to the Snyk Web UI, then continues the session.

Browser opened by the agent to authenticate to the Snyk Web UI

Secure at inception rules

Add rules to guide the assistant when invoking Snyk scans. Rules do not guarantee that the model runs a scan. For the generic rule text, visit Rules for manual MCP integrations.

The following is a suggested instruction for Cline rules. Open the Rules and Workflows menu using the bottom chat navigation from Cline.

Snyk rules added to the Cline rules configuration

Add the generic rule text as a global rule.

Examples

In the chat, you can tag specific files or functions and ask the agent to scan your code and third-party dependencies of the Project.

Cline invokes Snyk scanning tools and summarizes the results:

Cline reporting the results of a Snyk scan

If the connection fails, visit Troubleshooting.

Last updated

Was this helpful?