Skip to main content
Envark works as an Model Context Protocol (MCP) server, enabling AI assistants like Claude, Cursor, VS Code Copilot, and Windsurf to analyze and manage your environment variables directly.

What is MCP?

The Model Context Protocol is a standardized way for AI assistants to access tools and context from external systems. When you configure Envark as an MCP server, your AI assistant gains the ability to:
  • Scan your entire codebase for environment variable usage
  • Analyze risk levels and detect missing variables
  • Validate .env files against actual code requirements
  • Generate .env.example templates automatically
  • Track variable dependencies and usage patterns

Why Use Envark via MCP?

Catch Issues Early

AI can proactively detect missing variables, security risks, and configuration drift before deployment

Faster Debugging

Ask your AI “What environment variables are missing?” and get instant answers

Documentation Help

AI can help keep your .env.example in sync with actual code usage

Security Analysis

Detect secrets in committed files and variables with security risks

Supported IDEs

Envark integrates with all major AI-powered development environments:
IDESupport LevelConfiguration
VS CodeFull.vscode/mcp.json
Claude DesktopFull~/.claude/mcp.json
CursorFull~/.cursor/mcp.json
WindsurfFull~/.windsurf/mcp.json

Quick Start

1

Auto-configure for your IDE

Envark can automatically set up the MCP configuration for you:
# VS Code
npx envark init vscode

# Claude Desktop
npx envark init claude

# Cursor
npx envark init cursor

# Windsurf
npx envark init windsurf
This creates the appropriate configuration file with the correct settings.
2

Restart your IDE

After configuration, restart your IDE or AI assistant to load the MCP server.
3

Test the integration

Ask your AI assistant:
“Can you scan my project for environment variables?”
The AI will use Envark’s get_env_map tool to analyze your project.

Available Tools

When configured as an MCP server, Envark exposes 9 powerful tools to AI assistants:

get_env_map

Complete environment variable inventory

get_env_risk

Risk analysis with severity levels

get_missing_envs

Variables that will cause crashes

get_duplicates

Conflicting definitions finder

get_undocumented

Variables missing from .env.example

get_env_usage

Deep dive into specific variables

get_env_graph

Dependency graph visualization

validate_env_file

Validate .env files against code

generate_env_template

Auto-generate .env.example files

Example Conversations

Once configured, you can ask your AI assistant natural questions:
"Are there any environment variables with security risks?"

AI uses: get_env_risk
Result: Lists critical/high risk variables with recommendations

How It Works

  1. Your IDE starts and loads the MCP configuration
  2. Envark launches as a child process via npx envark
  3. AI assistant requests analysis using MCP tools
  4. Envark scans your codebase and returns structured data
  5. AI formats the results in human-readable format

Performance

  • Caching: Results are cached in .envark/cache.json with smart invalidation
  • Speed: Targets < 2s for 500-file projects
  • Private: Pure static analysis, no data leaves your machine

Next Steps

Setup Guide

Detailed configuration for each IDE

Tool Reference

Complete documentation of all MCP tools

Build docs developers (and LLMs) love