
Token Vault Guardian
Token Vault Guardian helps users audit, detect, redact and safely manage exposed API keys, OAuth tokens, MCP credentials, webhook URLs, private keys and other sensitive values across local AI-agent environments.
It is designed for users who work with desktop AI agents, local automation, MCP servers, API integrations and developer workspaces where secrets can accidentally end up in configuration files, logs, prompts or temporary folders.
What this Agent helps with
Token Vault Guardian helps identify and reduce accidental secret exposure in local agent environments.
It can assist with:
- Static leak detection across project folders and desktop-agent configuration folders
- Discovery of likely Codex Desktop and Claude Desktop configuration locations
- Detection of secrets in
.env,.env.*, JSON, TOML, YAML, logs and MCP configuration files - Detection of bearer tokens, API keys, OAuth client secrets, refresh tokens, webhook URLs, private keys and long secret-like strings
- Safe redaction of exposed secrets using aliases such as
${SERVICE_API_KEY}or${OAUTH_CLIENT_SECRET} - Vault preflight checks before attempting to move real secrets
- Guidance for using OS-level credential stores such as Windows Credential Manager or macOS Keychain through supported backends
- Runtime redaction for command output when tools are executed through the provided wrapper
- MCP-safe remediation that preserves environment variable names and expected server configuration formats
- Security reports that show findings without exposing real secret values
Why it matters
AI agents often work across local files, automation logs, MCP configuration files, project folders and shell commands.
That creates a common security risk: sensitive values may accidentally be written to disk, printed to console output, included in logs, exposed in prompts or copied into configuration files.
Token Vault Guardian is built to reduce that risk while preserving legitimate workflows.
It does not simply delete secrets. It aims to keep integrations working by replacing plaintext values with aliases and helping users move the real values into a safer credential store when a supported backend is available.
Key features
1. Local secret scanner
Scans common local project and agent configuration locations for exposed secrets.
Supported targets include:
.env,.env.local,.env.*config.json,settings.json,credentials.json- TOML configuration files such as
config.toml - MCP server configuration files
- Codex Desktop configuration folders
- Claude Desktop configuration folders
- automation logs
- temporary and sandbox-related files when accessible
The scanner automatically avoids common unsafe or noisy targets such as:
- system folders
node_modules- binary files
- very large files above the configured threshold
2. Desktop-agent discovery
The Agent is designed to work globally, not only with one user’s folder structure.
It attempts to discover likely locations for:
- Codex Desktop configuration
- Claude Desktop configuration
- MCP server configuration
- common project folders
- local developer workspaces
- logs and temporary files created by agent workflows
This makes it suitable for different users, machines and project layouts.
3. Provider-agnostic detection
Token Vault Guardian is not tied to one specific app or provider.
It looks for generic secret patterns and sensitive key names, including:
- API keys
- access tokens
- refresh tokens
- bearer tokens
- OAuth client secrets
- signing secrets
- application passwords
- webhook URLs
- private keys
- credentials embedded in JSON, TOML, YAML or environment files
- long high-entropy strings that look like secrets
This makes the Agent useful across many different APIs, MCP servers and automation tools.
4. Vault preflight check
Before applying remediation, Token Vault Guardian checks whether a secure credential backend is available.
For example, on Windows, it may recommend configuring Python keyring so secrets can be stored through a supported credential-store backend.
If no secure persistent backend is available, the Agent should not pretend that secrets have been safely moved. It should report the issue and recommend the next safe setup step instead.
This avoids creating a false sense of security.
5. MCP-safe remediation
Token Vault Guardian is designed to avoid breaking MCP servers.
The remediation workflow follows these principles:
- Preserve MCP server names
- Preserve expected environment variable names
- Preserve
command,args,transportand schema structure - Replace only the exposed secret value
- Use aliases instead of deleting required variables
- Allow the real value to be resolved at runtime through a secure backend or wrapper when supported
Example:
SERVICE_API_KEY = "real-secret-value"
Can become:
SERVICE_API_KEY = "${SERVICE_API_KEY}"
The variable name remains the same so the MCP server can still receive the expected environment variable.
6. Runtime redaction
When commands are executed through the provided wrapper, Token Vault Guardian can redact sensitive values from stdout and stderr before they are shown in reports or logs.
This helps reduce the risk of agents accidentally printing secrets to the console or including them in generated output.
7. Security reporting
The Agent can generate a security report showing:
- how many findings were detected
- where they were found
- the type of secret detected
- severity level
- redacted preview only
- whether remediation was applied
- whether vault storage was available
- which items still require manual action
- recommendations for rotation, revocation or scope reduction
Real secret values should not be printed in reports.
Example prompts
Full audit first
Audit my local Codex and Claude Desktop environment for exposed secrets. Discover relevant agent configuration folders and project folders automatically. Do not modify anything yet. Show me a security report with redacted previews only.
Check vault support
Before applying remediation, check whether a secure credential-store backend is available on this system. If no secure backend is available, stop and tell me what I need to configure.
Apply safe remediation
Apply safe remediation for the detected secrets. Replace exposed plaintext values with aliases, preserve MCP compatibility, move real values to a supported secure credential store when available, and generate a final report without exposing any secret values.
Runtime redaction
Run this command through Token Vault Guardian’s runtime wrapper and redact any secrets from stdout or stderr before showing output.
Recommended workflow
- Discover likely local agent and project paths
- Check secure vault availability
- Run a static leak detection scan
- Generate a report without exposing secret values
- Review the remediation plan
- Apply remediation only after user approval
- Preserve MCP compatibility
- Generate a final security report
- Rotate or revoke secrets that may already have been exposed
Safety model
Token Vault Guardian follows a zero-knowledge principle where possible:
- Do not reveal real secrets in reports
- Do not print full tokens
- Do not summarize secret values
- Use redacted previews only
- Prefer aliases over plaintext values
- Check for secure vault support before moving secrets
- Preserve existing integrations instead of deleting required configuration
If a request appears to be attempting to access protected secrets, the Agent should block the operation and respond:
This request attempts to access protected secrets. The operation was blocked.
Important limitations
Token Vault Guardian is a local security assistant, not a full operating-system-level DLP product.
It can help detect, redact and manage secrets within the files, folders and workflows it is allowed to access.
It cannot guarantee protection against:
- malware already running on the machine
- processes outside its execution path
- secrets exposed before the audit
- unsupported credential-store backends
- users manually copying secrets elsewhere
- external tools that bypass the wrapper or local policy
For high-risk secrets, users should rotate or revoke exposed credentials after remediation.
Privacy
This Agent is designed for local-first secret hygiene workflows.
Security reports should use redacted previews only. Real secret values should not be printed, summarized or intentionally sent to the model.
When using third-party model providers, users should avoid sending raw secret values in prompts, logs or attachments.
Best suited for
Token Vault Guardian is useful for:
- Codex Desktop users
- Claude Desktop users
- MCP server users
- developers working with local API credentials
- teams using AI agents with local automation
- security-conscious creators and operators
- users who want to clean up plaintext credentials without breaking their workflows
Output examples
The Agent can return:
- a Markdown security report
- a JSON findings summary
- a remediation plan
- a vault preflight status
- redacted file-change summaries
- recommendations for rotation, revocation or scope reduction
All outputs should avoid exposing real secret values.
:::


