File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -262,11 +262,8 @@ async def get_tool_details(server: str, tool_name: str) -> str:
262262 sys .exit (1 )
263263
264264 # Check if running in container (ToolHive will manage thv serve)
265- # If TOOLHIVE_HOST is set or RUNNING_IN_DOCKER=1, we're in container mode
266- in_container = (
267- os .environ .get ("TOOLHIVE_HOST" ) is not None
268- or os .environ .get ("RUNNING_IN_DOCKER" ) == "1"
269- )
265+ # If TOOLHIVE_HOST is set, we're in container mode and shouldn't start thv serve
266+ in_container = os .environ .get ("TOOLHIVE_HOST" ) is not None
270267
271268 if not in_container :
272269 # Local development mode: Initialize ToolHive client - starts thv serve and lists workloads
@@ -309,7 +306,7 @@ async def get_tool_details(server: str, tool_name: str) -> str:
309306
310307 if "--host" not in sys .argv :
311308 mcp_host_env = os .environ .get ("MCP_HOST" )
312- if mcp_host_env :
309+ if mcp_host_env and not in_container :
313310 host = mcp_host_env
314311
315312 if transport == "stdio" :
You can’t perform that action at this time.
0 commit comments