fix: apply --host and --port CLI flags in apply_cli_overrides - #1376
Merged
Conversation
Member
|
All contributors have signed the CLA ✍️ ✅ |
Contributor
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
Maanik23
force-pushed
the
fix/cli-host-port-flags
branch
2 times, most recently
from
April 25, 2026 12:12
f9d5ce5 to
f0ebd29
Compare
Maanik23
force-pushed
the
fix/cli-host-port-flags
branch
from
May 7, 2026 13:31
f0ebd29 to
e07a126
Compare
danielchalef
force-pushed
the
fix/cli-host-port-flags
branch
from
June 7, 2026 00:31
e07a126 to
1df3c9f
Compare
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
danielchalef
force-pushed
the
fix/cli-host-port-flags
branch
from
June 8, 2026 01:46
1df3c9f to
c1e358a
Compare
Member
|
Rebased onto current |
danielchalef
had a problem deploying
to
development
June 8, 2026 01:54 — with
GitHub Actions
Failure
danielchalef
added a commit
that referenced
this pull request
Jun 8, 2026
The live MCP test self-skips when prerequisites are absent — notably on fork PRs, which get no OPENAI_API_KEY (environment secret), and when FalkorDB is unreachable. pytest then collects 0 tests and exits 5, which GitHub marks as a failed check (seen on fork PR #1376). Wrap the run so exit 5 is treated as success; a real failure (exit 1) still fails the job. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
danielchalef
approved these changes
Jun 8, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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)