secrets-mcp
Use it to keep API keys out of agent conversations by storing them as local handles and making API calls through the server.
stage_secret: detects/stores secrets in pasted text and returns the text with{{handles}}substituted.list_secrets: lists handles with fingerprints and use counts, never raw values.request_with_secret: performs HTTP calls with{{handle}}resolved server-side and scrubs responses.revoke_secret: deletes a stored handle and its local secret.vault_info: shows vault path, backend, and stored handle count.No tool returns raw secret values; storage is encrypted locally (DPAPI on Windows, AES-GCM on Linux/macOS).
Detects and stores Discord bot tokens, allowing the agent to reference them as handles and make authenticated HTTP requests to the Discord API without exposing the token in the transcript.
Detects and stores GitHub personal access tokens (PATs), allowing the agent to reference them as handles and make authenticated HTTP requests to the GitHub API without exposing the token in the transcript.
Detects and stores Google API keys, allowing the agent to reference them as handles and make authenticated HTTP requests to Google APIs without exposing the key in the transcript.
Detects and stores OpenAI API keys, allowing the agent to reference them as handles and make authenticated HTTP requests to the OpenAI API without exposing the key in the transcript.
Detects and stores Resend API keys, allowing the agent to reference them as handles and make authenticated HTTP requests to the Resend API without exposing the key in the transcript.
Detects and stores SendGrid API keys, allowing the agent to reference them as handles and make authenticated HTTP requests to the SendGrid API without exposing the key in the transcript.
Detects and stores Slack tokens, allowing the agent to reference them as handles and make authenticated HTTP requests to the Slack API without exposing the token in the transcript.
Detects and stores Stripe API keys, allowing the agent to reference them as handles and make authenticated HTTP requests to the Stripe API without exposing the key in the transcript.
Detects and stores Twilio API keys, allowing the agent to reference them as handles and make authenticated HTTP requests to the Twilio API without exposing the key in the transcript.
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., "@secrets-mcp store this stripe key as a handle, then call the balance endpoint"
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.
secrets-mcp
Give the agent a handle, not the key.
An MCP server that takes an API key out of the conversation the moment it appears. The agent keeps {{stripe}} and calls your APIs through the server, which fills in the real key outside the transcript.
Install
irm https://raw.githubusercontent.com/zallkyre/secrets-mcp/main/install.ps1 | iexIt finds the agents on your PC, lists them, and wires up the one you pick:
Detected agents:
[1] OpenCode
[2] OpenWork
[3] Claude Desktop
[4] Cursor
[5] VS Code
Connect secrets-mcp to which agent(s)?
Enter numbers separated by commas, 'a' for all, or Ctrl+C to abort.
>Every config it touches is backed up first. Re-running is safe — it replaces its own entry instead of duplicating it.
MIT · Python 3.10+ · Windows first · 11 agents
Related MCP server: keyward
What it looks like
you: here's my stripe key sk_live_4eC39Hq…
agent: stored as {{stripe}} — I won't repeat it.
agent: calling the API with {{stripe}}
↑ filled in locally, after the model stops writing
agent: 200 OK balance: $1,204.00One tool call at the paste. After that the key is out of the model's reach.
Why
Every time you paste a key into chat, that key lives in:
the model provider's request logs
your local transcript
every later tool call the agent writes (curl, shell, files)
any screenshot or code block it prints
secrets-mcp closes everything after the paste. It cannot close the paste itself — see Threat model.
Tools
tool | what it does |
| finds keys in text, stores them, returns the text with |
| handles + last-4 fingerprint + use count. Never values. |
| HTTP call with |
| deletes a handle |
| vault path, backend, count |
No tool returns a raw secret. That is the entire design constraint — a single get would make the whole thing pointless, so it does not exist.
Detected formats: Anthropic · OpenAI · GitHub PAT · AWS access key · Stripe · Slack · Google API · SendGrid · Resend · Discord bot · Twilio · Groq · JWTs · PEM private keys · high-entropy strings with nearby api_key/token context.
Storage
platform | backend |
Windows | DPAPI ( |
Linux / macOS | AES-GCM, key at |
Vault: %APPDATA%\secrets-mcp\vault.json. Override with SECRETS_MCP_VAULT.
Threat model
Protects against
the key being written into shell commands, curl, files, or later prompts
the key leaking through agent logs of tool arguments
API error responses that echo your key back (the proxy scrubs responses too)
plaintext secrets sitting on disk
Does not protect against
the paste itself. Once you send a key, it reached the model provider on that request. No tool can undo that. Revoke and rotate if it was live.
a compromised local account — DPAPI decrypts for your user by design
a malicious MCP server you installed alongside this one
prompt injection that persuades the agent to call
request_with_secretagainst an attacker's URL — review the tool calls, and use scoped keys
Honest framing: this reduces blast radius. It is not a vault you can safely paste anything into.
Supported agents
agent | config |
OpenCode |
|
OpenWork |
|
Claude Desktop |
|
Claude Code |
|
Cursor |
|
Windsurf |
|
VS Code |
|
Gemini CLI |
|
Codex CLI |
|
Zed |
|
OpenClaw |
|
Only the ones actually installed are offered.
Manual install
OpenCode / OpenWork:
{
"mcp": {
"secrets": {
"type": "local",
"command": ["python", "-m", "secrets_mcp"],
"enabled": true
}
}
}Everything else:
{
"mcpServers": {
"secrets": { "command": "python", "args": ["-m", "secrets_mcp"] }
}
}Development
python -m pip install -e .
python -m unittest discover -s tests -vLicense
MIT
LLM guide — Give the agent a handle, not the key. MCP server that keeps API keys out of AI agent conversations. · Stack: Python · Run: pip install . · License: MIT-0 - no conditions, resale allowed
Available Tools
5 toolslist_secretsA
List stored handles with fingerprints. Never returns secret values.
Inputs: no named parameters. Returns: result
request_with_secretA
Call an API, substituting {{handle}} with the real secret server-side.
Use this instead of writing the key into a shell command or curl. The key is injected here, outside the conversation, and the response is scrubbed before it comes back.
Args: method: GET, POST, PUT, PATCH, DELETE. url: full URL; {{handle}} is allowed in the path or query. headers: e.g. {"Authorization": "Bearer {{stripe}}"}. body: request body; {{handle}} is substituted.
Inputs: url (required), method (required), body, headers. Returns: result
revoke_secretB
Delete a stored handle. The real secret is destroyed locally.
Inputs: name (required). Returns: result
stage_secretA
Store any secrets in text and return it with handles substituted.
Use this the moment a user pastes an API key, token, or private key. The returned text is safe to repeat; the original was written to an encrypted local vault and is not returned.
Args: text: the raw text containing the secret(s). name: optional handle to force, e.g. "stripe" -> {{stripe}}.
Inputs: text (required), name. Returns: result
vault_infoB
Where the vault lives and how many handles it holds. No values.
Inputs: no named parameters. Returns: result
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 clearly distinct purpose: store, list, use, delete, or inspect metadata. There is no overlap between staging, listing, requesting, revoking, and vault info.
Most tools follow a verb_noun pattern (stage_secret, list_secrets, revoke_secret), but request_with_secret includes an extra preposition and vault_info is noun-only. The deviations are minor and readability remains high.
Five tools is well-scoped for a secrets vault: create, list, use, delete, and inspect. Each tool earns its place without redundancy.
The surface covers the core lifecycle: stage, list, use in requests, revoke, and vault info. A minor gap is the lack of an explicit update or rotate operation, though stage_secret may overwrite handles implicitly.
Maintenance
Related MCP Connectors
Give your AI hands. Identity, credential vault, and API gateway for autonomous agents.
Governed access to sensitive data, secrets and APIs for AI agents. A signed proof for each decision.
Secrets for developers and agents—secure context and workflows without exposing secret values.
Password vault for AI agents with scoped, user-approved access
Related MCP Servers
AlicenseNot gradedqualityDmaintenanceEnables AI agents to securely manage API credentials and make proxied API calls through AgentKeys, keeping secrets hidden from the agent.16 npmMIT- AlicenseNot gradedqualityCmaintenanceEnables AI agents to securely use API keys by storing them in an encrypted vault and injecting them on demand with user approval, without exposing the key values to the model.3MIT
- AlicenseAqualityCmaintenanceEnables AI agents to make authenticated API calls and run commands with secrets injected, while keeping credentials completely hidden from the model, with policy enforcement, grants, and audit logging.6MIT
- 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.10 npmMIT