> 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/augment-code-guide.md).

# Connect Augment Code to Snyk

How to set up Snyk Studio and the Snyk MCP server in Augment Code

Connect Augment Code 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](/agent-security/agentic-security-with-snyk-studio/getting-started-with-snyk-studio.md). For enterprise deployment, use the [Agentic Development Security (ADS) installer](/agent-security/evo-by-snyk/agentic-development-security-ads/activation-and-deployment.md).
{% endhint %}

## Prerequisites

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

Visit the [Augment Code](https://www.augmentcode.com/) website to download the correct version of the IDE plugin.

## Install the Snyk MCP server in Augment Code

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" %}

* Name: Snyk
* Command: npx -y snyk\@latest mcp -t stdio
  {% endtab %}

{% tab title="Pre-installed Snyk CLI" %}

* Name: Snyk
* Command: /absolute/path/to/snyk mcp -t stdio

If the `snyk` command is not available, add it by following the instructions on the [Install the Snyk CLI](https://docs.snyk.io/developer-tools/snyk-cli/install-the-snyk-cli) page.
{% endtab %}
{% endtabs %}

## Set up the Snyk MCP server

The MCP server starts automatically. The following example shows a Snyk MCP server that was successfully configured and started.

<figure><img src="https://2912686697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN5N885PkllOWeBmgm3Bp%2Fuploads%2FSg7L3mRGHCm5E2DFs45f%2Fimage.png?alt=media&amp;token=3f2b82f8-3848-4232-887b-d88d54744a91" alt="Snyk MCP server configured and started in Augment Code"><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 work with the Snyk MCP server.

## 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](/agent-security/agentic-security-with-snyk-studio/directives.md#rules-for-manual-mcp-integrations).

Add the generic rule text to your Augment Code user guidelines.

<figure><img src="https://2912686697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN5N885PkllOWeBmgm3Bp%2Fuploads%2FklDujT1FwidNp3rNKplz%2Fimage.png?alt=media&amp;token=0af909a6-962d-47ec-b50e-78aa49489a5d" alt="Secure at inception rules added to the Augment Code configuration"><figcaption></figcaption></figure>

## Examples <a href="#examples" id="examples"></a>

In the chat, you can tag specific files or functions and ask Augment Code to scan your code for safe deployment to production.

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

Augment Code indicates 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%2FBWkCZtfy3lV26hpHdWgs%2Fimage.png?alt=media&amp;token=29e06176-88ab-4e32-b225-d15a6b308473" alt="Augment Code calling the Snyk MCP server for a vulnerability scan"><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/augment-code-guide.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.
