Skip to content

MCPRemoteProxy in Kubernetes fails to Initialize when transport != stdio #4293

@snorlaX-sleeps

Description

@snorlaX-sleeps

Bug description

The MCPRemoteProxy runs the proxyrunner container to proxy connections to a upstream MCP server.
The proxyrunner container will always fail to initialise as it is trying to connect to localhost, it does not attempt to connect to the upstream remoteURL but will use the configured port.

Flow:

The remoteURL is setup and configured here but the value is then not used or overwritten to generate the serverURL.

Steps to reproduce

Deploy a MCPRemoteProxy with streamable-http in Kubernetes using the Operator (mine was using ghcr.io/stacklok/toolhive/proxyrunner:v0.12.2)
e.g Deploy a Github MCPRemoteProxy

Expected behavior

When the container is initialising it should be initialising with the upstream MCP server

Actual behavior

When the container is initialising it is hardcoded to contact localhost

Environment (if relevant)

  • ToolHive version: v0.12.2 of the Operator and associated CRDs

Additional context

Unsure if this intended functionality but it will always error out after 5mins. This does not affect the MCPRemoteProxy functionality, as far as can be told.

Logs:

{"time":"2026-03-19T18:37:49Z","level":"INFO","msg":"Successfully loaded configuration from /etc/runconfig/runconfig.json"}
{"time":"2026-03-19T18:37:49Z","level":"INFO","msg":"auto-discovered and loaded configuration from runconfig.json file"}
{"time":"2026-03-19T18:37:49Z","level":"WARN","msg":"Secret manager not available, OAuth tokens will not be persisted","error":"secrets provider not configured. Please run 'thv secret setup' to configure a secrets provider first"}
{"time":"2026-03-19T18:37:49Z","level":"INFO","msg":"Waiting for MCP server to be ready","endpoint":"http://localhost:8081/mcp","timeout":300000000000}
...
{"time":"2026-03-19T18:42:50Z","level":"WARN","msg":"initialize not successful, but continuing","error":"initialize not successful after 5m1.300990965s (155 attempts)"}
Workload started successfully. Press Ctrl+C to stop.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions