fix: apply --host and --port CLI flags in apply_cli_overrides#1376
Open
Maanik23 wants to merge 1 commit intogetzep:mainfrom
Open
fix: apply --host and --port CLI flags in apply_cli_overrides#1376Maanik23 wants to merge 1 commit intogetzep:mainfrom
Maanik23 wants to merge 1 commit intogetzep:mainfrom
Conversation
The --host and --port flags were parsed by argparse but never applied to the ServerConfig, causing the server to always bind to 0.0.0.0:8000. Added the missing overrides in apply_cli_overrides() and updated tests to verify both the override behavior and default preservation. Fixes getzep#1333
Member
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
danielchalef
added a commit
that referenced
this pull request
Apr 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1333
Summary
The
--hostand--portCLI flags forgraphiti-mcp-serverwere parsed by argparse but never applied to theServerConfig, causing the server to always bind to0.0.0.0:8000regardless of what was passed.Root Cause
apply_cli_overrides()inmcp_server/src/config/schema.pyhandledtransport, LLM, embedder, database, and graphiti overrides but skippedhostandport.Changes
mcp_server/src/config/schema.py: Addedhostandportoverrides inapply_cli_overrides(), placed right after the existingtransportoverride since they're allServerConfigfieldsargs.port is not None(notargs.port) to correctly handle port0as a valid valuemcp_server/tests/test_configuration.py: Added assertions forhostandportoverride, plus a separate test case verifying defaults are preserved when CLI flags are omittedVerification
Test plan
host/portassertionsMinimalArgstest to verify defaults are preserved when flags areNoneport=0edge case is handled correctly (is not Nonevs truthy check)