> For the complete documentation index, see [llms.txt](https://docs.snyk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snyk.io/agent-security/agentic-security-with-snyk-studio/quickstart-guides/jetbrains-junie.md).

# Connect JetBrains Junie to Snyk

How to set up Snyk Studio and the Snyk MCP server in JetBrains Junie

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

{% hint style="info" %}
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](https://docs.snyk.io/agent-security/agentic-security-with-snyk-studio/getting-started-with-snyk-studio.md). For enterprise deployment, use the [Agentic Development Security (ADS) installer](https://docs.snyk.io/agent-security/evo-by-snyk/agentic-development-security-ads/activation-and-deployment.md).
{% endhint %}

## Prerequisites

* Install the code assistant extension
* [Install the Snyk CLI](https://docs.snyk.io/developer-tools/snyk-cli/install-the-snyk-cli)

Add the JetBrains Junie plugin to your JetBrains IDE (IntelliJ IDEA, WebStorm, PyCharm, and so on). Visit the official [JetBrains Junie getting started page](https://www.jetbrains.com/help/junie/get-started-with-junie.html).

## Install the Snyk MCP server in JetBrains Junie

Install the Snyk MCP server using the method that best suits your operating system and local development environment.

{% tabs %}
{% tab title="Node.js and npx" %}
If you have the Node.js npx executable installed, open **Settings/Preferences** > **Tools** > **Junie** > **MCP Settings**. Edit the MCP configuration and add the following instructions:

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

<figure><img src="https://2912686697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN5N885PkllOWeBmgm3Bp%2Fuploads%2FuMy90TMEu7EHMHIgnrQX%2Fimage3.png?alt=media&amp;token=2cb5525f-74a3-412b-a886-d9a20143845d" alt="Snyk MCP server command added to the Junie configuration"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Pre-installed Snyk CLI" %}
If you have the Snyk CLI installed, open **Settings/Preferences** > **Tools** > **Junie** > **MCP Settings**. Edit the MCP configuration and add the following instructions:

```json5
{
  "mcpServers": {
    "snyk": {
      "command": "/absolute/path/to/snyk",
      "args": [
        "mcp",
        "-t",
        "stdio"
      ]
    }
  }
}
```

If the `snyk` command is not available, add it by following the instructions on the Install the Snyk CLI page.

Reload the IDE window for the changes to apply.
{% endtab %}
{% endtabs %}

## Set up the Snyk MCP server

Verify that the Snyk MCP server is available by checking the **Status** column in the MCP configuration and requesting it to list the tools it has available.

<figure><img src="https://2912686697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN5N885PkllOWeBmgm3Bp%2Fuploads%2FsY0Hb7mEc6D1YCvT8ArR%2Fimage1.png?alt=media&amp;token=4df7aa71-2618-4712-b2de-f679d2d5aa2a" alt="Status column confirming the Snyk MCP server is available"><figcaption></figcaption></figure>

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

If you are already authenticated with the Snyk CLI installed on your system path, or through a prior interaction, then proceed to working with the Snyk MCP server.

## Examples

In the chat, you can ask Junie to scan your code before deployment:

{% code title="prompt" overflow="wrap" %}

```
Scan this directory for code security & dependency vulnerabilities and security issues
```

{% endcode %}

Junie indicates in the plan that this request is related to security vulnerability scanning and calls the Snyk MCP server for various scans.

<figure><img src="https://2912686697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN5N885PkllOWeBmgm3Bp%2Fuploads%2Fa7wp2LZqQyrnyTGQTSfS%2Fimage2.png?alt=media&amp;token=259137aa-ef05-4353-910c-0f4426355431" alt="Junie plan showing a call to the Snyk MCP server"><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.snyk.io/agent-security/agentic-security-with-snyk-studio/quickstart-guides/jetbrains-junie.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
