Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

nothingtosurprise/env-doctor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

6 Commits

Repository files navigation

🩺 .env Doctor

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.


What it checks

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) ⚠️ Warning
Wrong format (URLs, ports, booleans, emails) ⚠️ Warning
Vars not documented in .env.example i️ Info

MCP Tools

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

Install MCP Server

pip install mcp
python server/server.py

Claude Desktop config

{
 "mcpServers": {
 "env-doctor": {
 "command": "python",
 "args": ["/path/to/env-doctor/server/server.py"]
 }
 }
}

Via gitMCP (no install)

{
 "mcpServers": {
 "env-doctor": {
 "command": "npx",
 "args": ["mcp-remote", "https://gitmcp.io/nothingtosurprise/env-doctor"]
 }
 }
}

Web UI

Open frontend/index.html in any browser β€” no server needed, runs fully client-side.

Features:

  • Paste your .env and .env.example for instant diagnosis
  • Health score (0–100) with visual ring
  • Grouped issues by severity
  • Generate a safe .env.example with one click
  • All secrets masked in the report β€” nothing leaves your browser

Example Usage in Claude

"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

Supported .env variants

.env Β· .env.local Β· .env.development Β· .env.production Β· .env.staging Β· .env.test Β· .env.dev Β· .env.prod


License

MIT

About

MCP server that diagnoses .env files for missing vars, weak secrets, exposed API keys & format errors

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /