Skip to content llms.txt

env_var_expansion

Whether MCP server configuration supports environment variable expansion. Reduces the need for hardcoded secrets in config files.

Type: bool Content type: mcp

ProviderSupportedMechanism
claude-codemcp_env_var_expansion: ${VAR} and ${VAR:-default} syntax in command, args, env, url, and headers fields of .mcp.json
codexmcp_env_vars: Codex RawMcpServerConfig supports an env_vars array of McpServerEnvVar entries; each entry is either a plain string or a structured object with name and optional source fields enabling named environment variable sourcing
crushCrush MCP configuration supports environment variable references in server env blocks
cursorServer configuration supports variable interpolation using ${env:NAME} for environment variables, ${userHome} for the user's home directory, and ${workspaceFolder} for the workspace root — not limited to env blocks alone.
factory-droidstdio server add command accepts --env KEY=VALUE flags; env field documented in configuration schema for stdio servers
gemini-clienv_variable_expansion: Gemini CLI MCP configuration supports environment variable expansion for secrets and paths
kirokiro_mcp_env_var_expansion: Environment variables referenced dynamically using ${VARIABLE_NAME} syntax within MCP config values; recommended pattern for secrets instead of hardcoded values
opencodeRemote MCP server headers and OAuth fields support {env:VAR_NAME} syntax for environment variable interpolation; local servers accept an environment object with key-value pairs
roo-codeenv_variable_expansion: server env blocks accept environment variables so secrets can be referenced from the shell environment
windsurfconfig_interpolation: Windsurf MCP configuration supports ${env:VAR_NAME} and ${file:/path} interpolation for environment variables and file contents
ampAmp MCP configuration does not document environment variable expansion
clineCline MCP configuration does not document environment variable expansion syntax
copilot-cliCopilot CLI MCP configuration does not document environment variable expansion
pinot documented
zedno automatic environment variable expansion documented in Zed MCP env blocks