-
Notifications
You must be signed in to change notification settings - Fork 155
[fix] translate bare ${VAR} env-var refs in self-defined MCP server headers (#944) #947
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
Changes from all commits
c24411c
c6b27a1
eb06151
67e5590
b442256
5e687cf
e97fdf5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -155,6 +155,13 @@ dependencies: | |||||||||||||||||||||||||
| package: npm # npm|pypi|oci | ||||||||||||||||||||||||||
| headers: | ||||||||||||||||||||||||||
| X-Custom: "value" | ||||||||||||||||||||||||||
| # Env-var placeholders in headers/env values: | ||||||||||||||||||||||||||
| # ${VAR} or ${env:VAR} -> resolved from host env at install time | ||||||||||||||||||||||||||
| # by Copilot (VS Code resolves at runtime; | ||||||||||||||||||||||||||
| # Codex passes ${...} through unchanged) | ||||||||||||||||||||||||||
| # ${input:<id>} -> VS Code prompts user at runtime | ||||||||||||||||||||||||||
| # <VAR> -> legacy Copilot syntax (still supported) | ||||||||||||||||||||||||||
| Authorization: "Bearer ${MY_TOKEN}" | ||||||||||||||||||||||||||
|
Comment on lines
+158
to
+164
|
||||||||||||||||||||||||||
| # Env-var placeholders in headers/env values: | |
| # ${VAR} or ${env:VAR} -> resolved from host env (Copilot/Codex bake | |
| # in at install; VS Code resolves at runtime) | |
| # ${input:<id>} -> VS Code prompts user at runtime | |
| # <VAR> -> legacy Copilot syntax (still supported) | |
| Authorization: "Bearer ${MY_TOKEN}" | |
| # Placeholder support in headers/env values varies by client: | |
| # ${VAR} or ${env:VAR} -> VS Code-style placeholders | |
| # ${input:<id>} -> VS Code prompts user at runtime | |
| # <VAR> -> legacy Copilot/Codex env placeholder | |
| # Use <VAR> for Codex; do not assume ${...} is resolved there. | |
| Authorization: "Bearer <MY_TOKEN>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section states that "Copilot CLI / Codex" resolve
${VAR}and${env:VAR}at install time. In the current code, CodexClientAdapter only handles the legacy<VAR>placeholder (and does not handle remote headers at all), so${VAR}/${env:VAR}are not actually supported/resolved for Codex. Please either adjust the docs to match current Codex behavior, or extend the Codex adapter to resolve the new${...}syntaxes as described here.