You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compose tools hardcode the default stack file list #88
When stacks is omitted, the four compose tools fall back to a hardcoded list of seven compose.*.yml file names. Only HOMELAB_COMPOSE_DIR can be changed. Anyone whose layout differs from that exact list gets failures on the default path of the core tools.
Where
mcp-server/src/tools/composeUp.ts:7,33
mcp-server/src/tools/composeDown.ts:7,38
mcp-server/src/tools/composePull.ts:6,25-29
mcp-server/src/tools/composePs.ts:5,15
Details
Each of the four files defines its own copy of COMPOSE_DIR and of the default stack list (compose.base.yml plus six others).
Impact
Users with other file names, fewer stacks, or a single docker-compose.yml get "no such file" errors from composeUp, composeDown, composePull, and composePs unless they pass stacks on every call.
Suggested fix
Add HOMELAB_COMPOSE_FILES (a comma-separated list).
When it is unset, discover the files with ls compose*.yml in the compose dir, keeping compose.base.yml first if it exists.
Put this in one shared helper used by all four tools.
Document the variable in .env.example and mcp-server/README.md.
Acceptance criteria
The default stack list comes from the env var or discovery, not a literal
One shared helper is used by all four compose tools
The env var is documented
Tests cover the env override and the discovery fallback
Getting started
Relevant files: the four compose tool files, mcp-server/README.md, .env.example
How to run tests: cd mcp-server && npm test
Filed by repo-audit/full-audit at 9cfe5e3. Severity: high. Effort: S. audit-key: enhancement|mcp-server/src/tools/composePull.ts|stacks default list
Activity