{"version":"2.1.219","anchor":"mcp-allow-deny-rules-compare-expanded-env-var-values","canonical_anchor":"mcp-allow-deny-rules-compare-expanded-env-var-values","heading":"MCP allow\/deny rules compare expanded env-var values","tier":"notice","area":"MCP","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.219\/e\/mcp-allow-deny-rules-compare-expanded-env-var-values","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.219","markdown":"### MCP allow\/deny rules compare expanded env-var values\n\nYour MCP allow and deny rules now match servers whose commands or URLs use environment variables.\n\n**What**\n\nMatching a server against `allowedMcpServers` and `deniedMcpServers` now expands environment-variable references in the configured command and URL before comparing, so rules match what actually runs rather than the literal template.\n\n**Details**\n\n- The deny path uses a fallback env when expansion needs one.\n- An allow-rule URL whose expansion is flagged `unsafeExpansion` is skipped rather than treated as a match.\n- A separate new validator flags untrimmed whitespace in MCP config `command`, `url`, `args`, and env\/header names and values.\n\n**Evidence**\n\n`unsafeExpansion`\n\n- Area: MCP\n- Names: `allowedMcpServers`, `deniedMcpServers`\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 0\/5"}