Sponsored by Deepsite.site

Env Validator

Created By
pouyasadri24 days ago
An MCP (Model Context Protocol) server that inspects your local development environment and reports missing dependencies, version mismatches, and misconfigured environment variables to any MCP-compatible AI assistant. Works with Claude Desktop, Cursor, Gemini CLI, and any other client that supports stdio-transport MCP servers.
Overview

env-validator-mcp

Go MCP SDK License: MIT

An MCP (Model Context Protocol) server that inspects your local development environment and reports missing dependencies, version mismatches, and misconfigured environment variables to any MCP-compatible AI assistant.

Works with Claude Desktop, Cursor, Gemini CLI, and any other client that supports stdio-transport MCP servers.


Features

MCP ToolWhat it does
check_tool_versionChecks if a CLI tool is installed; optionally validates a semver constraint (e.g. >=1.21.0)
check_env_varsVerifies environment variables are set, non-empty, and/or match a regex pattern
check_config_filesConfirms files/directories exist; optionally validates JSON files and checks for required keys
validate_environmentFull sweep: tools + env vars + config files, returns a structured JSON report
list_checksLists everything this server can inspect

Supported CLI tools: go, node, npm, docker, git, python3, pip3, make, curl, jq, kubectl, terraform, helm, rustc, java


Quick Start

1. Build

git clone https://github.com/pouyasadri/env-validator-mcp.git
cd env-validator-mcp
make build
# → bin/env-validator-mcp

2. Configure Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "env-validator": {
      "command": "/Users/pouyasadri/Desktop/Projects/env-validator-mcp/bin/env-validator-mcp"
    }
  }
}

Restart Claude Desktop. You can now ask:

"Check if Go, Docker and Node are installed and meeting my minimum version requirements"

"Is my DATABASE_URL environment variable set?"

"Run a full environment validation and tell me what's missing"

3. Configure Cursor / other MCP clients

Most clients support the same JSON config format. Point command at the binary path.


Example Responses

validate_environment

{
  "results": [
    {
      "name": "go",
      "status": "ok",
      "found_version": "1.24.2",
      "expected_range": ">=1.21.0",
      "message": "go 1.24.2 is installed and satisfies >=1.21.0"
    },
    {
      "name": "docker",
      "status": "missing",
      "message": "docker is not found or not executable: executable file not found in $PATH"
    },
    {
      "name": "HOME",
      "status": "ok",
      "message": "environment variable HOME is set"
    }
  ],
  "summary": "6 OK, 2 issue(s) found",
  "ok_count": 6,
  "issue_count": 2
}

check_tool_version

// Arguments: { "tool": "node", "constraint": ">=18.0.0" }
{
  "name": "node",
  "status": "outdated",
  "found_version": "16.0.0",
  "expected_range": ">=18.0.0",
  "message": "node 16.0.0 does not satisfy constraint >=18.0.0"
}

Semver Constraint Syntax

OperatorExampleMeaning
>=>=1.21.0Version must be 1.21.0 or newer
>>1.20.0Version must be strictly newer than 1.20.0
<=<=3.0.0Version must be 3.0.0 or older
<<3.0.0Version must be strictly older than 3.0.0
==1.24.2Version must match exactly
(empty)""Any version — just check if installed

Development

Prerequisites

  • Go 1.24+

Commands

make build      # Compile binary to bin/
make test       # Run all tests
make test-race  # Run with race detector
make coverage   # Generate HTML coverage report
make lint       # Run golangci-lint
make clean      # Remove build artifacts

Project Structure

env-validator-mcp/
├── cmd/server/          # Entry point (main.go)
├── internal/
│   ├── checker/         # Tool, env, and file checkers (interfaces + implementations)
│   ├── report/          # Result and Report types
│   └── semver/          # Version extraction and constraint checking
├── mcp/                 # MCP server setup and tool handlers
├── Makefile
└── go.mod

Architecture: Dependency Injection for TDD

All external effects are hidden behind interfaces:

Commander   → exec.Command (real) / MockCommander (tests)
EnvReader   → os.LookupEnv (real) / MockEnvReader (tests)
FileSystem  → os.Stat/ReadFile (real) / MockFileSystem (tests)

This allows every checker to be tested in complete isolation — no spawned processes, no real environment, no filesystem I/O.


License

MIT

Server Config

{
  "mcpServers": {
    "env-validator": {
      "command": "go",
      "args": [
        "run",
        "/absolute/path/to/your/repo/main.go"
      ],
      "env": {
        "YOUR_ENV_VAR": "value_if_needed"
      }
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Serper MCP ServerA Serper MCP Server
ChatWiseThe second fastest AI chatbot™
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
WindsurfThe new purpose-built IDE to harness magic
Tavily Mcp
Playwright McpPlaywright MCP server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
DeepChatYour AI Partner on Desktop
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
CursorThe AI Code Editor
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Amap Maps高德地图官方 MCP Server