Skip to content

feat: support multiple database hosts via DATABASES__N__* env vars#5

Merged
davidgilady merged 2 commits intomainfrom
david.g/support_multiple_hosts
Feb 24, 2026
Merged

feat: support multiple database hosts via DATABASES__N__* env vars#5
davidgilady merged 2 commits intomainfrom
david.g/support_multiple_hosts

Conversation

@davidgilady
Copy link
Owner

Add HostConfig dataclass and multi-host configuration support. Hosts are configured with DATABASES__N__HOST, DATABASES__N__PORT, DATABASES__N__USERNAME, DATABASES__N__PASSWORD environment variables.

All MCP tools now accept an optional 'host' parameter to target a specific host. When omitted, the single configured host is used; when multiple hosts exist, the server returns a clear error.

Legacy single-host configuration (DATABASE_HOST, CLI args) remains fully backward compatible.

Add HostConfig dataclass and multi-host configuration support.
Hosts are configured with DATABASES__N__HOST, DATABASES__N__PORT,
DATABASES__N__USERNAME, DATABASES__N__PASSWORD environment variables.

All MCP tools now accept an optional 'host' parameter to target a
specific host. When omitted, the single configured host is used;
when multiple hosts exist, the server returns a clear error.

Legacy single-host configuration (DATABASE_HOST, CLI args) remains
fully backward compatible.
@davidgilady davidgilady merged commit e055228 into main Feb 24, 2026
1 check passed
@davidgilady davidgilady deleted the david.g/support_multiple_hosts branch February 24, 2026 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant