Bug: GAGGIMATE_GAGGIMATE_HOST — duplicated env prefix prevents .env from being read
Description
The GaggimateConfig class in config.py uses env_prefix="GAGGIMATE_" via SettingsConfigDict, but the field is named gaggimate_host. pydantic-settings constructs the environment variable name by combining the prefix with the field name, resulting in GAGGIMATE_GAGGIMATE_HOST — a duplicated prefix.
This means the documented/intuitive variable name GAGGIMATE_HOST is silently ignored, and the server always falls back to the default value gaggimate.local regardless of what's set in .env.
Steps to reproduce
- Set
GAGGIMATE_HOST=<your-ip> in .env
- Start the MCP server
- The server connects to
gaggimate.local instead of the configured IP
Root cause
In src/gaggimate_mcp/config.py:
class GaggimateConfig(BaseSettings):
model_config = SettingsConfigDict(
env_prefix="GAGGIMATE_", # prefix added automatically
...
)
gaggimate_host: str = "gaggimate.local" # results in GAGGIMATE_GAGGIMATE_HOST
pydantic-settings resolves this field to GAGGIMATE_GAGGIMATE_HOST, not GAGGIMATE_HOST.
Suggested fix
Rename the field to remove the redundant prefix:
host: str = "gaggimate.local" # resolves correctly to GAGGIMATE_HOST
And update the host property accordingly (or remove it if the field is already named host).
Workaround
Until fixed, use GAGGIMATE_GAGGIMATE_HOST=<your-ip> in .env.
Environment
- gaggimate-mcp version: 1.26.0
- Python via
uv run
- macOS
Bug:
GAGGIMATE_GAGGIMATE_HOST— duplicated env prefix prevents.envfrom being readDescription
The
GaggimateConfigclass inconfig.pyusesenv_prefix="GAGGIMATE_"viaSettingsConfigDict, but the field is namedgaggimate_host. pydantic-settings constructs the environment variable name by combining the prefix with the field name, resulting inGAGGIMATE_GAGGIMATE_HOST— a duplicated prefix.This means the documented/intuitive variable name
GAGGIMATE_HOSTis silently ignored, and the server always falls back to the default valuegaggimate.localregardless of what's set in.env.Steps to reproduce
GAGGIMATE_HOST=<your-ip>in.envgaggimate.localinstead of the configured IPRoot cause
In
src/gaggimate_mcp/config.py:pydantic-settings resolves this field to
GAGGIMATE_GAGGIMATE_HOST, notGAGGIMATE_HOST.Suggested fix
Rename the field to remove the redundant prefix:
And update the
hostproperty accordingly (or remove it if the field is already namedhost).Workaround
Until fixed, use
GAGGIMATE_GAGGIMATE_HOST=<your-ip>in.env.Environment
uv run