About envdiff
envdiff compares local and CI environment descriptors for developers diagnosing environment differences. It reports variable names without exposing values.
Key features
- 01Compare Node, OS, and lockfile fields
- 02Find environment variables present on one side
- 03Flag differing values by variable name
- 04Return a JSON difference count
Use cases
- 01Diagnose local-versus-CI discrepancies
- 02Check environment differences without exposing secrets
MCP support
The MCP server exposes `diff_environments`, which compares required local and CI descriptors.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
1Saved tool list · updated 1w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| ci | object | Yes | The CI environment descriptor |
| ci.os | string | No | Operating system identifier |
| ci.env | object | No | Environment variables as a string map (values are compared, never echoed) |
| ci.node | string | No | Node.js version string |
| ci.lockfile_present | boolean | No | Whether a lockfile is present |
| local | object | Yes | The local environment descriptor |
| local.os | string | No | Operating system identifier |
| local.env | object | No | Environment variables as a string map (values are compared, never echoed) |
| local.node | string | No | Node.js version string |
| local.lockfile_present | boolean | No | Whether a lockfile is present |
Details
From the project READMEenvdiff
"It works on my machine" — which part of the machine? envdiff compares two environment descriptors, typically a developer's local environment and a CI environment, and reports exactly where they differ:
- Node version, OS, and lockfile presence, compared
as fields (a missing field is reported as
null) - env vars present on one side only, by key
- env vars whose values differ — by key name only. Values are compared but never echoed into the report, so a descriptor may carry secrets without leaking them.
A descriptor is a small JSON object:
{"node": "20.11.0", "os": "linux", "env": {"CI": "true"}, "lockfile_present": true}
— every field optional.
Pure local computation: no network, no configuration.
CLI
npx @reneturcios/envdiff diff local.json ci.json
npx @reneturcios/envdiff --version
Output is the comparison report as JSON, with a
summary.total_differences count. Exit codes: 0 on success
(differences are a result, not an error), 1 on a runtime
error (unreadable or invalid descriptor), 2 on a usage error.
MCP server
npx -y @reneturcios/envdiff mcp
MCP client config:
{
"mcpServers": {
"envdiff": {
"command": "npx",
"args": ["-y", "@reneturcios/envdiff", "mcp"]
}
}
}
Tools
-
diff_environments— Compare two environment descriptors.local(object, required) — the local descriptorci(object, required) — the CI descriptor
Each descriptor:
node(string),os(string),env(string map),lockfile_present(boolean), all optional.
Docker
docker run -i ghcr.io/cloudcorprecords/envdiff
docker run --rm -v "$PWD:/w" ghcr.io/cloudcorprecords/envdiff diff /w/local.json /w/ci.json
Development
npm install
npm run build # tsc -> dist/
npm test # tsx --test test/*.test.ts (pure local, no network)
npm run dev # run the CLI from source
License
MIT — Copyright (c) 2026 Rene Turcios
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.