[FEATURE] MCP Servers configuration : add expanding variables support

Resolved 💬 7 comments Opened Apr 30, 2025 by PhilipGarnero Closed Jul 10, 2025

In order for the project scope mcp servers to really be useful, it would be great that the config allowed for expanding environment variables.

For instance in a project .mcp.json :

{
  "mcpServers": {
    "mysql_local": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "--with",
        "pymysql",
        "mcp-alchemy"
      ],
      "env": {
        "DB_URL": "mysql+pymysql://$USER@localhost:3306/database"
      }
    }
  }
}

The $USER variable isn't expanding, forcing everyone to install this mcp server locally and rendering it useless as a project mcp.

View original on GitHub ↗

This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗