diff --git a/Makefile b/Makefile index 0c6fe49..ad43701 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ dev: @echo "Starting mcnoaa-tides in development mode..." APP_ENV=dev docker compose up -d --build @echo "Docs: https://$(shell grep DOMAIN .env | head -1 | cut -d= -f2)" - @echo "MCP: https://mcp.$(shell grep DOMAIN .env | head -1 | cut -d= -f2)/mcp" + @echo "MCP: https://mcp.$(shell grep DOMAIN .env | head -1 | cut -d= -f2)/" @sleep 2 docker compose logs -f @@ -13,7 +13,7 @@ prod: @echo "Starting mcnoaa-tides in production mode..." APP_ENV=prod docker compose up -d --build @echo "Docs: https://$(shell grep DOMAIN .env | head -1 | cut -d= -f2)" - @echo "MCP: https://mcp.$(shell grep DOMAIN .env | head -1 | cut -d= -f2)/mcp" + @echo "MCP: https://mcp.$(shell grep DOMAIN .env | head -1 | cut -d= -f2)/" @sleep 3 docker compose logs --tail=20 diff --git a/docker-compose.yml b/docker-compose.yml index b12a3d1..8ed9512 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -39,6 +39,7 @@ services: - MCP_TRANSPORT=streamable-http - MCP_HOST=0.0.0.0 - MCP_PORT=8000 + - MCP_PATH=/ networks: - caddy labels: diff --git a/src/mcnoaa_tides/server.py b/src/mcnoaa_tides/server.py index 5e59872..b96d977 100644 --- a/src/mcnoaa_tides/server.py +++ b/src/mcnoaa_tides/server.py @@ -73,6 +73,7 @@ def main(): if transport == "streamable-http": host = os.environ.get("MCP_HOST", "0.0.0.0") port = int(os.environ.get("MCP_PORT", "8000")) - mcp.run(transport="streamable-http", host=host, port=port) + path = os.environ.get("MCP_PATH", "/mcp") + mcp.run(transport="streamable-http", host=host, port=port, path=path) else: mcp.run()