New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

env-contract-mcp

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

env-contract-mcp

Local value-free environment contract and configuration drift inspection. Tools include inspect contract

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
242
Maintainers
1
Weekly downloads
 
Created
Source

env-contract-mcp

Env Contract is a local MCP tool for finding configuration drift before a project fails at runtime. It compares variable names declared in .env.example and dotenv files with likely environment references in source and config files.

Tool

  • inspect_contract: report declared names, referenced names, missing names, unused names, and the files where they occur.

Safety

  • Reads local project files only; it never fetches URLs.
  • Never reads or emits environment values. Only names and bounded file paths are returned.
  • Ignores node_modules, build output, coverage, and Git internals.
  • Caps file count, file size, recursion depth, and output.
  • Matching is heuristic and is not a replacement for a build, deployment check, or secret scanner.

Set ENV_CONTRACT_ROOT to bound analysis to a workspace root. It defaults to the parent of the MCP package when launched normally.

Run

npm install
npm run build
node dist/index.js

Quick start

npm install
npm run build
node dist/index.js

The server uses stdio, so it can be connected to Claude Desktop, Cursor, VS Code, MCP Inspector, or another compatible MCP client.

Tools at a glance

  • inspect_contract: Inspect a local project for declared and referenced environment variable names without reading values.

Try it

After building, connect the server through your MCP client. The repository root also contains smoke-test.mjs for projects covered by the shared harness. A typical tool call starts with inspect_contract.

Keywords

mcp

FAQs

Package last updated on 21 Sep 2026

Related posts