env-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@env-mcpget the database host variable"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π env-mcp - Environment Variable MCP Server
A Model Context Protocol (MCP) server for secure environment variable and configuration management with Claude Code integration
Features
Secure Storage: Store environment variables with optional sensitive data protection
Categories: Organize variables by category for better management
Search & Filter: Find variables quickly with search functionality
Multiple Formats: Export/import support for .env, JSON, and YAML formats
MCP Integration: Seamlessly integrates with Claude Code for AI-assisted configuration management
CLI Tool: Powerful command-line interface for manual management
Related MCP server: empaya-mcp-server
Installation
# Clone the repository
git clone https://github.com/buildappolis/env-mcp.git
cd env-mcp
# Install dependencies
pnpm install
# Build the project
pnpm run buildConfiguration
Add to Claude Code
The server is already configured with Claude Code. To verify:
claude mcp listYou should see:
env-mcp: node /home/cory-ubuntu/coding/env-mcp/dist/index.js - β ConnectedManual Configuration
If you need to reconfigure:
claude mcp add env-mcp "node" "/path/to/env-mcp/dist/index.js"CLI Usage
Basic Commands
# Set a variable
./env-mcp-cli set KEY "value" --description "Description" --category "category"
# Set a sensitive variable (will be redacted in output)
./env-mcp-cli set API_KEY "secret" --sensitive --category "secrets"
# Get a variable
./env-mcp-cli get KEY
# List all variables
./env-mcp-cli list
# List by category
./env-mcp-cli list --category "secrets"
# Search variables
./env-mcp-cli search "api"
# Delete a variable
./env-mcp-cli delete KEY
# List categories
./env-mcp-cli categoriesImport/Export
# Export to .env format
./env-mcp-cli export --format env --output .env
# Export to JSON
./env-mcp-cli export --format json --output config.json
# Export to YAML
./env-mcp-cli export --format yaml --output config.yaml
# Import from .env file
./env-mcp-cli import .envMCP Tools (Available in Claude)
When using Claude Code, the following tools are available:
env_get- Get an environment variable valueenv_set- Set an environment variable with optional metadataenv_delete- Delete an environment variableenv_search- Search for variables by queryenv_list- List all variables or filter by categoryenv_export- Export variables in different formatsenv_import- Import variables from a file
Data Storage
Configuration is stored in: ~/.env-mcp/config.yaml
The storage format includes:
Variable key/value pairs
Optional descriptions
Categories for organization
Sensitive data flags
Creation/update timestamps
Examples
Setting up a development environment
# Database configuration
./env-mcp-cli set DB_HOST "localhost" --category "database"
./env-mcp-cli set DB_PORT "5432" --category "database"
./env-mcp-cli set DB_NAME "myapp" --category "database"
./env-mcp-cli set DB_USER "admin" --category "database"
./env-mcp-cli set DB_PASS "secret" --sensitive --category "database"
# API Keys
./env-mcp-cli set OPENAI_API_KEY "sk-..." --sensitive --category "api-keys"
./env-mcp-cli set STRIPE_API_KEY "sk_test_..." --sensitive --category "api-keys"
# Application settings
./env-mcp-cli set NODE_ENV "development" --category "app"
./env-mcp-cli set PORT "3000" --category "app"
./env-mcp-cli set LOG_LEVEL "debug" --category "app"
# Export for use in application
./env-mcp-cli export --format env --output .envSearching and filtering
# Find all database-related variables
./env-mcp-cli search "db"
# List all API keys
./env-mcp-cli list --category "api-keys"
# Show all categories
./env-mcp-cli categoriesJSON output for scripting
# Get JSON output for parsing
./env-mcp-cli list --json | jq '.[] | select(.category == "database")'
# Export specific category to JSON
./env-mcp-cli list --category "app" --json > app-config.jsonSecurity
Variables marked as
--sensitiveare redacted in normal outputUse
--show-sensitiveflag withgetcommand to view sensitive valuesSensitive values are still exported normally (be careful with exports)
Configuration file permissions should be restricted (chmod 600)
Development
Project Structure
env-mcp/
βββ src/
β βββ index.ts # MCP server implementation
β βββ cli.ts # CLI tool implementation
β βββ store.ts # Storage layer
β βββ types.ts # TypeScript type definitions
βββ dist/ # Compiled JavaScript
βββ package.json # Dependencies and scripts
βββ tsconfig.json # TypeScript configurationScripts
# Build the project
pnpm run build
# Run in development mode
pnpm run dev
# Run CLI in development
pnpm run cliTroubleshooting
MCP Server won't connect
Check if the server is built:
pnpm run buildTest the server manually:
echo '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}},"id":1}' | node dist/index.jsReconnect with Claude:
claude mcp list # Check status
Variables not persisting
Check the configuration file:
cat ~/.env-mcp/config.yamlEnsure write permissions:
mkdir -p ~/.env-mcp
chmod 755 ~/.env-mcpLicense
MIT
Contributing
Feel free to submit issues and pull requests to improve the env-mcp server.
Available Tools
7 toolsenv_deleteC
Delete an environment variable
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Variable key to delete |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It states 'delete' but does not disclose irreversibility, authorization requirements, or behavior on nonexistent keys. Minimal behavioral disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The single sentence is efficient but under-specified. It lacks actionable details, such as expected outcomes or error conditions. While not verbose, it sacrifices completeness for brevity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple delete operation with one parameter and no output schema, the description could hint at return behavior (e.g., success message or error handling). The current text is too sparse to fully inform an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% (the 'key' parameter is documented). The description adds no extra meaning beyond the schema, meeting the baseline for high coverage. No additional context provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Delete an environment variable' clearly states the action (delete) and resource (environment variable). It distinguishes from sibling tools like env_set (create/update) and env_get (read). However, it could be more specific (e.g., 'Permanently removes') to avoid ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. The description does not mention prerequisites, such as ensuring the variable exists, or when to prefer env_set to modify instead of delete.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
env_exportC
Export environment variables
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Export format (env, json, yaml) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description gives no behavioral details. It does not state what the export does (e.g., outputs to stdout, creates a file), whether it requires specific permissions, or what happens if the format parameter is invalid. The description adds no value beyond the tool name.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with no wasted words. However, it lacks structure such as bullet points or separate lines. It is efficient but could be more informative within the same length.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of an output schema, the description should clarify what the tool returns or produces. It does not explain the effect (e.g., printed output, file generation, or return value). The tool has only one parameter, but the description is still incomplete for safe and correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% (1 parameter with description), so baseline is 3. The description's 'Export format (env, json, yaml)' merely repeats the schema's description, adding no new semantic meaning. Baseline score is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Export environment variables' clearly states the verb and resource. However, it does not distinguish this tool from siblings like env_get or env_list, which could also retrieve environment data. The concept of 'export' versus 'get' or 'list' is not elaborated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use env_export versus alternatives. No conditions, prerequisites, or exclusions are mentioned. The agent must infer usage solely from the tool name and parameters.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
env_getC
Get an environment variable value
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Variable key |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description must define behavior. It fails to mention what is returned (value only or full object), error handling if key is missing, or whether it is read-only.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence without waste, but extremely minimal. It could be slightly expanded to include return type or usage hints without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the low complexity (1 required param, no output schema), the description is borderline adequate. It lacks information on return value and error behavior, which would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with a single 'key' parameter described as 'Variable key'. The description adds no additional meaning beyond the schema, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Get an environment variable value', indicating a read operation for a single variable by key. It is specific but does not explicitly differentiate from sibling tools like env_list or env_search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives (e.g., env_list for listing all, env_search for pattern matching). The agent is left to infer from the name.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
env_importC
Import environment variables from file
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to .env file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description fails to disclose critical behaviors: whether imported variables overwrite existing ones, what happens on file errors, or if the operation is persistent. The description is inadequate for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no filler, but it is overly brief and sacrifices necessary detail for conciseness. Slightly below perfect because it omits essential behavioral context.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With one parameter, no output schema, and no annotations, the description should provide more context (e.g., load into current process, behavior on duplicate keys). The current description is insufficient for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% for the single parameter 'path', which is described as 'Path to .env file'. The main description adds no additional meaning beyond the schema, so a baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the action (import) and resource (environment variables from file). However, it does not explicitly differentiate from sibling tools like env_export, though the 'from file' phrasing hints at the opposite direction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives such as env_set or env_export. Lacks context on prerequisites, file format expectations, or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
env_listA
List all environment variables or by category
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Optional category filter |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, and the description only states the basic function. It lacks details on behavior such as pagination, authentication requirements, or what happens when no category is specified. More transparency is needed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single efficient sentence, front-loaded with the primary action and optional filter. No superfluous words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list operation with one optional parameter, the description is mostly complete. It could mention that listing all is the default, but it's implied. Lacks output schema details, but acceptable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and the description does not add meaning beyond the schema's 'Optional category filter'. Baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'List' and resource 'environment variables', and the optional category filter implicitly distinguishes from siblings like env_get (single get) and env_search (search).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description covers when to use: to list all or by category. It does not explicitly exclude alternatives or provide when-not-to-use guidance, but the context is clear given sibling names.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
env_searchC
Search environment variables
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description offers no behavioral details beyond the name. It does not disclose whether the operation is read-only, what is returned, or any potential side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise (three words) but lacks essential context, making it under-specified rather than efficiently concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with a single parameter and no output schema, the description does not explain the search behavior, result format, or limitations. It is completely inadequate for an agent to use correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% coverage with a single parameter 'query' described as 'Search query'. The description adds no additional meaning beyond that, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Search environment variables', which clearly indicates the verb (Search) and resource (environment variables). However, it does not differentiate from siblings like env_get or env_list, which may have overlapping functionality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use env_search versus alternatives such as env_get (likely for a specific variable) or env_list (list all). The description is silent on context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
env_setC
Set an environment variable
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Variable key | |
| value | Yes | Variable value | |
| description | No | Optional description | |
| category | No | Optional category | |
| sensitive | No | Mark as sensitive |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must disclose behavioral traits. It does not mention whether the tool overwrites existing variables, requires specific permissions, or has side effects. The single sentence is insufficient for transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise at one sentence, but it is too minimal. It front-loads the purpose but does not earn its place by providing additional useful context. For a tool with 5 parameters, slightly more detail would improve clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 5 parameters, no annotations, and no output schema, the description is undercomplete. It does not explain persistence, scope, or behavior when setting an environment variable, leaving agents uninformed about crucial details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description does not add meaning beyond the schemaβit merely restates the purpose. No extra semantic value is provided for parameters like 'sensitive' or 'category'.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Set an environment variable' clearly states the verb 'set' and resource 'environment variable', distinguishing it from siblings like env_delete and env_get. However, it is brief and could benefit from specifying scope or behavior.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use env_set versus alternatives such as env_import or env_edit (if it exists). The description lacks context for choosing this tool over siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
7 tool updates
v1.0.0- First observed
env_delete - First observed
env_export - First observed
env_get - First observed
env_import - First observed
env_list - First observed
env_search - First observed
env_set
TDQS
Scored across 7 tools
Each tool has a clear, distinct action (delete, export, get, import, list, search, set) on environment variables, with no overlapping functionality.
All tools follow the consistent pattern 'env_<verb>' using snake_case, making them predictable and easy to distinguish.
With 7 tools covering CRUD, listing, searching, export, and import, the count is well-scoped for environment variable management.
The tool set covers all essential operations (create/set, read/get, update/set, delete/list/search, plus import/export), leaving no obvious gaps for typical workflows.
Maintenance
Related MCP Connectors
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Cloud-hosted MCP server for durable AI memory
Related MCP Servers
- -licenseNot gradedqualityBmaintenanceEnterprise-grade MCP server for persistent, intelligent memory management across Claude Code sessions.-
- FlicenseBqualityDmaintenanceMCP server for Cloudways enabling server management, app deployment, backups, SSL, environment variables, and monitoring via Claude Code.12-
- AlicenseNot gradedqualityBmaintenanceSecure MCP server for Boomi Platform API integration with Claude Code. Enables natural language interaction with Boomi Platform APIs, including managing accounts, processes, components, deployments, schedules, and more.1MIT

@lobsterkit/vault-mcpofficial
AlicenseAqualityCmaintenanceMCP server for LobsterVault, enabling AI agents to securely store, retrieve, manage, and share encrypted secrets with KMS envelope encryption, including environment variable injection.116 npmMIT