Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Keep raw API keys out of agent-readable configuration, prompts, source files, plugin packages, and logs. Put only non-secret settings or supported credential references in reusable config. The key security question is whether the agent process can read the secret: if it can, assume the agent can expose it.
Why API keys do not belong in agent config
Agent configuration is often copied, checked into source control, packaged, or included in logs. A raw key placed there can travel with the configuration and become accessible to people or processes that should not have the credential. OpenAI advises keeping secrets out of reusable agent definitions, plugin archives, and logs in its MCP connections documentation.
As an Amazon Associate I earn from qualifying purchases.
Use configuration for non-secret values such as a service address or tool settings. Keep the credential itself in a separate location and connect it to the runtime only through a mechanism the platform documents.
Choose a storage pattern based on who can read the key
| Pattern | What it improves | Main limitation | Best fit |
|---|---|---|---|
| Non-secret config plus an environment variable | Keeps the literal key out of reusable or checked-in config. | A process or agent-generated code that can read the environment can read the key. | Local development or a trusted process where process-level access is acceptable. |
| Platform vault or secret store | Stores the real credential outside the reusable configuration and can supply it through a supported runtime integration. | Availability and isolation depend on the platform, credential type, and injection method. Direct injection into an agent-readable environment still exposes the value there. | Supported hosted agent and MCP integrations. |
| Trusted backend or proxy | Keeps the raw key outside agent-generated code; the trusted service authenticates approved outbound requests. | Requires operating and securing an intermediary and limiting its destinations and capabilities. | Higher-assurance deployments or untrusted agent execution. |
Compare approaches by where the real secret resides, whether the agent can read it, which hosts and actions the credential permits, whether it can be scoped or revoked independently, and whether logs or traces might capture it.
#1 Best Overall
- POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
- WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
- FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
- TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
- BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
Environment variables help with commits, not process isolation
An environment variable is a useful improvement over hard-coding a key in source or a checked-in configuration file. It reduces the chance that the literal value will be committed accidentally. OpenAI’s API key safety guidance recommends environment variables as part of safer key handling.
But an environment variable is not hidden from code running with access to that process environment. OpenAI’s agent sandbox security guidance puts it plainly: “Injecting a stored secret into the environment still exposes it to agent-generated code.” Use this pattern only when you accept that the agent process, and code it can run, may read the value.
Rank #2
- POWERFUL SECURITY KEY: The YubiKey 5C NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
- WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5C NFC secures 100+ of your favorite accounts, including email, password managers, and more
- FAST & CONVENIENT LOGIN: Plug in your YubiKey 5C NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
- MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
- PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts
When checking local setup, verify that the variable is present without printing its contents. Avoid commands, debug output, prompts, or traces that display the secret.
Recommended Free Tools
For MCP, use the platform’s credential mechanism
MCP configuration may contain authorization details or refer to a credential stored separately. Prefer a documented vault integration or matching credential reference when the target platform supports it. OpenAI documents vault credentials for MCP and sandbox use; its Vaults documentation describes credentials bound to MCP connections and environment-variable placeholders for sandbox use.
Rank #3
- POWERFUL SECURITY KEY: The YubiKey 5 NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
- WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5 NFC secures 100+ of your favorite accounts, including email, password managers, and more
- FAST & CONVENIENT LOGIN: Plug in your YubiKey 5 NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
- MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
- PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts
Do not assume placeholder syntax works across SDKs or platforms. Follow the mechanism documented for the specific runtime and credential type, and confirm where the resolved value becomes readable. If the runtime injects the value into an environment the agent can access, the secret is still exposed to that agent.
For OpenAI MCP connection setup, allowed_tools can limit which tools the agent discovers and calls. This reduces available capabilities, but it does not protect a credential already readable by the process. A stronger boundary is a trusted proxy or server that holds the raw key and attaches it only to approved requests.
Rank #4
- POWERFUL SECURITY KEY: The Security Key NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
- WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key NFC secures 100 of your favorite accounts, including email, password managers, and more.
- FAST & CONVENIENT LOGIN: Plug in your Security Key NFC via USB-A and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
- TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
- BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
Put a trusted service between an untrusted agent and the API
If agent-generated code must not see the raw credential, keep it on a trusted backend or proxy. The agent requests an allowed operation; the trusted service validates that request, applies limits, and authenticates the outbound call without returning the key to the agent. OpenAI recommends a trusted proxy when credentials need to remain inaccessible to agent-generated code in its MCP security guidance and sandbox security guidance.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesThis boundary only helps if the intermediary is constrained. Limit its destinations and supported actions, authenticate callers, and avoid making it a general-purpose relay that lets an agent use the credential for arbitrary requests.
Best Value
- POWERFUL SECURITY KEY: The YubiKey 5 is a versatile physical passkey that protects your digital life from phishing attacks. It ensures only you can access your accounts.
- WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5 secures 100+ of your favorite accounts, including email, password managers, and more.
- FAST & CONVENIENT LOGIN: Plug in your YubiKey 5 via USB and tap it to authenticate. No batteries, no internet connection, and no extra fees required.
- MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it.
- BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
Reduce exposure and recover from a leak
- Scope credentials narrowly: grant only the permissions and actions the integration needs, and separate credentials when independent revocation is useful.
- Limit tools: expose only tools the agent needs; treat tool restrictions as capability controls, not secret storage.
- Keep secrets out of logs and traces: inspect what the runtime records, and redact authorization headers and credential-bearing payloads.
- Review storage and access: use a supported secrets manager or vault, and restrict who and what can retrieve its credentials.
- Rotate or revoke suspected exposures: if a key was committed, logged, or otherwise exposed, revoke or rotate it, then check relevant repositories and logs for further exposure. Do not copy the key into remediation notes or commands.
OWASP’s MCP01:2025 guidance on token mismanagement and secret exposure identifies hard-coded MCP credentials and token mismanagement as risks and recommends safer secret storage.
Quick Recap
A practical setup checklist
- Remove the literal key from agent definitions, MCP config, prompts, source files, plugin packages, and examples.
- Choose the boundary: use an environment variable only if process-level access is acceptable; otherwise use a supported vault integration or a trusted backend/proxy.
- Keep config non-secret: store ordinary settings or a platform-supported credential reference, not the raw value.
- Restrict access: narrow tool availability, credential permissions, and proxy destinations to the required operations.
- Check for exposure safely: verify the secret is available without displaying it, and review repository, log, and trace handling.
- Revoke or rotate if exposed: invalidate the affected credential and inspect the places where it may have been copied or recorded.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




