Skip to content

Commit 2f8f869

Browse files
Update ToolHive reference docs for v0.0.48 (#21)
* Update ToolHive reference docs for v0.0.48 * Update secrets management docs - New setup workflow - Can now list 1Password secrets - Minor polishing * Add references to new `stop --all` flag --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Dan Barr <[email protected]>
1 parent 49b7816 commit 2f8f869

File tree

11 files changed

+679
-153
lines changed

11 files changed

+679
-153
lines changed

docs/toolhive/guides-cli/install.mdx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ On Windows, you must stop all running MCP servers before upgrading ToolHive,
161161
otherwise the upgrade will fail because Windows locks the executable while it
162162
runs.
163163

164-
Run `thv stop <server-name>` to stop each server. After you complete the
164+
Run `thv stop --all` to stop all running servers. After you complete the
165165
upgrade, restart them using `thv restart <server-name>`.
166166

167167
:::
@@ -247,7 +247,7 @@ To uninstall ToolHive:
247247
# List running servers
248248
thv list
249249
# Stop and remove each server
250-
thv stop <server-name>
250+
thv stop --all
251251
thv rm <server-name>
252252
```
253253

@@ -262,39 +262,49 @@ To uninstall ToolHive:
262262
rm -rf ~/Library/Application\ Support/toolhive/
263263
# Linux:
264264
rm -rf ~/.config/toolhive/
265+
# Windows:
266+
Remove-Item "$env:LOCALAPPDATA\toolhive" -Recurse -Force
265267
```
266268

267269
3. Remove the ToolHive CLI:
268270

269271
{/* prettier-ignore */}
270272
<Tabs groupId='installer' queryString='installer'>
271273
<TabItem value='homebrew' label='Homebrew (macOS)' default>
274+
272275
If you installed ToolHive via Homebrew, uninstall it with:
273276

274277
```bash
275278
brew uninstall thv
276279
```
280+
277281
</TabItem>
278282
<TabItem value='winget' label='WinGet (Windows)'>
283+
279284
If you installed ToolHive via WinGet, uninstall it with:
280285

281286
```bash
282287
winget uninstall stacklok.thv
283288
```
289+
284290
</TabItem>
285291
<TabItem value='binary' label='Pre-compiled binaries'>
292+
286293
Delete the binary from your PATH:
287294

288295
```bash
289296
sudo rm /usr/local/bin/thv
290297
```
298+
291299
</TabItem>
292300
<TabItem value='source' label='Build from source'>
301+
293302
Remove the binary from your `$GOPATH`:
294303

295304
```bash
296305
rm $(go env GOPATH)/bin/thv
297306
```
307+
298308
</TabItem>
299309

300310
</Tabs>
@@ -353,9 +363,7 @@ To resolve this:
353363
1. Stop all running MCP servers:
354364

355365
```powershell
356-
thv list
357-
thv stop <server-name>
358-
# repeat for each server
366+
thv stop --all
359367
```
360368

361369
2. After stopping all servers, run the upgrade command again:
@@ -371,6 +379,7 @@ To resolve this:
371379
4. Restart your MCP servers:
372380

373381
```powershell
382+
thv list --all
374383
thv restart <server-name>
375384
# repeat for each server
376385
```

docs/toolhive/guides-cli/manage-mcp-servers.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,14 @@ To stop a running MCP server:
6060
thv stop <server-name>
6161
```
6262

63-
This stops the server and the associated proxy process but keeps the container
64-
for future use.
63+
This stops the server and the associated proxy process, removes the MCP server's
64+
entry from your configured clients, but keeps the container for future use.
65+
66+
Add the `--all` flag to stop all running servers.
6567

6668
### Restart a server
6769

68-
To restart a stopped MCP server:
70+
To restart a stopped MCP server and add it back to your configured clients:
6971

7072
```bash
7173
thv restart <server-name>

docs/toolhive/guides-cli/secrets-management.mdx

Lines changed: 69 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -15,84 +15,82 @@ configuration files.
1515

1616
## Secrets providers
1717

18-
ToolHive supports multiple secret providers:
18+
ToolHive supports multiple secret providers to fit different security and
19+
workflow requirements:
1920

20-
- `encrypted` (default) - ToolHive encrypts secrets using a password that it
21-
stores in your operating system's keyring.
22-
- `1password` - ToolHive retrieves secrets from a 1Password vault.
21+
- `encrypted` - ToolHive encrypts secrets using a password stored in your
22+
operating system's keyring
23+
- `1password` - ToolHive retrieves secrets from a 1Password vault
2324

24-
<Tabs groupId='secrets-provider' queryString='secrets-provider'>
25-
<TabItem value='encrypted' label='Encrypted (default)' default>
25+
You can use only one provider at a time. To select your preferred provider, run:
2626

27-
The `encrypted` provider is the default secrets provider. When you use a
28-
[`thv secret`](../reference/cli/thv_secret.md) command for the first time,
29-
ToolHive prompts you for a password to encrypt and decrypt your secrets.
27+
```bash
28+
thv secret setup
29+
```
3030

31-
ToolHive stores the encryption password in your operating system's keyring
32-
(Keychain Access on macOS, dbus/Gnome Keyring on Linux). This means you don't
33-
need to enter it every time you use a
34-
[`thv secret`](../reference/cli/thv_secret.md) command.
31+
If you plan to use 1Password, first set up a 1Password service account and
32+
obtain an API token. See the 1Password tab below for details.
3533

36-
To explicitly use the `encrypted` provider (or switch back to it from another
37-
provider), run:
34+
<Tabs groupId='secrets-provider'>
35+
<TabItem value='encrypted' label='Encrypted' default>
3836

39-
```bash
40-
thv config secrets-provider encrypted
41-
```
37+
When you select the `encrypted` provider, ToolHive prompts you to create an
38+
encryption password that protects your secrets.
39+
40+
ToolHive stores this encryption password in your operating system's keyring
41+
(Keychain Access on macOS, Credential Manager on Windows, and dbus/Gnome Keyring
42+
on Linux). This means you don't need to enter the password every time you use a
43+
[`thv secret`](../reference/cli/thv_secret.md) command.
4244

4345
</TabItem>
4446
<TabItem value='1password' label='1Password'>
4547

4648
:::note
4749

48-
The `list`, `set`, and `delete` operations aren't currently supported with
49-
1Password.
50-
51-
You can retrieve secrets using the
52-
[`thv secret get`](../reference/cli/thv_secret_get.md) command and the
53-
`--secret` parameter for [`thv run`](../reference/cli/thv_run.md), but the
54-
secret must already exist in 1Password.
50+
The 1Password provider is read-only. You can list and view secrets, but you
51+
can't create or delete them through ToolHive. Secrets must already exist in your
52+
1Password vault.
5553

56-
If you'd like to see more functionality, please
54+
If you'd like to see write operations added, please
5755
[open an issue](https://github.com/stacklok/toolhive/issues) or join the
5856
`#toolhive-developers` channel in [Discord](https://discord.gg/stacklok).
59-
Contributions are also welcome!
57+
Contributions are welcome!
6058

6159
:::
6260

6361
To use 1Password as your secrets provider, set up a 1Password service account.
6462
For detailed instructions, see the
6563
[1Password documentation](https://developer.1password.com/docs/service-accounts/get-started#create-a-service-account).
6664

67-
Next, set the `OP_SERVICE_ACCOUNT_TOKEN` environment variable to the 1Password
68-
service account's API token, which is displayed during the service account
69-
creation process. This token is required for all
70-
[`thv secret`](../reference/cli/thv_secret.md) commands.
65+
Next, set the `OP_SERVICE_ACCOUNT_TOKEN` environment variable to your service
66+
account's API token (displayed during the service account creation process).
67+
This token is required for all [`thv secret`](../reference/cli/thv_secret.md)
68+
commands:
7169

7270
```bash
7371
export OP_SERVICE_ACCOUNT_TOKEN=<your-service-account-token>
7472
```
7573

76-
Then, set 1Password as your ToolHive secrets provider:
74+
Then, run `thv secret setup` and select `1password` when prompted.
7775

78-
```bash
79-
thv config secrets-provider 1password
80-
```
81-
82-
To reference a secret, use the
76+
To reference a secret from 1Password, use the
8377
[1Password secret reference](https://developer.1password.com/docs/cli/secret-reference-syntax)
8478
URI format:
8579

8680
```text
8781
op://<vault-name>/<item-name>/[section-name/]<field-name>
8882
```
8983

90-
For example, to retrieve a secret named `github` from the `MCPVault` vault:
84+
For example, to retrieve the `password` field from the `github` item in the
85+
`MCPVault` vault:
9186

9287
```bash
9388
thv secret get op://MCPVault/github/password
9489
```
9590

91+
Run [`thv secret list`](../reference/cli/thv_secret_list.md) to see all secrets
92+
accessible to your service account, along with their URIs.
93+
9694
</TabItem>
9795
</Tabs>
9896

@@ -172,17 +170,32 @@ thv secret reset-keyring
172170

173171
Then, delete the encrypted secrets file:
174172

175-
On macOS:
173+
<Tabs groupId='os'>
174+
<TabItem value='macos' label='macOS' default>
175+
176+
```bash
177+
rm ~/Library/Application\ Support/toolhive/secrets_encrypted
178+
```
176179

177-
```bash
178-
rm ~/Library/Application\ Support/toolhive/secrets_encrypted
179-
```
180+
</TabItem>
181+
<TabItem value='linux' label='Linux'>
180182

181-
On Linux:
183+
```bash
184+
rm ~/.config/toolhive/secrets_encrypted
185+
```
182186

183-
```bash
184-
rm ~/.config/toolhive/secrets_encrypted
185-
```
187+
</TabItem>
188+
<TabItem value='windows' label='Windows'>
189+
190+
```powershell
191+
Remove-Item "$env:LOCALAPPDATA\toolhive\secrets_encrypted"
192+
```
193+
194+
</TabItem>
195+
</Tabs>
196+
197+
The next time you run a `thv secret` command, ToolHive prompts you to create a
198+
new encryption password and starts with a fresh secret store.
186199

187200
## Use secrets with MCP servers
188201

@@ -328,7 +341,15 @@ If you can't access 1Password secrets:
328341
```
329342

330343
2. Check that the token is valid and has the necessary permissions to access the
331-
vault and item.
344+
vault and item:
345+
346+
```bash
347+
thv secret list
348+
```
332349

333350
3. Make sure the secret reference URI is correct and matches the vault, item,
334-
and field names in 1Password.
351+
and field names in 1Password:
352+
353+
```bash
354+
thv secret get op://<vault-name>/<item-name>/[section-name/]<field-name>
355+
```

docs/toolhive/reference/cli/thv_config.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ The config command provides subcommands to manage application configuration sett
2727
* [thv config list-registered-clients](thv_config_list-registered-clients.md) - List all registered MCP clients
2828
* [thv config register-client](thv_config_register-client.md) - Register a client for MCP server configuration
2929
* [thv config remove-client](thv_config_remove-client.md) - Remove a client from MCP server configuration
30-
* [thv config secrets-provider](thv_config_secrets-provider.md) - Set the secrets provider type
3130
* [thv config set-ca-cert](thv_config_set-ca-cert.md) - Set the default CA certificate for container builds
3231
* [thv config set-registry-url](thv_config_set-registry-url.md) - Set the MCP server registry URL
3332
* [thv config unset-ca-cert](thv_config_unset-ca-cert.md) - Remove the configured CA certificate

docs/toolhive/reference/cli/thv_config_secrets-provider.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

docs/toolhive/reference/cli/thv_run.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ thv run [flags] SERVER_OR_IMAGE_OR_PROTOCOL [-- ARGS...]
4646
-h, --help help for run
4747
--host string Host for the HTTP proxy to listen on (IP or hostname) (default "127.0.0.1")
4848
--image-verification string Set image verification mode (warn, enabled, disabled) (default "warn")
49+
--isolate-network Isolate the container network from the host (default: false)
4950
--name string Name of the MCP server (auto-generated from image if not provided)
5051
--oidc-audience string Expected audience for the token
5152
--oidc-client-id string OIDC client ID
@@ -60,9 +61,9 @@ thv run [flags] SERVER_OR_IMAGE_OR_PROTOCOL [-- ARGS...]
6061
--permission-profile string Permission profile to use (none, network, or path to JSON file) (default "network")
6162
--port int Port for the HTTP proxy to listen on (host port)
6263
--secret stringArray Specify a secret to be fetched from the secrets manager and set as an environment variable (format: NAME,target=TARGET)
63-
--target-host string Host to forward traffic to (only applicable to SSE transport) (default "127.0.0.1")
64-
--target-port int Port for the container to expose (only applicable to SSE transport)
65-
--transport string Transport mode (sse or stdio) (default "stdio")
64+
--target-host string Host to forward traffic to (only applicable to SSE or Streamable HTTP transport) (default "127.0.0.1")
65+
--target-port int Port for the container to expose (only applicable to SSE or Streamable HTTP transport)
66+
--transport string Transport mode (sse, streamable-http or stdio) (default "stdio")
6667
-v, --volume stringArray Mount a volume into the container (format: host-path:container-path[:ro])
6768
```
6869

docs/toolhive/reference/cli/thv_secret.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ The secret command provides subcommands to set, get, delete, and list secrets.
2424
* [thv secret delete](thv_secret_delete.md) - Delete a secret
2525
* [thv secret get](thv_secret_get.md) - Get a secret
2626
* [thv secret list](thv_secret_list.md) - List all available secrets
27-
* [thv secret provider](thv_secret_provider.md) - Configure the secrets provider
27+
* [thv secret provider](thv_secret_provider.md) - Configure the secrets provider directly
2828
* [thv secret reset-keyring](thv_secret_reset-keyring.md) - Reset the keyring secret
2929
* [thv secret set](thv_secret_set.md) - Set a secret
30+
* [thv secret setup](thv_secret_setup.md) - Set up secrets provider
3031

docs/toolhive/reference/cli/thv_secret_provider.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
## thv secret provider
22

3-
Configure the secrets provider
3+
Configure the secrets provider directly
44

55
### Synopsis
66

7+
For most users, it is recommended to use "thv secret setup" instead.
78
Configure the secrets provider.
89
Valid secrets providers are:
910
- encrypted: Full read-write secrets provider

0 commit comments

Comments
 (0)