Skip to content

allow --port=8000 to apply as override#33

Open
AlbertDeFusco wants to merge 2 commits intodatalayer:mainfrom
AlbertDeFusco:port-flag
Open

allow --port=8000 to apply as override#33
AlbertDeFusco wants to merge 2 commits intodatalayer:mainfrom
AlbertDeFusco:port-flag

Conversation

@AlbertDeFusco
Copy link
Copy Markdown
Contributor

I found out that when --port=8000 was explicitly provided on the CLI it would not override the mcp-compose.toml configuration but any other value would.

This PR helps declare that when no --port flag is passed the mcp-compose.toml is used otherwise set the port to 8000. But when --port is passed it has the highest priority.

Here's an example of the case today with version 0.1.11

no port override

❯ mcp-compose serve -c examples/proxy-streamable-http/mcp_compose.toml
...
======================================================================
📡 MCP Server Mode: STREAMABLE-HTTP
======================================================================
  MCP Endpoint:  http://localhost:8888/mcp
  Tools List:    http://localhost:8888/tools
  REST API:      http://localhost:8888/api/v1
  Health Check:  http://localhost:8888/api/v1/health
  Web UI:        http://localhost:9456/ui

with port=8000 override

the mcp endpoint is still on 8888

❯ mcp-compose serve -c examples/proxy-streamable-http/mcp_compose.toml --port 8000
======================================================================
📡 MCP Server Mode: STREAMABLE-HTTP
======================================================================
  MCP Endpoint:  http://localhost:8888/mcp
  Tools List:    http://localhost:8888/tools
  REST API:      http://localhost:8888/api/v1
  Health Check:  http://localhost:8888/api/v1/health
  Web UI:        http://localhost:9456/ui

@echarles
Copy link
Copy Markdown
Member

strange, relauched the test for python 3.11 on ubuntu and failing twice with the same error

https://github.com/datalayer/mcp-compose/actions/runs/25073240867/job/73466337908?pr=33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants