Diagnose your .env files for missing variables, weak secrets, format issues, and exposed API keys.
A Python MCP server + clean web UI that protects developers from the most common .env mistakes before they become production incidents.
| Check | Severity |
|---|---|
Missing vars from .env.example |
❌ Error |
| Empty values on required fields | ❌ Error |
| Real API keys / secrets detected | 🚨 Critical |
Weak/placeholder values (secret, 123456) |
|
| Wrong format (URLs, ports, booleans, emails) | |
Vars not documented in .env.example |
ℹ️ Info |
| Tool | Description |
|---|---|
diagnose_env |
Diagnose .env content passed as a string |
diagnose_env_file |
Diagnose .env file(s) by path on disk |
scan_project |
Scan entire project for all .env variants |
generate_example |
Generate a safe .env.example from your real .env |
pip install mcp
python server/server.py{
"mcpServers": {
"env-doctor": {
"command": "python",
"args": ["/path/to/env-doctor/server/server.py"]
}
}
}{
"mcpServers": {
"env-doctor": {
"command": "npx",
"args": ["mcp-remote", "https://gitmcp.io/nothingtosurprise/env-doctor"]
}
}
}Open frontend/index.html in any browser — no server needed, runs fully client-side.
Features:
- Paste your
.envand.env.examplefor instant diagnosis - Health score (0–100) with visual ring
- Grouped issues by severity
- Generate a safe
.env.examplewith one click - All secrets masked in the report — nothing leaves your browser
"Diagnose my .env file" → paste content → instant report
"Scan my project at /home/user/myapp" → checks all .env variants
"Generate a safe .env.example from my .env" → strips all real values
.env · .env.local · .env.development · .env.production · .env.staging · .env.test · .env.dev · .env.prod
MIT