feat: HTTP transport env vars, Dockerfile defaults, compose service#32
Merged
Conversation
ServerConfig doesn't exist yet — these tests define the contract for PMMCP_TRANSPORT, PMMCP_HOST, PMMCP_PORT env var configuration.
Env vars (PMMCP_TRANSPORT, PMMCP_HOST, PMMCP_PORT) can now configure transport mode without CLI flags — needed for Dockerfile/compose.
CLI flags now fall back to PMMCP_TRANSPORT/HOST/PORT env vars via ServerConfig, so Dockerfile/compose can configure transport without CLI args.
Fix mcp.run() call — host/port must be set on mcp.settings, not passed to run(). Healthcheck now handles pre-session state (returns 503 "starting" when no MCP session has connected yet in HTTP mode).
Container now defaults to streamable-http on 0.0.0.0:8080 so it works out of the box with compose and k8s without extra args.
Full stack now includes pmmcp on port 8080 with healthcheck, connected to pmproxy via internal compose network.
Replaces inline --timeout hint with full reference table covering all CLI flags, env vars, and HTTP transport examples.
"Starting" (no MCP session yet) is not unhealthy — the HTTP transport is up and ready. Returning 200 lets compose --wait pass correctly. Also: just e2e now uses --wait to match CI, pre-push-sanity always runs e2e instead of silently skipping when PMPROXY_URL is unset.
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
Closes #5.
Changes
ServerConfiginconfig.py—pydantic-settingsmodel withPMMCP_TRANSPORT,PMMCP_HOST,PMMCP_PORTenv vars (precedence: CLI > env > default)__main__.py— argparse defaults wired toServerConfig; fixed latent bug wheremcp.run()was passedhost/portkwargs it doesn't accept (must usemcp.settings){"status": "starting"}instead of crashing when no MCP session has connected)EXPOSE 8080+ CMD defaults to--transport streamable-http --host 0.0.0.0 --port 8080pmmcpservice on port 8080 wired to pcp backend with healthcheckTest plan
ServerConfig: defaults, env overrides, invalid transport rejected, constructor overrides env__main__.pywiring: env var picked up as argparse default/healthcheck, verifies 503 + JSONPMPROXY_URLset)podman compose up -d && curl localhost:8080/healthcheck