{"version":"1.0.120","anchor":"mcp-dynamic-header-generation-with-headershelper","canonical_anchor":"mcp-dynamic-header-generation-with-headershelper","heading":"MCP Dynamic Header Generation with headersHelper","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/1.0.120\/e\/mcp-dynamic-header-generation-with-headershelper","release_url":"https:\/\/changelogs.core-directive.com\/v\/1.0.120","markdown":"### MCP Dynamic Header Generation with headersHelper\n\n**What:** MCP server configurations can now specify a shell command that generates HTTP headers dynamically at runtime, enabling secure credential management and token rotation.\n\n**How to use:**\n\n`{ \"mcpServers\": { \"my-api\": { \"transport\": { \"type\": \"sse\", \"url\": \"https:\/\/api.example.com\/sse\", \"headers\": { \"X-Static-Header\": \"value\" }, \"headersHelper\": \"~\/scripts\/get-auth-token.sh\" } } } }` **Details:**\n\n- The `headersHelper` command must output valid JSON with string key-value pairs\n- Dynamic headers override static headers (merge strategy: `{...static, ...dynamic}`)\n- Includes workspace trust security checks for project\/local-scoped servers at `Xo6()` at line 393477\n- Comprehensive validation ensures proper JSON format and string values\n- Errors are logged with telemetry event `tengu_mcp_headersHelper_missing_trust`\n- Use cases: fetching tokens from credential managers, generating time-based auth, reading secrets from environment-specific sources\n\n**Evidence**\n\n`Xo6()` function at line 393477, `uw0()` merge function at line 393531, schema definitions at lines 353050-353074"}