stacklok / stacklok/toolhive

Client isn't updated if container is stopped outside of ToolHive

Open
#965 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
2.2k
Forks
300
Avg merge
1d 15h
Merged PRs (30d)
184

Description

When running an MCP server using ToolHive with Docker
If I stop the Docker container using Docker, outside of ToolHive
Then ToolHive shows that the container is stopped
But it doesn't update the registered clients configuration to remove the server

Below is where we check the health of the container. We should see if it's possible to reuse the StopWorkloads logic here, in order to remove the MCP Server from the client configuration.

https://github.com/stacklok/toolhive/blob/935374004343038216d384e01103f9681d5b29e0/pkg/transport/proxy/transparent/transparent_proxy.go#L150-L173

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in pkg/transport/proxy/transparent/transparent_proxy.go at lines 150-173, where container health is checked, and compare that flow with the StopWorkloads logic referenced in the issue. Determine whether that logic can be reused when Docker stops a container externally; done means ToolHive removes the stopped MCP server from registered client configurations.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
backend, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.