> 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/amazon-q-guide.md).

# Connect Amazon Q to Snyk

How to set up Snyk Studio and the Snyk MCP server in Amazon Q

{% hint style="warning" %}
AWS plans to end support for the Amazon Q Developer IDE plugin on April 30, 2027. AWS recommends migrating to Kiro. Visit the [Amazon Q IDE end-of-support notice](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/q-developer-ide-end-of-support.html).
{% endhint %}

Connect Amazon Q 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
* [Install the Snyk CLI](https://docs.snyk.io/developer-tools/snyk-cli/install-the-snyk-cli)

Add the Amazon Q extension to your IDE. Visit the official [Installing the Amazon Q Developer extension or plugin in your IDE](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/q-in-IDE-setup.html).

## Install the Snyk MCP server in the Amazon Q IDE extension

You can configure the Snyk MCP server in VS Code and JetBrains for Amazon Q.

Using the AmazonQ extension UI in your chosen IDE:

1. Add a new MCP Server
2. Provide the following values in the specified fields:
   1. Command: `npx`
   2. Arguments: `-y snyk@latest mcp -t stdio -o=ostemp`
   3. Set a timeout supported by your IDE.

The `-o` option instructs the MCP server to write the scan results to a file. To direct the results to a specific folder, provide an absolute path instead of using `ostemp`. For example, `-o=/absolute/path/to/folder`

{% hint style="info" %}
For additional MCP configuration options on Amazon Q and troubleshooting, visit the official [Amazon Q MCP server documentation](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/qdev-mcp.html).
{% endhint %}

## 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.

<figure><img src="https://2912686697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN5N885PkllOWeBmgm3Bp%2Fuploads%2FdM4jtDxbpXM2Klk0zz72%2Fimage%20(341).png?alt=media&amp;token=23a03fb0-437e-408a-8e31-e7b83b3f89ad" alt="Amazon Q prompting to authenticate and trust the Project directory"><figcaption></figcaption></figure>

If you need to authenticate and trust the current directory, then proceed and complete the process.

<figure><img src="https://2912686697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN5N885PkllOWeBmgm3Bp%2Fuploads%2F7NIqaEC87ivd3htp0AJi%2Fimage%20(342).png?alt=media&amp;token=9752876d-1c6b-409a-a6a2-cd3490b13b90" alt="Completing the authenticate and trust prompt"><figcaption></figcaption></figure>

## 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).

Append the generic rule text to the rules file at `.amazonq/rules/amazonq-rules.md`. For details about project rules, visit the [Amazon Q Developer documentation](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/context-project-rules.html).

<figure><img src="https://2912686697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN5N885PkllOWeBmgm3Bp%2Fuploads%2FTSzj8Js8rHiY22kB0zza%2Fimage.png?alt=media&amp;token=86ef55ea-a8d4-4c35-88bb-e6aeef3589a1" alt="Secure at inception rules added to the Amazon Q project rules"><figcaption></figcaption></figure>

## Examples

In the chat, you can tag specific files or functions and ask Amazon Q to scan your code before deployment:

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

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

{% endcode %}

Amazon Q 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%2FcjIrs9K8xxkMmCcRU6Un%2Fimage.png?alt=media&amp;token=260c4252-1cfa-4664-8977-afbcb6545b9a" alt="Amazon Q calling the Snyk MCP server for a vulnerability scan"><figcaption></figcaption></figure>

Amazon Q combines the code and dependency scan results with Snyk recommendations to suggest fixes for some or all of the findings.

<figure><img src="https://2912686697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN5N885PkllOWeBmgm3Bp%2Fuploads%2FtXrPFcdGaNA7K0lGXHql%2Fimage.png?alt=media&amp;token=bccfbe05-2a94-4da1-a6ff-6cb32b37d79d" alt="Amazon Q reporting combined code and dependency scan results"><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/amazon-q-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.
