Skip to content

Commit 1ffcc08

Browse files
authored
AX-1579 - Make MCP secret-persistence guidance shell-aware (#15)
## What Replace the hardcoded `~/.zshrc` persistence instruction in the MCP management template with shell-aware guidance. ## Why The agent told users to persist MCP secret env vars by adding the `export` to `~/.zshrc`, which only works for zsh. Users on bash/fish/Linux/Windows added it to a file their shell never sources, so the variable was silently lost on next launch and the IDE "ignored" the config. ## Changes - `plugins/jfrog/templates/jfrog-mcp-management.md`: secret-persistence guidance now keys on the user's **shell, not the OS** — zsh → `~/.zshrc`, bash → `~/.bashrc` (and macOS `~/.bash_profile`), fish → `~/.config/fish/config.fish`, Windows → `setx` — and tells the agent to detect the shell first. - Bump plugin version `0.5.0` → `0.5.1` (`plugins/jfrog/.cursor-plugin/plugin.json` + `.cursor-plugin/marketplace.json`).
1 parent a437341 commit 1ffcc08

3 files changed

Lines changed: 17 additions & 7 deletions

File tree

.cursor-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"metadata": {
88
"description": "JFrog Platform plugins for Cursor",
9-
"version": "0.5.0",
9+
"version": "0.5.1",
1010
"pluginRoot": "plugins"
1111
},
1212
"plugins": [

plugins/jfrog/.cursor-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "jfrog",
33
"displayName": "JFrog Platform",
4-
"version": "0.5.0",
4+
"version": "0.5.1",
55
"description": "JFrog Platform integration with MCP, security skills, supply-chain best practices, and JFrog Agent Guard governance for adding, removing, and listing MCP servers.",
66
"author": {
77
"name": "JFrog",

plugins/jfrog/templates/jfrog-mcp-management.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,21 @@ Split Step 2 inputs by `isRequired`:
165165
For each input in Step 4:
166166

167167
- **Secrets** (`isSecret=true`): use `${env:VAR_NAME}` in the config;
168-
tell the user to export it via
169-
`read -rs VAR_NAME && export VAR_NAME && echo exported`
170-
(and add to `~/.zshrc` for persistence). They are picked up on next
171-
launch (4a). NEVER take secrets in chat, echo them back, or
172-
write raw values into config.
168+
tell the user to export it for the current session via
169+
`read -rs VAR_NAME && export VAR_NAME && echo exported`.
170+
For persistence, the right startup file depends on the user's
171+
**shell**, not their OS — macOS and Linux both commonly run zsh or
172+
bash. Detect the shell (e.g. `echo "$SHELL"`) and add the export to
173+
the file that shell loads on startup:
174+
- **zsh** (the macOS default) → `~/.zshrc`
175+
- **bash**`~/.bashrc`; note macOS login shells read
176+
`~/.bash_profile`, which usually sources `~/.bashrc`
177+
- **fish**`~/.config/fish/config.fish` (use `set -gx`)
178+
- **Windows** → use `setx VAR_NAME "<value>"` (PowerShell/CMD)
179+
instead of the `read`/`export` snippet
180+
If unsure which file the shell sources, ask the user. Values are
181+
picked up on next launch (4a). NEVER take secrets in chat, echo them
182+
back, or write raw values into config.
173183
- **Non-secrets**: literal in `env` or `${env:VAR_NAME}` — ask if
174184
unclear.
175185

0 commit comments

Comments
 (0)