Skip to content

Reference environment variable in http extension header value #4307

@giacomochiarella

Description

@giacomochiarella

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:

  1. Add a new Goose http extension
  2. Add a new environment variable
  3. Add a new header
  4. Reference the environment variable
  5. enable it
  6. 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

Metadata

Metadata

Labels

p2Priority 2 - Medium

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions