Install and manage ToolHive
This guide walks you through installing, upgrading, and managing the ToolHive
CLI (thv
).
Prerequisites
Before installing ToolHive, make sure your system meets these requirements:
- Operating systems: macOS, Linux, or Windows
- Container runtime: Docker or Podman
ToolHive requires minimal CPU, memory, and disk space. The exact requirements depend on how many MCP servers you run and what resources they use.
Install ToolHive
You can install ToolHive using several methods:
- Homebrew (macOS)
- Pre-compiled binaries
- Build from source
If you use Homebrew on macOS, this is the easiest installation method:
brew tap stacklok/tap
brew install thv
-
Visit the ToolHive releases page
-
Download the appropriate binary for your platform:
toolhive_<version>_darwin_amd64.tar.gz
for macOS (Intel)toolhive_<version>_darwin_arm64.tar.gz
for macOS (Apple Silicon)toolhive_<version>_linux_amd64.tar.gz
for Linux (x86_64)toolhive_<version>_linux_arm64.tar.gz
for Linux (ARM64)toolhive_<version>_windows_amd64.zip
for Windows (x86_64)toolhive_<version>_windows_arm64.zip
for Linux (ARM64)
-
Extract the archive and copy the binary to a directory in your PATH:
macOS/Linux:
tar -xzf toolhive_<version>_<platform>.tar.gz
sudo mv thv /usr/local/bin/
sudo chmod +x /usr/local/bin/thvOn Windows, extract the ZIP file to a folder and add that folder to your PATH environment variable.
Prerequisites for building from source
- Go 1.24 or newer
- Git
- Your
$GOPATH/bin
directory should be in your PATH
Using Task (recommended)
The Task scripts currently only support macOS and Linux. Windows users should use the pre-compiled binaries or build from source using Go tools.
If you have Task installed:
-
Clone the repository:
git clone https://github.com/stacklok/toolhive.git
cd toolhive -
Build and install the binary in your
$GOPATH/bin
:task install
Using Go tools
-
Clone the repository:
git clone https://github.com/stacklok/toolhive.git
cd toolhive -
Build and install the binary in your
$GOPATH/bin
:go install ./cmd/thv
Verify your installation
To verify that ToolHive is installed correctly:
thv version
You should see output showing the version number, build date, and Git commit:
ToolHive v0.0.33
Commit: e8efa1b1d7b0776a39339257d30bf6c4a171f2b8
Built: 2025-05-12 14:31:06 UTC
Go version: go1.24.1
Platform: darwin/arm64
Upgrade ToolHive
ToolHive automatically checks for updates and notifies you when a new version is available. When you run a ToolHive command, it displays a message if an update exists.
To upgrade ToolHive:
- Homebrew (macOS)
- Pre-compiled binaries
- Build from source
If you installed ToolHive via Homebrew, upgrade it with:
brew upgrade thv
Follow the same steps as the initial installation, downloading the latest release and overwriting the previous binary.
Get help with ToolHive commands
ToolHive has built-in help for all commands:
# General help
thv --help
# Help for a specific command
thv <command> --help
For detailed documentation on each command, see the CLI reference documentation.
Enable shell completion
ToolHive can generate auto-completion scripts for your shell to make it easier
to use. The thv completion
command generates scripts for bash, zsh, fish, and
PowerShell.
Each shell has different requirements for where to store completion scripts and how to enable them. The help output for each shell provides specific instructions:
# Get help on completion options
thv completion --help
# Get specific instructions for your shell
thv completion bash --help
thv completion zsh --help
thv completion fish --help
thv completion powershell --help
Uninstall ToolHive
To uninstall ToolHive:
-
First, remove any MCP servers managed by ToolHive:
# List running servers
thv list
# Stop and remove each server
thv stop <server-name>
thv rm <server-name> -
Remove all ToolHive configuration and log files:
# Remove the secrets encryption password entry from your OS keyring
thv secret reset-keyring
# Delete the ToolHive configuration and log files
# macOS:
rm -rf ~/Library/Application\ Support/toolhive/
# Linux:
rm -rf ~/.config/toolhive/ -
Remove the ToolHive CLI:
- Homebrew (macOS)
- Pre-compiled binaries
- Build from source
If you installed ToolHive via Homebrew, uninstall it with:
brew uninstall thv
Delete the binary from your PATH:
sudo rm /usr/local/bin/thv
Remove the binary from your $GOPATH
:
rm $(go env GOPATH)/bin/thv
Troubleshooting
Permission denied errors
If you see "permission denied" errors when running ToolHive:
-
Make sure the binary is executable:
chmod +x /path/to/thv
-
If using Docker on Linux, make sure your user has permission to access the Docker socket:
sudo usermod -aG docker $USER
(Log out and back in or run
newgrp docker
for this to take effect)See Docker documentation for more details.
Other issues
For other installation issues, check the GitHub issues page or join the Discord community.
Next steps
Now that you have ToolHive installed, you can start using it to run and manage MCP servers. See Explore the registry and Run MCP servers to get started.