AI requests it
The client sends a label, purpose, and suggested variable name—never the value.
Local MCP secret broker
SecretBridge opens a native popup when an AI needs an API key or credential. You paste it there, reuse it later, and authorize direct .env writes in your workspace—without putting the value in chat.
Connect your project to the API.
~/Projects/my-app
Save & Use allows .env writes in this workspace without another prompt.
Saved in macOS Keychain. Never sent to chat.
One clean handoff
The model handles the label and destination. SecretBridge handles the value locally.
The client sends a label, purpose, and suggested variable name—never the value.
A labeled native popup collects the secret in a masked field.
macOS Keychain or Windows Credential Manager keeps it available for reuse.
Your submission authorizes writes in the displayed workspace, with no second popup.
Built for the actual problem
SecretBridge does not pretend a local .env file is Fort Knox. It prevents the easy, permanent mistake: placing a reusable credential in an AI conversation or tool transcript.
Source-first installation
Rust builds the executable locally, avoiding warnings for unsigned downloaded applications.
Apple Silicon or Intel
git clone https://github.com/Abomination81/secret-bridge-mcp.git
cd secret-bridge-mcp
./scripts/install.sh
Installs to ~/.local/bin/secret-bridge-mcp.
PowerShell on Windows 11
git clone https://github.com/Abomination81/secret-bridge-mcp.git
cd secret-bridge-mcp
.\scripts\install.ps1
Installs under %LOCALAPPDATA%\SecretBridge.
Requires the free Rust toolchain. Tagged GitHub releases also include unsigned convenience archives and SHA-256 checksums.
Works where local MCP works
codex mcp add secret-bridge -- \
/absolute/path/secret-bridge-mcp \
--workspace-per-request \
--client-name Codexclaude mcp add --scope user \
--transport stdio secret-bridge -- \
/absolute/path/secret-bridge-mcp \
--workspace-per-request \
--client-name "Claude Code"Make it automatic for Codex and Claude Code: after connecting, run sh ./scripts/enable-defaults.sh both on macOS or .\scripts\enable-defaults.ps1 both in Windows PowerShell from your checkout, then start a new session. This adds a persistent preference to use SecretBridge whenever a credential is needed. Existing tool permissions and popup approvals still apply.
Also works with Gemini CLI and other local MCP clients that can launch a standard-input/output server. Full configuration examples are in the README.
The honest boundary
SecretBridge keeps values out of AI messages, MCP payloads, logs, and command history during collection and reuse. Once a credential is written into an authorized workspace’s .env file, that file is normal local plaintext and can be read by software with filesystem access.
SecretBridge MCP
Free, local, open source, and built by Abomination81.