Skip to content

Bug: GAGGIMATE_GAGGIMATE_HOST — duplicated env prefix prevents .env from being read #12

Description

@lflondonol92

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

  1. Set GAGGIMATE_HOST=<your-ip> in .env
  2. Start the MCP server
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions