Skip to content

Tool Pick | ToolHive — Run Every MCP Server in Its Own Isolated Container

Sep 10, 20261 min
TL;DRToolHive is Stacklok's open-source MCP server runtime management platform. Its CLI (thv) or Kubernetes Operator runs every MCP server in an isolated container. Install: brew install stacklok/tap/thv. It addresses the problem of MCP servers running directly on your machine with your machine's own credentials and network access.
Table of Contents
  1. Tool Info
  2. What Problem It Solves
  3. Quick Start
    1. Install
    2. Basic Usage
    3. Advanced Usage
  4. Comparison with Existing Tools
  5. Things to Watch Out For
  6. Today's Takeaway
  7. References

🌏 中文版

Tool Info

FieldValue
NameToolHive
TypeCLI (also ships a Kubernetes Operator)
GitHubstacklok/toolhive
Stars2,152
LanguageGo
LicenseApache-2.0
Installbrew tap stacklok/tap && brew install thv

What Problem It Solves

When you install an MCP server for Claude Code, Cursor, or VS Code, the usual move is to copy the one-liner from the README — an npx or pip install — and just run it. That means the server process inherits your machine's own permissions: it can read your filesystem, reach your network, and touch whatever credentials sit in your environment variables. There's no easy way to know which external hosts it's actually calling, and it's hard to enforce any team-wide control over who installed which MCP server and what that server can touch.

ToolHive drops every MCP server into its own container (via Docker, Podman, or Kubernetes) and launches it with a minimal permission profile that carries no local credentials. If the author never shipped a container image, ToolHive will build one on the fly straight from a package manager (npm, pip, etc.). Wire it to an identity provider (OIDC/OAuth) and it starts enforcing identity and access policy per request, with audit logs to match. The CLI, thv, manages the whole lifecycle — discovering servers, running them, listing status, stopping them.

Good fit for: individual developers who want an isolation boundary around their MCP servers without hand-rolling Docker Compose; platform teams who want a self-hosted, auditable MCP registry and gateway to control which servers a team is allowed to run; and organizations deploying MCP servers at scale on Kubernetes via the Operator, wired into existing identity governance.

Quick Start

Install

# macOS / Linux (Homebrew)
brew tap stacklok/tap
brew install thv

# Verify the install
thv version

Windows users can install via WinGet, or download a pre-compiled binary from the GitHub Release page. Running containerized MCP servers requires Docker, Podman, or Colima to be installed.

Basic Usage

# See what MCP servers are available in the built-in registry
thv registry list

# Inspect one server in detail (what tools it exposes, what config it needs)
thv registry info toolhive-doc-mcp

# Launch that server inside an isolated container
thv run toolhive-doc-mcp

# Confirm what's running and which proxy port it's on
thv list

# Stop it, or remove it entirely, when you're done
thv stop toolhive-doc-mcp
thv rm toolhive-doc-mcp

Advanced Usage

# Have ToolHive auto-configure supported clients (VS Code, Cursor, Claude Code, etc.)
thv client setup
thv client status

# Pin a specific proxy port to avoid conflicts
thv run --proxy-port 8081 toolhive-doc-mcp

# Don't want to run a container? Connect to ToolHive's hosted endpoint instead
thv run toolhive-doc-mcp-remote

Comparison with Existing Tools

ToolHiveManually running npx/pipHand-rolled Docker Compose
Container isolation + minimal permission profile (no local credentials)Partial (you design it yourself)
Built-in curated registry with signing/provenance verification
Auto-configures clients (VS Code/Cursor/Claude Code)
Kubernetes Operator for enterprise-scale deploymentYou build it yourself
Identity/access policy (OIDC/OAuth) + audit logs✅ (requires an IdP)You build it yourself

Things to Watch Out For

  • Requires a container runtime: running containerized servers needs Docker, Podman, or Colima installed. If you'd rather skip that, you're limited to the official -remote variants that connect to ToolHive's hosted endpoints — and not every server has one.
  • Identity governance is the enterprise story: ToolHive Community (open source, free) covers isolation and the basic registry. Wiring in Okta/Entra ID SSO, centralized governance, and hardened production-ready servers is where the paid Stacklok Enterprise tier comes in.
  • The cloud browser UI is retired: the project has marked its browser-based cloud UI as retired, so plan a rollout around the desktop app and the CLI rather than that web surface.

Today's Takeaway

I used to think "is this MCP server safe" was purely a judgment call — read the README, check the issue tracker for complaints, trust your gut. ToolHive turns that into something you can actually verify: safety no longer hinges on how carefully you read the server's source code, but on whether it ever gets a chance to touch your real credentials in the first place. A container boundary and a permission profile downgrade "trusting a stranger's server" from a moral judgment to an engineering configuration.

References