irrenwill avatar

Secret Safe Env

irrenwill/secret-safe-env

A Windows-only server that writes secrets to .env files without exposing them to the agent or chat context. Instead of pasting API keys into the conversation, the agent calls set_env_secret with just the variable name, which opens a native masked WinForms dialog where you type the value. The secret travels straight from your keyboard to PowerShell to the file, bypassing command line args, PSReadLine history, script block logging, and the model context entirely. Includes env_key_exists to confirm writes without reading values back out. Built specifically to close the leak that happens when you hand credentials to an agent inline or verify them with cat .env. The UI is in Traditional Chinese, but the tools work with standard English key names.

tools
2
transport
STDIO
last updated
Jun 6, 2026

Tools

2 tools

Public tool metadata for what this MCP can expose to an agent.

set_env_secretOpens the masked dialog for `key`; the user types the value; the helper writes `key=value` to `.env`. Returns human/agent-readable text plus an error flag — never the value.

Opens the masked dialog for `key`; the user types the value; the helper writes `key=value` to `.env`. Returns human/agent-readable text plus an error flag — never the value.

No parameter schema in public metadata yet.

env_key_existsReturns only whether `key` is present in `.env` — never the value. Use it to confirm a write instead of reading/`cat`-ing `.env`.

Returns only whether `key` is present in `.env` — never the value. Use it to confirm a write instead of reading/`cat`-ing `.env`.

No parameter schema in public metadata yet.

Sponsors

Readme

secret-safe-env

npm version MCP Registry License: MIT Platform: Windows

A Model Context Protocol server that lets an AI agent put a secret (API key, token, password, connection string) into a project's .env file without the agent ever seeing the value.

The agent calls a tool with only the variable name. A native, masked Windows dialog opens locally; you type the value; a local PowerShell helper writes it straight to .env. The agent receives only a status token (OK / CANCEL / ERR:<CODE>) — never the secret.

繁體中文說明見 README.zh-TW.md.

Demo


View the full README on GitHub

Details

Repository
github.com/irrenwill/secret-safe-env
Category
AI & LLM Tools
Package
secret-safe-env
Transport
STDIO
Registry
MCP registry, active

Related AI & LLM Tools MCP servers

View all
1j0hanz avatarCode Assistantj0hanz/code-assistantGemini-powered MCP server for code analysis.0stars
2j0hanz avatarCode Lensj0hanz/code-lensGemini-powered MCP server for code analysis.0stars
3jdkabattles avatarForgingStack Quorumjdkabattles/forgingstack-quorumBefore an agent acts alone, get the quorum. One proposal, N approvals, one receipt.0stars
4jdkabattles avatarForgingStack Watchtowerjdkabattles/forgingstack-watchtowerAn agent that stops checking in is an agent you hear about.0stars
5jessepetersondev avatarConsentgate Mcpjessepetersondev/consentgate-mcpGate AI agent actions behind a consent policy with human approval via Telegram. Fail-closed.0stars
6jlmoreno00 avatarCodex Imagesjlmoreno00/codex-images-mcpGenerate and edit images with gpt-image-2, including masks and transparency.0stars