-
Notifications
You must be signed in to change notification settings - Fork 122
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug description
In the ToolHive CLI, you can run the same MCP server from the registry twice, resulting in a broken workload.
Steps to reproduce
thv run fetch
thv list
Observe the MCP starts OK. Then run the same command:
thv run fetch
thv list -a
The CLI does not block the second attempt to start the workload with the auto-generated name of "fetch", and instead the existing server is broken, and stuck in "starting" state.
Expected behavior
When you explicitly use the --name
parameter, thv stops you.
$ thv run fetch
$ thv run --name fetch fetch
Error: workload with name 'fetch' already exists
The same thing should happen with auto-generated names.
Actual behavior
thv attempts to start a second instance of fetch
even though it already exists.
After the second thv run fetch
command, thv list -a
shows:
thv list -a
NAME PACKAGE STATUS URL PORT TOOL TYPE GROUP CREATED AT
fetch ghcr.io/stackloklabs/gofetch/server:0.0.5 starting http://127.0.0.1:27018/mcp 27018 mcp default 2025-09-03 12:08:32.961647 -0400 EDT
And the log file at ~/Library/Application Support/toolhive/logs/fetch.log
shows:
12:08PM INFO Container fetch and proxy are already running
Workload fetch restarted successfully
Running thv restart fetch
does bring it back into a healthy state.
Environment (if relevant)
- OS/version: macOS, Docker Desktop
- ToolHive version: v0.2.15
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working