.env checker: dotenv, Node, Vite, Next.js

io.github.LawatchPublished by GitHub account Lawatchv1.0.0Updated Nov 17, 2026

Real value of each .env variable and the file:line that decides, for dotenv, node, Vite, Next.js

The publisher's own server: check.tattoo: tattoo size and placement guide

VerifiedSTDIODesktop onlyFiles & StorageDeveloper Tools

Overview

AI-generated overview

Explains which value each .env variable really gets, and the file:line that decides it, for dotenv, node --env-file, Vite and Next.js.

What you can do
  • Resolve environment variables across several .env files and a chosen loader and mode, with final value, deciding file:line, losing definitions and why
  • Parse a single .env file with the real dotenv or Node parser, showing ignored lines, values cut at #, unclosed quotes, multi-line values and duplicate keys
  • Compare how dotenv and Node's parser read the same variables
  • Report traps found and files the loader never reads in that mode
When to use it
Useful when an environment variable comes out empty, wrong or undefined and you need to know which file and line wins, or before switching a project between dotenv, node --env-file, Vite and Next.js loaders.
Requirements
Runs locally over stdio: a Claude Desktop bundle, a Docker image, or Node 18+ from source. No accounts, keys or environment variables declared. Works offline; you supply the .env file contents yourself.
Before you install
You pass .env file contents to the tool, so real secrets in those files are handed to the assistant and model provider. It is described as read-only and offline with no file access. It does not cover .env.vault/dotenvx encryption, Docker Compose .env rules, or Vite envDir and define settings.

Installation

In SourceWeft

  1. Open .env checker: dotenv, Node, Vite, Next.js in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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#123 gives abc: 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.
  • $VAR is 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 only NEXT_PUBLIC_*, and .env.local is skipped by Next.js when NODE_ENV=test.
  • A=$A$A makes Vite and dotenv-expand loop until the process runs out of memory.

Tools

ToolWhat it does
resolve_envGive the .env files and the loader (dotenv, node, vite, nextjs) with the mode. For each variable: final value, the file:line that decides, the definitions that lose and why, the text before $VAR expansion, whether it reaches browser code. Plus every trap found and the files the loader never reads in this mode.
parse_env_fileOne file, parsed with the real dotenv or Node parser: each value with its line, lines silently ignored, values cut at #, unclosed quotes, multi-line values, duplicate keys.
compare_env_parsersThe variables that read differently with dotenv and with Node's parser (node --env-file, Vite 8). Run it before switching.

Example

json
{ "name": "resolve_env", "arguments": { "loader": "vite", "mode": "production", "files": {  ".env": "VITE_API_URL=http://localhost:3000\nDB_PASSWORD=abc#123\n",  ".env.production": "VITE_API_URL= \nVITE_TITLE=My app\n" } } }

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.mcpb from 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).

Source: products/mcp/dotenv-check/README.md at commit 6e1ca13

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v1.0.0LatestNov 17, 2026

Score

40% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.

Other Check integrations