Skip to content

Conversation

Konippi
Copy link
Contributor

@Konippi Konippi commented Aug 31, 2025

Issue #, if available:
resolve #2746

Description of changes:
This PR adds environment variable substitution support to MCP server configurations in custom agents, allowing users to use ${env:VARIABLE_NAME} syntax in the env section of their MCP server configs.

{
  "mcpServers": {
    "database-server": {
      "command": "node",
      "args": ["server.js"],
      "env": {
        "DATABASE_URL": "${env:DB_URL}",
        "PORT": "${env:SERVER_PORT}",
        "API_KEY": "${env:SECRET_API_KEY}"
      }
    }
  }
}

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Konippi Konippi changed the title fix: add env vars substitution support to mcp server config in agents fix: add env vars substitution support to mcp server config Sep 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: MCP server config for the custom agent does not support environment variable substitution
1 participant