Reference environment variable in http extension header value
Describe the bug I'm not sure if this is a bug. I would expect so just because otherwise it does not make any sense in my head to have environment variables in http extensions. It looks impossible to reference an environment variable in an header value in http extension I want to be able to add an environment variable (which could be a secret), let's name it MY_VAR, and then add a new header with MY_VAR referenced in the value of the header like $MY_VAR or ${MY_VAR} or {{MY_VAR}} or %MY_VAR%. I've tried all of the above and none worked.
To Reproduce Steps to reproduce the behavior:
- Add a new Goose http extension
- Add a new environment variable
- Add a new header
- Reference the environment variable
- enable it
- add a log into your mcp serverthe log will print the variable name instead of the variable value
Expected behavior I expect the environment variable name is resolved in the header value when referenced
Please provide following information:
- OS & Arch: Mac OS Sequoia
- Version: 1.6.0
- Provider & Model: Google - gemini-2.5-flash
I've just noticed environment variable resolution does not work also in the endpoint field. I tried this url http://127.0.0.1:11000/mcp?par1=$MY_VAR and what I get in the mcp server is the string $MY_VAR, not the actual value stored in MY_VAR env var
@amed-xyz - does this seem reasonable?
I think this can be split into a bug and a feature:
- Bug: while one can specify
ENVvariables in the UI forHTTPextensions, they're actually never used. We actually don't have a known use case for that yet, so we should remove it from the UI since it's misleading. - Feature: we don't support variable interpolation on either of
HTTP,ENVorURL. I suspect mainly because we haven't seen a use case yet, but could make sense supporting it.
@amed-xyz if I want to add a token in the url (like an api key) currently I need to set it up in the url as plain string, instead, env var would hide the value (as far as I saw env var values are hidden once they are set)