You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+80-12Lines changed: 80 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,58 +7,126 @@ This repo is the public repo for installing the "Snyk Secure at Inception" Power
7
7
## How to Use
8
8
9
9
### Prerequisites
10
-
11
10
-**Kiro IDE** (Free tier available at [kiro.ai](https://kiro.ai)). Snyk currently doesn't have any of the paid tiers for Kiro, so use the free tier for now. It comes with 50 tokens.
12
11
-**Node.js** installed on your machine with npm/npx
13
12
14
13
### Installation
15
14
16
-
1.**Install the Power in Kiro:**
15
+
1.**Set up Node.js System Links (Required for MCP Server):**
16
+
17
+
The Snyk Power uses an MCP (Model Context Protocol) server that requires `node` and `npx` to be available in the system PATH. If you're using a Node.js version manager like nvm, fnm, or volta, you'll need to create system-wide symlinks.
18
+
19
+
**For nvm users:**
20
+
```bash
21
+
# Find your current Node.js path
22
+
which node
23
+
which npx
24
+
25
+
# Create symlinks (replace the path with your actual Node.js path)
26
+
sudo ln -sf $(which node) /usr/local/bin/node
27
+
sudo ln -sf $(which npx) /usr/local/bin/npx
28
+
```
29
+
30
+
**For Homebrew users:**
31
+
```bash
32
+
# If you don't have Node.js via Homebrew, install it:
33
+
brew install node
34
+
# Homebrew automatically creates the necessary symlinks
35
+
```
36
+
37
+
**Verify the setup:**
38
+
```bash
39
+
/usr/local/bin/node --version
40
+
/usr/local/bin/npx --version
41
+
```
42
+
43
+
2.**Install the Power in Kiro:**
17
44
- Open Kiro IDE
18
45
- Access the Powers panel (Ctrl/Cmd + Shift + P → "Configure Powers", or clicking on the ghost with a lightning bolt next to it in the left menu)
19
46
- Click on "Add Custom Power"
20
47
- Select the "Import power from Github" option
21
48
- Use the link to the snyk-power folder inside this repo as the power: https://github.com/snyk/kiro-power-snyk/tree/598bab69c81607c17445fbeefa9c75c405e91ec3/snyk-power
49
+
22
50
**IMPORTANT:** make sure to specifically use that link above which includes the snyk-power folder; if you try to use the overall repo link the installation will fail due to having extra folders/files in the repo.
23
51
- The power will be installed and ready to use
24
52
25
-
2.**Authenticate with Snyk:**
53
+
3.**Authenticate with Snyk:**
26
54
In your terminal in Kiro run
27
55
```
28
56
npx snyk auth
29
57
```
30
58
This opens your browser for one-time Snyk authentication.
31
59
32
60
## Using once Installed
61
+
33
62
Once the Snyk Power is installed in the Kiro IDE, you'll be able to use all of the Snyk MCP commands inside Kiro. In your chat with the Kiro agent, you can reference any of the snyk-fix commands, as defined in the snyk-fix.md file in this repo (kiro-power-snyk/snyk-power/steering/snyk-fix.md).
34
63
35
64
## Configuration
36
65
37
-
The power automatically configures the Snyk MCP server. If you encounter connection issues, ensure:
66
+
The power automatically configures the Snyk MCP server to use the system-wide Node.js installation at `/usr/local/bin/npx`. This approach ensures compatibility across different Node.js installation methods.
67
+
68
+
### Troubleshooting
69
+
70
+
#### MCP Connection Issues
38
71
39
-
1.**npx is available** in your PATH
40
-
2.**Node.js environment** is properly set up
41
-
3.**Snyk authentication** is completed
72
+
If you see `spawn npx ENOENT` errors, it means the MCP server can't find `npx`. This usually happens when:
42
73
43
-
### Troubleshooting MCP Connection
74
+
1.**Node.js symlinks are missing** - Follow step 1 in the installation guide above
75
+
2.**Node.js is not installed** - Install Node.js via Homebrew (`brew install node`) or download from [nodejs.org](https://nodejs.org)
44
76
45
-
If you see `spawn npx ENOENT` errors:
77
+
#### Verifying Your Setup
46
78
79
+
Run these commands to verify everything is working:
80
+
81
+
```bash
82
+
# Check if symlinks exist and work
83
+
ls -la /usr/local/bin/node /usr/local/bin/npx
84
+
/usr/local/bin/node --version
85
+
/usr/local/bin/npx --version
86
+
87
+
# Test Snyk CLI
88
+
npx snyk --version
89
+
npx snyk auth --check
90
+
```
91
+
92
+
#### Alternative Configuration (Advanced Users)
93
+
94
+
If you prefer not to create system symlinks, you can manually configure the MCP server path in `~/.kiro/settings/mcp.json`:
95
+
96
+
**Steps:**
47
97
1. Find your npx path: `which npx`
48
-
2. Update your MCP configuration in `~/.kiro/settings/mcp.json`:
98
+
2. Open `~/.kiro/settings/mcp.json` in a text editor
99
+
3. Navigate to `powers` → `mcpServers` → `power-snyk-secure-at-inception-Snyk`
100
+
4. Update the `command` field with your full npx path
101
+
5. Update the `PATH` in the `env` field to include your Node.js bin directory
|`Unauthorized`| Run `npx snyk auth` to authenticate |
127
+
|`Command not found: npx`| Install Node.js or check your Node.js installation |
128
+
| MCP server won't connect | Restart Kiro IDE after creating symlinks |
129
+
130
+
#### Why Symlinks?
131
+
132
+
Node.js version managers (nvm, fnm, volta) install Node.js in user-specific directories that aren't in the system PATH by default. The MCP server process needs access to `npx` from a standard system location (`/usr/local/bin/`) to work reliably across different environments.
0 commit comments