env-guard-mcp
Provides tools for managing .env configuration files: compares keys between .env and .env.example, scans project files for secret patterns, and generates .env.example from .env while keeping comments, blank lines, and key order without exposing secret values.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
env-guard-mcp — Token, Secret & Config Defense for AI Agents
Stop leaking API tokens, secrets, and broken .env configs into LLM contexts or Git repos.
A lightweight, zero-leak Python MCP server for Claude Code and Claude Desktop.
Why env-guard-mcp
Secret values never reach the model. Tools return key names, file paths, line numbers and rule names, never the secret itself, so nothing sensitive lands in the LLM context.
Catches drift early. Spot keys missing from
.envor.env.examplebefore a teammate's build breaks.Tiny and auditable. One file, one dependency (
mcp), stdio transport.
Related MCP server: trestle
Built-in Defense Tools
Tool | What it does |
| Compares keys in |
| Scans text files for AWS access keys, GitHub tokens, OpenAI and Anthropic keys, and generic |
| Writes |
Quick Start
Requires Python 3.10+.
pip install git+https://github.com/monkestor888/env-guard-mcpFrom a clone, for development:
pip install -e ".[dev]"
pytestClaude Code / Desktop Setup
Claude Code (available in all your projects):
claude mcp add -s user env-guard -- env-guard-mcpClaude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"env-guard": { "command": "env-guard-mcp" }
}
}If env-guard-mcp is not on your PATH, use its full path (inside your virtualenv's bin/ or
Scripts\). Pass an absolute project_dir to the tools, since the server's working directory
depends on the client.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
A vault for .env files and project credentials: one encryption key per project, a second factor before protected values open, an audit row for every reveal, and scoped MCP access for coding agents.
Checks AI-written code for leaked keys and made-up packages, on your machine. Never uploads code.
Scan configs, files, or text for leaked secrets and obvious misconfigurations. Nothing stored.
Secrets for developers and agents—secure context and workflows without exposing secret values.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to write .env files with secrets stored locally, allowing search by name/description while keeping actual secret values private and never exposed to the AI.5MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to scan source code for secrets like API keys and passwords locally without network requests.2Apache 2.0
- AlicenseAqualityBmaintenanceEnables agents to diagnose environment-variable issues read-only without exposing values, including .env versus template comparison, undocumented or unused variables across source code, shape validation, secret-exposure checks, git-ignore and history checks, and safe .env.example proposals.6MIT
- AlicenseAqualityBmaintenanceEnables AI agents to scan code, staged changes, repositories, and text snippets for hardcoded secrets, returning redacted findings without exposing matched secret values to the model.4MIT