Skip to main content

Getting Started with Snyk for Claude Code

Get started with Snyk’s security scanning, directly in Claude Code, in 3 simple steps.

1. One-line installation

Copy and run this command in your terminal to install Snyk Studio

npx -y snyk@latest mcp configure --tool=claude-cli

Note: If you’re running an environment that does not support npx, you may need to install Snyk’s CLI. Click here to learn more. 
More details can be found in Snyk’s official Claude Code documentation.

2. Authenticate

  1. Snyk will ask to invoke an authentication flow upon install.

  2. Choose your desired log-in method and grant the necessary permissions.

  3. Close any browser windows and return to Claude Code.

3. Try it out!

Snyk Studio’s default is to run every time code is generated. Start chatting with Claude Code in your current project, or start a new one with the following prompt:

In a new file, write a Python function named `is_palindrome` that takes a single string argument and returns `True` if the string is a palindrome and `False` otherwise. Per the Snyk Secure At Inception rules, this will demonstrate that all generated code is tested for security issues using the Snyk scanning tools and any issues identifies can be fixed automaticallyPer the secure at inception rules, this will demonstrate that all generated code is tested for security issues using the Snyk MCP server and any issues identified can be fixed automatically.