secret-drop
Sets or replaces keys in dotenv (.env) files, preserving other lines and writing values in a dotenv-compatible format.
Can set Firebase Functions secrets by running firebase functions:secrets:set NAME --data-file=- with the secret supplied on stdin, and can place Firebase service-account JSON files at a chosen path.
Can set GitHub Actions secrets by running gh secret set NAME with the secret supplied on stdin.
Can add Vercel environment variables by running vercel env add NAME production with the secret supplied on stdin.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@secret-drop Add my Stripe secret key to .env; I'll paste it in the browser."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Secret drop
Let your AI coding agent ask you for API keys, passwords and one-time PINs without them going through the chat.
The agent says where a secret goes: a key in your .env, a spot in a config file, or a command like gh secret set. A page opens in your browser. You paste the value there, it's written straight into place on your computer, and the agent is told "done". It never sees what you pasted.
Secret drop is a small local MCP server. It works with Claude Code, Codex, Claude Desktop, Cursor and any other MCP client that runs local (stdio) servers. It needs Node 18+ and has no dependencies.

Why
When an agent needs a key, the easy thing is to paste it into the chat. Then it's in the transcript, in the model provider's logs and in the agent's context for the rest of the session. Secret drop gives the agent a way to ask for a secret and get it into place without ever holding it.
Related MCP server: veilform
How it works
agent ──request_secret──▶ secret-drop (local MCP) ──opens──▶ page on 127.0.0.1 ◀── you paste
▲ │
└──── "delivered" (no value) ◀─┴── writes .env / file, or runs the command with it on stdinThe agent asks. It calls
request_secretwith a reason and a destination (see Destinations).You paste. A page opens in your default browser. It shows which agent is asking and from which project, why, and exactly where the value will go. It warns you before you paste: if the file isn't git-ignored or is already committed, if a placeholder is missing, if a file would be replaced, or if the agent will see a command's output. Paste, then press Put it there (or Decline). Several requests stack up as cards on the same page.
The agent carries on.
request_secretwaits up to 50 seconds for you. If you're slower, it returnswaiting, and the agent callswait_for_secretor carries on with other work and checks back. Once it'sdelivered, the agent gets where the secret went, never the value.

Install
Clone it anywhere:
git clone https://github.com/MarkGrenville/secret-drop.git ~/secret-dropThen add it to your agent.
Claude Code
claude mcp add --scope user secret-drop -- node ~/secret-drop/bin/secret-drop.jsCodex
codex mcp add secret-drop -- node ~/secret-drop/bin/secret-drop.jsClaude Desktop, Cursor, Windsurf and others (JSON config, e.g. claude_desktop_config.json or ~/.cursor/mcp.json):
{
"mcpServers": {
"secret-drop": {
"command": "node",
"args": ["/absolute/path/to/secret-drop/bin/secret-drop.js"]
}
}
}Apps you open from the Dock or Start menu may not find node on your PATH (common with nvm). If so, use the full path that which node prints as command.
Without cloning, npx can run it straight from GitHub (slower to start):
claude mcp add --scope user secret-drop -- npx -y github:MarkGrenville/secret-dropStart a new agent session after adding it.
Optional: the skill
skill/secret-drop/SKILL.md is an agent skill. With it, Claude Code and Codex reach for Secret drop as soon as you say "I'll paste the key" or "I've got the OTP". The MCP's own instructions already tell agents to use it, so the skill is a belt-and-braces extra. To install it:
mkdir -p ~/.claude/skills ~/.agents/skills
cp -R ~/secret-drop/skill/secret-drop ~/.claude/skills/ # Claude Code
cp -R ~/secret-drop/skill/secret-drop ~/.agents/skills/ # Codex (older versions read ~/.codex/skills)What to say
Talk normally and say where the secret goes:
"Add my Stripe secret key to the .env, I'll paste it in secret drop."
"Set the
DEPLOY_TOKENGitHub Actions secret, I'll give you the value.""I've got the one-time PIN for the Firebase login, put it where it needs to go."
"Put the service-account JSON in
keys/firebase.json."
The agent calls request_secret, the page opens, you paste. If an agent ever asks you to paste a secret into the chat, say "use secret drop".
Destinations
| What happens | Fields |
| Sets |
|
| Replaces every occurrence of a placeholder the agent already wrote into the file, e.g. |
|
| Writes the whole file: a PEM key, a service-account JSON. It won't replace an existing file unless the agent asked with |
|
| Runs a command in your shell, in |
|
Every request also takes a reason (required), a label (what to paste, e.g. "6-digit code from the SMS"), expires_in_minutes (default 30) and wait_seconds (0–55, default 50).
Commands that read a secret on stdin: gh secret set NAME, firebase functions:secrets:set NAME --data-file=-, npx wrangler secret put NAME, vercel env add NAME production. For a tool that takes it as a flag, use pass_as: "env", e.g. some-cli login --token "$SECRET_VALUE".
Tools
Tool | What it does |
| Ask for a secret and say where it goes. Opens the page and waits up to |
| Wait for an answer (up to 55 s per call). Returns |
| Say whether a |
| This session's waiting and recent requests (metadata only). |
| Withdraw a request; its card disappears from the page. |
Webhook: pass notify_url (any https:// URL, or http:// on localhost) and Secret drop POSTs { "event": "secret.delivered", "request": { … } } there when the request finishes. The same goes for secret.declined, secret.expired and the rest. The value is never included.
Security
What it guarantees:
The value only goes page → local server → file or command. It never appears in a tool result, the log, a webhook or an error message. When a command prints it, the output the agent sees has it blanked out as
[secret]. Redaction also catches its base64, base64url, hex, URL-encoded and JSON-escaped forms.Only you can reach the page. It listens on
127.0.0.1only, on a random port, behind a random 192-bit token in the URL. It refuses any otherHost(stops DNS rebinding), accepts only JSON POSTs from its own origin (stops other sites submitting to it), and is sent with a strict CSP andX-Frame-Options: DENY.Writes are careful. Paths must be absolute and inside your home folder. Files are written atomically (temp file, then rename). An existing file keeps its permissions and new ones are
0600. Symlinks are followed rather than replaced.You see everything before it happens, including the exact command and folder, and warnings when git would pick the file up.
Optional clipboard clearing. By default the page clears your clipboard after you paste, so the secret can't land in a chat by accident.
An audit log without values.
~/.secret-drop/log.jsonl(mode0600) records what went where and when, never the value. Turn it off withSECRET_DROP_LOG=off.
What it can't do:
Stop an agent reading the file afterwards. Once a secret is in
.env, an agent with file access could open it. The server's instructions tell agents not to read, print or commit it and to usecheck_secretinstead. For a hard guarantee, deny those reads in the agent's permissions, e.g. in Claude Code's~/.claude/settings.json:{ "permissions": { "deny": ["Read(**/.env)", "Read(**/.env.*)"] } }Catch every way a command could leak. Redaction covers the common encodings, but a command could transform the secret first, for example by reversing it. Only press Put it there on commands you recognise.
Outlive the agent session. Each agent session starts its own server and page. If the session ends, its waiting requests go with it, and the page says so.
Work with web chat apps. ChatGPT and claude.ai in the browser can't run local MCP servers. Use an agent that runs on your computer.
Configuration
Environment variable | Default | What it does |
|
| Set to |
| random | A fixed port for the page. |
|
| Where the audit log goes, or |
Build it yourself
PROMPT.md has the prompt this was built from, cleaned up. Paste it into Claude Code, Codex or another coding agent to build your own version, or to adapt it, e.g. as a native window instead of a browser page.
Development
npm test # node:test: the core, the page's security checks, and an end-to-end MCP runbin/secret-drop.js: entry point (stdio)src/server.js: MCP over JSON-RPC: tools, instructions, opening the pagesrc/core.js: requests, validation, the.env/ file / command writers, redaction, git checkssrc/page.js: the local page server (token, Host / Origin / content-type checks)public/: the page (plain HTML, CSS and JS)
License
MIT
Available Tools
5 toolscancel_secret_requestCancel a secret requestB
Withdraw a request that's still waiting (it disappears from the page), e.g. when you no longer need it.
Inputs: request_id (required), reason.
check_secretCheck a secret is setARead-only
Check, without reading it out, whether a secret is in place: whether a KEY is in a dotenv file and has a value, how many of a placeholder are left in a file, or whether a file exists. Also says whether git would pick the file up. Use this rather than reading the file.
Inputs: path (required), key, placeholder.
list_secret_requestsList secret requestsARead-only
Requests from this session that are waiting for the user, and recent ones with what happened. Metadata only.
Inputs: limit.
request_secretAsk the user for a secretA
Have the user paste a secret (API key, password, token, pre-shared key, one-time PIN) into a local page, which writes it straight to where it's needed: a KEY in a .env file, a placeholder or a whole file, or a command's stdin. You never see the value; you get back whether it was delivered and where. Use this instead of asking for any secret in the chat.
Inputs: reason (required), destination (required), cwd, key, +11 more.
wait_for_secretWait for a secret requestARead-only
Wait for the user to answer a request_secret (up to 55 s per call) and return its status: waiting, delivered, declined, cancelled, expired or failed. Never returns the value.
Inputs: request_id (required), wait_seconds.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a fairly distinct role: create a request, wait for it, check secret state, list requests, cancel a request. The only mild overlap is between wait_for_secret (blocking status of a specific request) and check_secret (whether a secret is in place), but the descriptions clearly separate these concerns.
All names follow a verb_noun pattern (request_secret, check_secret, list_secret_requests, cancel_secret_request). Minor deviation: wait_for_secret uses a preposition while others don't, and the object alternates between 'secret' and 'secret_requests', but the pattern remains legible.
Five tools map cleanly to the request lifecycle (request, wait, check, list, cancel) with no redundancy. Well-scoped for the server's purpose.
The request lifecycle is well covered: create, wait, cancel, list, and verify. Minor gap: no dedicated get-single-request tool, and no way to inspect a delivered request's destination after delivery beyond list metadata, but agents can work around this.
Maintenance
Related MCP Connectors
Logs your AI agent into websites, catches verification codes, and asks you before anything risky.
Let AI agents use any website you're logged in to. Sessions stay encrypted on your machine.
Password vault for AI agents with scoped, user-approved access
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to securely inject API keys and secrets into environment files, configs, or commands without the agent ever seeing the secret values.MIT
- AlicenseAqualityBmaintenanceEnables AI agents to ask users for credentials, secrets, and sensitive data through local browser forms that the model never sees, then resolve and use those values only at approved points of use. Also supports blind web capture, SSH key provisioning, and writes to .env files, SQL databases, and APIs, with the agent receiving only structural results.13400 npm1MIT
- AlicenseAqualityBmaintenanceLets an AI agent request API keys and passwords from a human through an end-to-end encrypted one-time link and pass them to exactly one command or file, without the value ever entering the agent's context. Can also send secrets as self-destructing links.3AGPL 3.0
- AlicenseCqualityBmaintenanceLocal MCP server for entering API keys outside chat. Deliver secrets to commands or .env files using an inline MCP App or a paired localhost browser.663 npmMIT