
.env checker: dotenv, Node, Vite, Next.js
io.github.Lawatch由 GitHub 帳號 Lawatch 發布v1.0.0更新於 Nov 17, 2026
Real value of each .env variable and the file:line that decides, for dotenv, node, Vite, Next.js
概覽
說明每個 .env 變數最後取得的值,以及決定它的檔案與行號,涵蓋 dotenv、node --env-file、Vite 與 Next.js。
- 可以做什麼
- 依指定載入器與模式解析多個 .env 檔案,給出每個變數的最終值、決定它的 file:line、失效的定義及原因
- 以真實的 dotenv 或 Node 解析器解析單一 .env 檔案,顯示被忽略的行、在 # 處截斷的值、未閉合的引號、多行值與重複鍵
- 比較 dotenv 與 Node 解析器對同一批變數的讀取差異
- 列出發現的陷阱,以及該模式下載入器根本不會讀取的檔案
- 適用情境
- 當某個環境變數是空的、值不對或顯示 undefined,需要釐清是哪個檔案哪一行生效時;或在專案從 dotenv 改用 node --env-file、Vite、Next.js 載入器之前使用。
- 執行需求
- 以 stdio 在本機執行:Claude Desktop 安裝包、Docker 映像,或以 Node 18+ 從原始碼執行。未宣告帳號、金鑰或環境變數。可離線運作,.env 檔案內容由你自行提供。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 .env checker: dotenv, Node, Vite, Next.js,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
dotenv-check — MCP server
Why is my environment variable empty, wrong or undefined?
The exact value each .env variable gets, and the file and line that decide it, with the four loaders developers use:
npm dotenv (+ dotenv-expand), node --env-file, Vite and Next.js. Offline.
One-click install for Claude Desktop, VS Code and Cursor: https://lawatch.github.io/10aday/mcp/dotenv-check/
Question, wrong answer or missing case? Open an issue — we read them.
AI assistants answer .env questions from memory, and the loaders disagree with each other:
PASSWORD=abc#123givesabc: an unquoted#starts a comment, even with no space before it.API_URL=(a trailing space) followed by a new line: Node and Vite 8 take the next line as the value, and that variable disappears.- Which file wins? dotenv and Next.js: the first file that defines it. Node and Vite: the last. The shell environment wins over all files.
$VARis expanded by dotenv-expand, Vite and Next.js, even inside single quotes, but never by Node or plain dotenv.- Vite only exposes
VITE_*to client code, Next.js onlyNEXT_PUBLIC_*, and.env.localis skipped by Next.js whenNODE_ENV=test. A=$A$Amakes Vite and dotenv-expand loop until the process runs out of memory.
Tools
Example
Result: VITE_API_URL = "VITE_TITLE=My app" (from .env.production:1, the .env:1 value loses), VITE_TITLE does not
exist, DB_PASSWORD is cut to abc and is not in import.meta.env anyway (no VITE_ prefix).
How exact is it?
The real code runs inside: npm dotenv 17.4.2 and dotenv-expand 12.0.3 (unchanged), the copy of dotenv-expand bundled
in Vite 8.3.8 (unchanged), @next/env 16.4.6 (unchanged, run with the files in memory), and a line-by-line port of
Node's C++ parser (src/node_dotenv.cc, identical in Node 22 to 25). The only addition: a guard that stops a value
growing without end, where the real loader would crash. test.js compares the server with util.parseEnv,
node --env-file, Vite's loadEnv, Next's loadEnvConfig and dotenv + dotenv-expand on thousands of random files
(quotes, #, $VAR, ${VAR:-default}, multi-line values, CRLF, export, several files, mode, shell variables): 0 differences.
Limits: .env.vault / dotenvx encryption and Docker Compose .env rules are not covered. Vite's envDir and
define are not read: give the files Vite would see.
Install
- Claude Desktop: open
dotenv-check-1.0.0.mcpbfrom the GitHub release. - Any MCP client (Docker):
{"command": "docker", "args": ["run", "-i", "--rm", "ghcr.io/lawatch/dotenv-check:1.0.0"]} - From source (Node 18+, no install):
{"command": "node", "args": ["/path/to/server.js"]}
Offline, read-only, no file access: you pass the file contents, nothing is sent anywhere.
Licenses
Server code: MIT. Bundled unchanged: dotenv and dotenv-expand (BSD-2-Clause, Scott Motte and contributors),
@next/env (MIT, Vercel). License texts in vendor/.
Built by AI agents (project 10aday).
來源:products/mcp/dotenv-check/README.md,提交 6e1ca13
工具
0版本歷史
1- v1.0.0最新Nov 17, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。
其他 Check 整合
check.tattoo: tattoo size and placement guide
tattoo.check官方發布者
check.tattoo: tattoo size and placement guide 的託管 MCP 服務,由 check.tattoo 發布;無需登入;Streamable HTTP;5 個工具。
iva.pt — EU VAT check (VIES) and Portuguese VAT law
pt.iva官方發布者
在 VIES 中驗證歐盟增值稅號,並回傳葡萄牙增值稅法典(CIVA)與 RITI 條文,支援葡語與英語。

TaxCheck AU: Australian Tax Calculators
由 GitHub 帳號 brettham70 發布
遠端 MCP 伺服器,提供附出處與日期的澳洲與紐西蘭稅務計算器:實領薪資、GST、HELP、MLS、退休金、KiwiSaver 與假期工資。

CheckMyTax NZ: New Zealand Tax Calculators
由 GitHub 帳號 brettham70 發布
遠端 MCP 伺服器,提供附出處與日期的澳洲與紐西蘭稅務計算器:實領薪資、稅碼、GST、KiwiSaver、退休金、假期工資與工作日。

GitHub Actions trigger checker
由 GitHub 帳號 Lawatch 發布
判斷某次 push 或 pull request 是否會觸發指定的 GitHub Actions 工作流程,並指出是哪一行篩選條件決定的。離線執行。