envmcp
About
A lightweight way to use environment variables in your Cursor MCP server definitions.
Details
- License
- MIT license
Explore
- Loads environment variables from .env.mcp files.
- Looks for .env.mcp in current, parent, and home directories.
- Replaces $VARIABLE_NAME references in command arguments.
- Supports comments and quoted values in env file.
- Works with any MCP server command.
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
envmcpCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Prefix your server command with envmcp.
_Before (secrets exposed in config)_:
json{
"my_database": {
"command": "my-mcp-server",
"args": ["postgresql://user:password@hostname/db"]
}
}
_After (secrets in ~/.env.mcp)_:
json{
"my_database": {
"command": "npx",
"args": ["envmcp", "my-mcp-server", "$DATABASE_URL"]
}
}
DATABASE_URL=postgresql://user:password@localhost/db
API_KEY=your-secret-api-key
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"envmcp": {
"envmcp": {
"command": "npx",
"args": [
"envmcp",
"your-mcp-server",
"$DATABASE_URL"
]
}
}
}
}
McpServers
{
"envmcp": {
"command": "npx",
"args": [
"envmcp",
"your-mcp-server",
"$DATABASE_URL"
]
}
}
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



