mcp-hide-secrets

mcp-hide-secrets is a skill for Claude Code, Codex from CiscoDevNet/essentials. It costs 103 tokens per session (1,272 once invoked), scanned B, original, Apache-2.0.

A macOS setup for moving Cursor MCP credentials out of configuration files into an environment file loaded at login. MCP is a way for Cursor to connect to external tools and services.

In plain words
What is it for?
It is for migrating MCP secrets, checking their setup, and fixing the macOS login service that loads them.
Why use it?
It reduces the chance of exposing live credentials in project or user configuration files while keeping those connections available to Cursor.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for migrating MCP secrets, checking their setup, and fixing the macOS login service that loads them.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ciscodevnet/essentials/mcp-hide-secrets
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ciscodevnet/essentials/mcp-hide-secrets
Any agent
npx skills add CiscoDevNet/essentials --skill mcp-hide-secrets
Clone the repo
git clone --depth 1 https://github.com/CiscoDevNet/essentials

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp-hide-secrets

README.md
[![agentmods](https://agentmods.dev/badge/skills/ciscodevnet/essentials/mcp-hide-secrets.svg)](https://agentmods.dev/skills/ciscodevnet/essentials/mcp-hide-secrets)
Your own site
<a href="https://agentmods.dev/skills/ciscodevnet/essentials/mcp-hide-secrets"><img src="https://agentmods.dev/badge/skills/ciscodevnet/essentials/mcp-hide-secrets.svg" alt="Measured on agentmods" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,272 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00103 $0.01272
Opus 5 $0.00051 $0.00636
Sonnet 5 $0.00021 $0.00254
Haiku 4.5 $0.00010 $0.00127

Measured yesterday against content hash 85463bb7692b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade B, and why

mcp-hide-secrets scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 9 executable files (scripts/check-inline-secrets.py, scripts/fix-launchagents-dir.sh, scripts/install.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

scripts/run.sh fix-launchagents # sudo in Terminal when agent cannot prompt
skills/ess/mcp-hide-secrets/SKILL.md · 104 lines

How it starts

The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MCP Hide Secrets (macOS — LaunchAgent + .env)

Move live credentials out of ~/.cursor/mcp.json and/or a project .cursor/mcp.json into ~/.local/share/cursor-mcp/mcp.env, loaded at login by a macOS LaunchAgent via launchctl setenv. Cursor interpolates ${env:VAR} in MCP env and headers blocks.

Agent workflow (required)

Run only scripts/run.sh. Do not write ad-hoc preflight, migrate, or verify commands.

# From this skill root (set PROJECT_MCP_JSON when a repo .cursor/mcp.json should be included):
chmod +x scripts/run.sh
USERNAME="$(whoami)" PROJECT_MCP_JSON="<repo>/.cursor/mcp.json" scripts/run.sh
USERNAME="$(whoami)" scripts/run.sh migrate
USERNAME="$(whoami)" scripts/run.sh status
scripts/run.sh fix-launchagents   # sudo in Terminal when agent cannot prompt

Never read or display secret values from mcp.json or mcp.env. Report script output only.

User says Script
/mcp-hide-secrets scripts/run.sh (default)
/mcp-hide-secrets migrate scripts/run.sh migrate [optional mcp.json path]
/mcp-hide-secrets status scripts/run.sh status
/mcp-hide-secrets install scripts/run.sh install (after fix-launchagents)

If sudo fails in a non-interactive shell, ask the user to run scripts/fix-launchagents-dir.sh in Terminal, then USERNAME="$(whoami)" scripts/run.sh install.

After success: user quits Cursor (Cmd+Q) and reopens from Dock.

MCP config targets

Location Path
Global ~/.cursor/mcp.json
Project <repo>/.cursor/mcp.json

Both merge into ~/.local/share/cursor-mcp/mcp.env. Default run.sh migrates global first, then project when PROJECT_MCP_JSON is set. Migrate dirty files separately with scripts/run.sh migrate <path>.

Gotchas (keep in SKILL.md)

  • Dock-launched Cursor does not see ~/.zshrc exports — session env via LaunchAgent is required.
  • ~/Library/LaunchAgents is sometimes owned by root; fix-launchagents-dir.sh is a normal step, not a one-off fix.
  • Migrate runs before LaunchAgent install so secrets move even when sudo is pending.
  • A server named github (any case) drops headers on migrate so OAuth can run.

Read the full file on GitHub · 104 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 104 lines · 103 tokens per session scan B 85463bb7692b

Subscribe to this mod's changes

mcp-hide-secrets is a skill published in the GitHub repository CiscoDevNet/essentials (7 stars, last pushed 17d ago), licensed Apache-2.0. It adds 103 tokens to every session and 1,272 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.