Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/toolhive/guides-cli/manage-mcp-servers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ Add the `--all` flag to stop all running servers.

### Restart a server

To restart a stopped MCP server and add it back to your configured clients:
To start a stopped MCP server and add it back to your configured clients:

```bash
thv restart <SERVER_NAME>
thv start <SERVER_NAME>
```

For remote servers, restarting will:
Expand All @@ -106,10 +106,10 @@ For remote servers, restarting will:
2. Re-establish connection to the remote server
3. Re-authenticate with the remote server (triggers new OAuth flow)

Add the `--group` flag to restart all servers in a specific group:
Add the `--group` flag to start all servers in a specific group:

```bash
thv restart --group <GROUP_NAME>
thv start --group <GROUP_NAME>
```

### Remove a server
Expand Down Expand Up @@ -142,11 +142,11 @@ won't clean up the MCP server's entry in your configured clients. Use
### Remote server authentication

Remote servers with OAuth authentication will automatically refresh tokens when
they expire during normal operation. However, restarting a remote server always
they expire during normal operation. However, starting a remote server always
triggers a new OAuth authentication flow:

```bash
thv restart <REMOTE_SERVER_NAME>
thv start <REMOTE_SERVER_NAME>
```

This will always prompt for re-authentication, even if valid tokens exist.
Expand All @@ -156,6 +156,6 @@ This will always prompt for re-authentication, even if valid tokens exist.
- [`thv list` command reference](../reference/cli/thv_list.md)
- [`thv logs` command reference](../reference/cli/thv_logs.md)
- [`thv stop` command reference](../reference/cli/thv_stop.md)
- [`thv restart` command reference](../reference/cli/thv_restart.md)
- [`thv start` command reference](../reference/cli/thv_start.md)
- [`thv rm` command reference](../reference/cli/thv_rm.md)
- [Monitor with OpenTelemetry](../guides-cli/telemetry-and-metrics.mdx)
2 changes: 1 addition & 1 deletion docs/toolhive/reference/cli/thv.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ thv [flags]
* [thv mcp](thv_mcp.md) - Interact with MCP servers for debugging
* [thv proxy](thv_proxy.md) - Create a transparent proxy for an MCP server with authentication support
* [thv registry](thv_registry.md) - Manage MCP server registry
* [thv restart](thv_restart.md) - Restart a tooling server
* [thv rm](thv_rm.md) - Remove one or more MCP servers
* [thv run](thv_run.md) - Run an MCP server
* [thv runtime](thv_runtime.md) - Commands related to the container runtime
* [thv search](thv_search.md) - Search for MCP servers
* [thv secret](thv_secret.md) - Manage secrets
* [thv serve](thv_serve.md) - Start the ToolHive API server
* [thv start](thv_start.md) - Start (resume) a tooling server
* [thv stop](thv_stop.md) - Stop one or more MCP servers
* [thv version](thv_version.md) - Show the version of ToolHive

16 changes: 16 additions & 0 deletions docs/toolhive/reference/cli/thv_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@ List running MCP servers

List all MCP servers managed by ToolHive, including their status and configuration.

Examples:
# List running MCP servers
thv list

# List all MCP servers (including stopped)
thv list --all

# List servers in JSON format
thv list --format json

# List servers in a specific group
thv list --group production

# List servers with specific labels
thv list --label env=dev --label team=backend

```
thv list [flags]
```
Expand Down
13 changes: 13 additions & 0 deletions docs/toolhive/reference/cli/thv_logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ Output the logs of an MCP server managed by ToolHive, or manage log files.
By default, this command shows the logs from the MCP server container.
Use --proxy to view the logs from the ToolHive proxy process instead.

Examples:
# View logs of an MCP server
thv logs filesystem

# Follow logs in real-time
thv logs filesystem --follow

# View proxy logs instead of container logs
thv logs filesystem --proxy

# Clean up old log files
thv logs prune

```
thv logs [workload-name|prune] [flags]
```
Expand Down
14 changes: 13 additions & 1 deletion docs/toolhive/reference/cli/thv_rm.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,19 @@ Remove one or more MCP servers

### Synopsis

Remove one or more MCP servers managed by ToolHive.
Remove one or more MCP servers managed by ToolHive.
Examples:
# Remove a single MCP server
thv rm filesystem

# Remove multiple MCP servers
thv rm filesystem github slack

# Remove all workloads
thv rm --all

# Remove all workloads in a group
thv rm --group production

```
thv rm [workload-name...] [flags]
Expand Down
24 changes: 24 additions & 0 deletions docs/toolhive/reference/cli/thv_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,30 @@ You can specify the network mode for the container using the --network flag:

The --network flag accepts any Docker-compatible network mode.

Examples:
# Run a server from the registry
thv run filesystem

# Run a server with custom arguments and toolsets
thv run github -- --toolsets repos

# Run from a container image
thv run ghcr.io/github/github-mcp-server

# Run using a protocol scheme (Python with uv)
thv run uvx://mcp-server-git

# Run using npx (Node.js)
thv run npx://@modelcontextprotocol/server-everything

# Run a server in a specific group
thv run filesystem --group production

# Run a remote GitHub MCP server with authentication
thv run github-remote --remote-auth \
--remote-auth-client-id <oauth-client-id> \
--remote-auth-client-secret <oauth-client-secret>

```
thv run [flags] SERVER_OR_IMAGE_OR_PROTOCOL [-- ARGS...]
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
---
title: thv restart
title: thv start
hide_title: true
description: Reference for ToolHive CLI command `thv restart`
description: Reference for ToolHive CLI command `thv start`
last_update:
author: autogenerated
slug: thv_restart
slug: thv_start
mdx:
format: md
---

## thv restart
## thv start

Restart a tooling server
Start (resume) a tooling server

### Synopsis

Restart a running tooling server managed by ToolHive.
Start (or resume) a tooling server managed by ToolHive.
If the server is not running, it will be started.
The alias "thv restart" is kept for backward compatibility.
Supports both container-based and remote MCP servers.

```
thv restart [workload-name] [flags]
thv start [workload-name] [flags]
```

### Options
Expand All @@ -29,7 +30,7 @@ thv restart [workload-name] [flags]
-a, --all Restart all MCP servers
-f, --foreground Run the restarted workload in foreground mode
-g, --group string Restart all MCP servers in a specific group
-h, --help help for restart
-h, --help help for start
```

### Options inherited from parent commands
Expand Down
13 changes: 12 additions & 1 deletion docs/toolhive/reference/cli/thv_stop.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,18 @@ Stop one or more MCP servers

### Synopsis

Stop one or more running MCP servers managed by ToolHive.
Stop one or more running MCP servers managed by ToolHive. Examples:
# Stop a single MCP server
thv stop filesystem

# Stop multiple MCP servers
thv stop filesystem github slack

# Stop all running MCP servers
thv stop --all

# Stop all servers in a group
thv stop --group production

```
thv stop [workload-name...] [flags]
Expand Down
4 changes: 2 additions & 2 deletions docs/toolhive/tutorials/quickstart-cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ thv rm fetch
:::info[What's happening?]

Stopping a server pauses it and terminates the associated proxy process but
keeps the container around so you can restart it quickly later using
[`thv restart`](../reference/cli/thv_restart.md) or
keeps the container around so you can start it quickly later using
[`thv start`](../reference/cli/thv_start.md) or
[`thv run`](../reference/cli/thv_run.md). Removing a server completely deletes
the container, freeing up resources.

Expand Down