fix(serve): wire --host/--port to FastMCP settings for SSE container reachability (R89-94f)#45
Merged
Merged
Conversation
…-http FastMCP.run() does not accept host/port kwargs; the CLI arguments were parsed but silently dropped → container bound 127.0.0.1:8000 (unreachable externally). Now server.settings.host/port are set before server.run() for network transports. Dockerfile CMD gains --host 0.0.0.0 --port 8000 to expose the container port. Two regression tests added: SSE wires args, stdio does not.
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.
Summary
Root cause (A-proven 2026-05-30):
instinct serve --transport ssebound to127.0.0.1:8000(FastMCP default), making the container unreachable externally → Glama build health check failed.The
--host/--portCLI args were parsed but silently dropped:FastMCP.run()does not accept host/port kwargs; they must be set viaserver.settings.*before callingrun().Changes:
src/instinct/cli.py: wireargs.host→server.settings.hostandargs.port→server.settings.portforsse/streamable-httptransports (not stdio, which has no network socket)Dockerfile: CMD gains--host 0.0.0.0 --port 8000(aligns withEXPOSE 8000)tests/test_cli_extended.py: two regression tests — SSE wires settings, stdio does notNote: Phase 1 (namespace metadata yakuphanycl→WRG-11) and Phase 2 (server.json) were already completed in upstream commits. This PR is Phase 3 only.
Operator-gated follow-ups
io.github.WRG-11/instinct(server.json already updated upstream; needs operator OAuth)Test plan
pytest tests/ -q→ 185 passedruff check src/instinct/cli.py tests/test_cli_extended.py→ cleandocker build && docker run -p 8001:8000→ log shows0.0.0.0:8000not127.0.0.1:8000+curl http://127.0.0.1:8001/sse200/SSE-stream