-
Notifications
You must be signed in to change notification settings - Fork 38
Fix MCP gateway startup by extracting HTTP MCP server environment variables #10925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Extracts secrets from HTTP MCP servers (like Tavily) and adds them to the Start MCP gateway step's environment. This resolves the gateway startup failure caused by missing TAVILY_API_KEY environment variable. Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Tests verify that secrets from HTTP MCP server headers are correctly extracted and added to the Start MCP gateway step environment. Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix MCP gateway startup failures in Daily News workflow
Fix MCP gateway startup by extracting HTTP MCP server environment variables
Jan 21, 2026
Contributor
|
@copilot forma, lint |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot stopped work on behalf of
pelikhan due to an error
January 21, 2026 00:34
Contributor
|
@copilot merge main, format, lint go, fix tests |
Copilot stopped work on behalf of
pelikhan due to an error
January 21, 2026 00:50
Contributor
|
@copilot merge main, format lint |
Copilot stopped work on behalf of
pelikhan due to an error
January 21, 2026 03:28
Contributor
|
@copilot merge main, format lint |
Copilot stopped work on behalf of
pelikhan due to an error
January 21, 2026 05:00
Contributor
|
@copilot merge main, format, lint |
Copilot stopped work on behalf of
pelikhan due to an error
January 21, 2026 05:08
Contributor
|
@copilot merge main, format, lint |
Copilot stopped work on behalf of
pelikhan due to an error
January 21, 2026 05:15
Contributor
|
@copilot merge main, format, lint |
Contributor
|
@copilot merge main, format, lint |
Copilot stopped work on behalf of
pelikhan due to an error
January 21, 2026 12:35
|
@copilot - explain what we did in this PR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Daily News workflow failing at Step 31 (Start MCP gateway) with configuration error:
TAVILY_API_KEYenvironment variable undefined despite being referenced in the Tavily MCP server configuration.Root Cause
The compiler's
collectMCPEnvironmentVariablesfunction only collected environment variables for known tools (github, playwright, safe-outputs, etc.) but skipped custom HTTP MCP servers from imports.When the gateway starts, it validates the MCP configuration and resolves
${VAR}references. If a variable is missing from the step environment, startup fails.Changes
Compiler (
pkg/workflow/mcp_servers.go)collectMCPEnvironmentVariablesto iterate through all tools and extract secrets from HTTP MCP server headersExtractSecretsFromMapto parse${{ secrets.* }}expressionsenvsections for future HTTP MCP server supportExample: For this MCP server configuration:
The compiler now adds to the "Start MCP gateway" step:
Workflow Lock File
daily-news.lock.ymlwith TAVILY_API_KEY now in gateway startup environmentTests
http_mcp_env_vars_test.gocovering single/multiple HTTP MCP servers with/without secretsOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.