Connect Goose CLI to Snyk
How to set up Snyk Studio and the Snyk MCP server in Goose CLI
Connect Goose CLI to the local Snyk MCP server to scan code and dependencies from your coding assistant.
Prerequisites
Install the Goose CLI. For more details, visit the official Goose CLI installation instructions.
Install the Snyk MCP server in Goose CLI using npx command
This installation instruction assumes you have a Node.js local development environment setup with the npx executable.
To install the Snyk MCP server using the Goose CLI interactive session, proceed with the following instructions:
Start an interactive Goose configuration wizard by running the
goose configurecommand:
From the configuration menu, chose Add Extension.
Choose Command-line extension (run a local command or script).
Name this extension Snyk Security.
Run the command by typing in:
npx -y snyk@latest mcp -t stdioContinue with the defaults (timeout of 300 seconds), and optionally provide the Snyk API token if your Organization policy requires one.
Use the following Goose configuration example:

Start or resume your Goose session with the Snyk MCP server enabled.
Install the Snyk MCP server in Goose CLI using Snyk CLI
This installation instruction assumes you have installed the Snyk CLI and the snyk executable is available in your system path.
Install the Snyk MCP server using the Goose CLI interactive session by following these instructions:
Start an interactive Goose configuration wizard by running the
goose configurecommand.Choose Add Extension from the configuration menu.
Select Command-line extension (run a local command or script).
Name this extension Snyk Security.
Run the command by typing in:
/path/to/snyk mcp -t stdio- replacing/path/to/snykwith the fully qualified absolute path to your Snyk CLI.Continue with the defaults (timeout of 300 seconds), and optionally provide the Snyk API token if your Organization policy requires one.
Start or resume your Goose session with the Snyk MCP server enabled.
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.
You can explicitly prompt to authenticate your account as follows:

If you are not authenticated, this prompt opens a browser for you to authenticate to the Snyk Web UI, and then you can continue with the agent.

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.
Use the generic rule text with Goose CLI recipes or with the Goose hints file. Add it to the .goosehints file in the root directory of the project.
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.
Goose CLI invokes Snyk scanning, providing output, and insights based on the results that Snyk returned:

If the connection fails, visit Troubleshooting.
Last updated
Was this helpful?

