mirror of
https://github.com/open-webui/mcpo.git
synced 2026-11-05 01:27:39 +00:00
[GH-ISSUE #111] feat: Environment / EnvironmentFile / config file secrets configuration #50
Labels
No labels
bug
can't reproduce
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/mcpo#50
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zacharyweiss on GitHub (May 1, 2025).
Original GitHub issue: https://github.com/open-webui/mcpo/issues/111
Check Existing Issues
Problem Description
The current configuration approach, passing the API key as a CLI argument, makes it tricky to avoid leaking one's secret — through shell history, or through any declarative deployment approach.
Desired Solution you'd like
Allowing the API key to be set by an environment variable or a configuration file would fix this, and make MCPO more flexibly / easily deployed.
The environment, and optional environment file(s) are already loaded in:
github.com/open-webui/mcpo@e37d0ebd27/src/mcpo/init.py#L88-L104One would simply need to add some quick logic to check the environment for the appropriate var(s) and set them before running:
github.com/open-webui/mcpo@e37d0ebd27/src/mcpo/init.py#L117-L135Alternatives Considered
A dedicated argument could be added for providing a path to a password file just for the API key, or for setting all the other CLI args declaratively. To me, this seems to add unnecessary complexity when you already load the environment, and setting such secrets via the environment is a commonplace practice.
Additional Context
While the fix itself simple, it begs a few design and generalization questions first (else I would simply PR rather than opening an issue).