Skip to content

Commit 38decfa

Browse files
committed
Update client configuration docs
1 parent fdc8acb commit 38decfa

File tree

8 files changed

+190
-155
lines changed

8 files changed

+190
-155
lines changed

docs/toolhive/guides-cli/client-configuration.md

Lines changed: 65 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -5,82 +5,61 @@ description:
55
sidebar_position: 40
66
---
77

8-
ToolHive can automatically configure supported AI clients to work with MCP
9-
servers. This guide shows you how to set up and manage client configurations.
8+
ToolHive automatically configures supported AI clients to work with MCP servers.
9+
This guide shows you how to set up and manage client configurations.
1010

1111
## Understanding client configuration
1212

13-
AI applications need to know where to find MCP servers before they can use them.
14-
You can configure clients with ToolHive in three ways:
13+
Before an AI application can use ToolHive MCP servers, it needs to know where to
14+
find them. You can configure clients in two ways:
1515

16-
1. **Auto-discovery**: ToolHive automatically finds and configures supported
17-
clients.
18-
2. **Manual registration**: Register specific clients for ToolHive to manage.
19-
3. **Custom configuration**: For unsupported clients or custom setups, configure
20-
them to connect to ToolHive-managed MCP servers using the SSE or Streamable
21-
HTTP protocol.
16+
1. **Register a supported client**: Register your client with ToolHive so it
17+
automatically manages and updates the client's configuration as you start,
18+
stop, and remove MCP servers.
19+
2. **Manual configuration**: For clients that ToolHive doesn't directly support,
20+
manually configure them to connect to ToolHive-managed MCP servers using the
21+
SSE or Streamable HTTP protocol.
2222

23-
With the first two methods, ToolHive automatically updates client configuration
24-
when you start or remove an MCP server. For a complete list of supported clients
25-
and compatibility details, see the
23+
For a complete list of supported clients and compatibility details, see the
2624
[Client compatibility reference](../reference/client-compatibility.mdx).
2725

28-
## Enable auto-discovery
26+
## Register clients
2927

30-
Auto-discovery is the easiest way to configure supported clients. When enabled,
31-
ToolHive automatically finds and configures supported clients on your system
32-
when you run an MCP server.
33-
34-
Enable auto-discovery with the following command:
28+
The easiest way to register clients is to run the
29+
[setup command](../reference/cli/thv_client_setup.md):
3530

3631
```bash
37-
thv config auto-discovery true
32+
thv client setup
3833
```
3934

40-
From now on, any new servers you start with
41-
[`thv run`](../reference/cli/thv_run.md) will be automatically configured in
42-
your client.
43-
44-
:::note
45-
46-
When you enable auto-discovery, ToolHive doesn't add existing MCP servers to
47-
your client configuration. It only configures new servers that you start with
48-
[`thv run`](../reference/cli/thv_run.md). To add existing servers, you can
49-
either:
50-
51-
1. Stop and restart each server with [`thv stop`](../reference/cli/thv_stop.md)
52-
and [`thv restart`](../reference/cli/thv_restart.md) (see
53-
[Lifecycle management](./manage-mcp-servers.md#lifecycle-management)), or
54-
2. Manually register your clients with
55-
[`thv config register-client <client-name>`](../reference/cli/thv_config_register-client.md),
56-
which adds all existing servers to the client configuration.
35+
ToolHive discovers supported clients installed on your system and lets you
36+
select which ones to register. ToolHive detects clients based on the presence of
37+
the client's configuration file in its default location. See the
38+
[Client compatibility reference](../reference/client-compatibility.mdx) for
39+
details on which clients ToolHive supports and how it detects them.
5740

58-
:::
59-
60-
To disable auto-discovery:
41+
To view the current status of detected and configured clients, run:
6142

6243
```bash
63-
thv config auto-discovery false
44+
thv client status
6445
```
6546

66-
## Manually register clients
67-
68-
If you want more control over client configuration, you can manually register
69-
clients.
47+
## Alternative client registration
7048

71-
Use the following command to register a client:
49+
If you prefer to register clients manually or in an automated script, use the
50+
`thv config register-client` command:
7251

7352
```bash
74-
thv config register-client <client-name>
53+
thv config register-client <CLIENT_NAME>
7554
```
7655

77-
Replace `<client-name>` with the name of your client. Common client names
56+
Replace `<CLIENT_NAME>` with the name of your client. Common client names
7857
include:
7958

8059
- `claude-code` - Claude Code CLI
8160
- `cursor` - Cursor IDE
82-
- `roo-code` - Roo Code extension for VS Code
83-
- `vscode` - VS Code (GitHub Copilot)
61+
- `roo-code` - Roo Code extension for Visual Studio Code
62+
- `vscode` - Visual Studio Code (GitHub Copilot)
8463
- `vscode-insider` - VS Code Insiders edition
8564

8665
Example:
@@ -107,30 +86,33 @@ effect.
10786
To remove a client configuration:
10887

10988
```bash
110-
thv config remove-client <client-name>
89+
thv config remove-client <CLIENT_NAME>
11190
```
11291

11392
## Other clients or tools
11493

11594
If you have other clients or development libraries that ToolHive doesn't
11695
directly support, you can still configure them to use ToolHive-managed MCP
117-
servers as long as they support the SSE or Streamable HTTP protocol. Check your
118-
client or library documentation for configuration details.
96+
servers if they support the SSE or Streamable HTTP protocol. Check your client
97+
or library documentation for configuration details.
11998

12099
List your running MCP servers to get the URL:
121100

122101
```bash
123102
thv list
124103
```
125104

126-
Example output:
105+
Example output (some fields omitted for brevity):
127106

128107
```text
129-
CONTAINER ID NAME IMAGE STATE TRANSPORT PORT URL
130-
c06b6f6c09d7 fetch mcp/fetch:latest running stdio 43832 http://localhost:43832/sse#fetch
131-
0489fddf7c10 github ghcr.io/github/github-mcp-server:latest running stdio 19046 http://localhost:19046/sse#github
108+
NAME PACKAGE STATUS URL PORT
109+
github ghcr.io/github/github-mcp-server:latest running http://127.0.0.1:55264/sse#github 55264
110+
osv ghcr.io/stackloklabs/osv-mcp/server:latest running http://127.0.0.1:22089/mcp 22089
132111
```
133112

113+
In this example, the `github` server uses the SSE transport (URL ends in
114+
`/sse`), and the `osv` server uses Streamable HTTP (URL ends in `/mcp`).
115+
134116
You can also get the list in JSON format, which works with many clients that use
135117
the standard configuration format:
136118

@@ -143,44 +125,43 @@ Example output:
143125
```json
144126
{
145127
"mcpServers": {
146-
"fetch": {
147-
"url": "http://localhost:43832/sse#fetch"
148-
},
149128
"github": {
150-
"url": "http://localhost:19046/sse#github"
129+
"url": "http://127.0.0.1:55264/sse#github"
130+
},
131+
"osv": {
132+
"url": "http://127.0.0.1:22089/mcp"
151133
}
152134
}
153135
}
154136
```
155137

156-
Configure your client or library to connect to the MCP server using the URL that
138+
Configure your client or library to connect to the MCP server using the URL
157139
ToolHive provides.
158140

159141
## Related information
160142

143+
- [`thv client` command reference](../reference/cli/thv_client.md)
161144
- [`thv config` command reference](../reference/cli/thv_config.md)
162145
- [Client compatibility](../reference/client-compatibility.mdx)
163146
- [Run MCP servers](run-mcp-servers.mdx)
164147

165148
## Troubleshooting
166149

167-
### Client is not auto-discovered
150+
### Client is not detected by `thv client setup`
168151

169-
If your client isn't configured automatically:
152+
If ToolHive doesn't detect your client:
170153

171-
1. Make sure auto-discovery is enabled:
172-
173-
```bash
174-
thv config auto-discovery true
175-
```
176-
177-
2. Check if your client supports auto-discovery in the
154+
1. Verify ToolHive supports your client in the
178155
[Client compatibility reference](../reference/client-compatibility.mdx).
179156

157+
2. Make sure you installed the client in its default location. ToolHive detects
158+
clients based on their configuration files. If the client isn't in its
159+
default location, ToolHive can't detect it.
160+
180161
3. Try manually registering the client:
181162

182163
```bash
183-
thv config register-client <client-name>
164+
thv config register-client <CLIENT_NAME>
184165
```
185166

186167
### Client can't connect to MCP server
@@ -193,20 +174,20 @@ If your client can't connect to the MCP server:
193174
thv list
194175
```
195176

196-
2. If auto-discovery isn't enabled, check if the client is registered:
177+
2. Check if the client is registered:
197178

198179
```bash
199-
thv config list-registered-clients
180+
thv client status
200181
```
201182

202183
3. Make sure the URL is correct and accessible. Use `curl` to test the
203184
connection:
204185

205186
```bash
206-
curl <mcp-server-url>
187+
curl <MCP_SERVER_URL>
207188
```
208189

209-
4. Restart your client application
190+
4. Restart your client application.
210191

211192
### Client can connect but tools aren't available
212193

@@ -217,26 +198,26 @@ If your client connects to the MCP server but tools aren't available:
217198
```bash
218199
thv list
219200

220-
curl <mcp-server-url>
201+
curl <MCP_SERVER_URL>
221202
```
222203

223204
2. Check the MCP server logs:
224205

225206
```bash
226-
thv logs <server-name>
207+
thv logs <SERVER_NAME>
227208
```
228209

229-
3. Make sure the MCP server is properly configured in your client
230-
4. For VS Code, make sure the MCP server is started in the settings (see the VS
231-
Code with Copilot section in the
232-
[Client compatibility reference](../reference/client-compatibility.mdx#vs-code-with-copilot))
210+
3. Make sure you properly configured the MCP server in your client.
211+
4. For Visual Studio Code, make sure you started the MCP server in the settings
212+
(see the VS Code with Copilot section in the
213+
[Client compatibility reference](../reference/client-compatibility.mdx#vs-code-with-copilot)).
233214
5. If you've implemented authentication for your MCP server, make sure the
234-
client has the necessary permissions to access the tools
215+
client has the necessary permissions to access the tools.
235216

236217
### Containerized client can't connect to MCP server
237218

238219
If you're running an MCP client inside a container and it can't connect to an
239-
MCP server running on the same host, make sure to use the correct host address.
220+
MCP server running on the same host, make sure you use the correct host address.
240221
The ToolHive proxy is a standard OS process, so it listens on the host's network
241222
interface.
242223

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## thv client
2+
3+
Manage MCP clients
4+
5+
### Synopsis
6+
7+
The client command provides subcommands to manage MCP client integrations.
8+
9+
### Options
10+
11+
```
12+
-h, --help help for client
13+
```
14+
15+
### Options inherited from parent commands
16+
17+
```
18+
--debug Enable debug mode
19+
```
20+
21+
### SEE ALSO
22+
23+
* [thv](thv.md) - ToolHive (thv) is a lightweight, secure, and fast manager for MCP servers
24+
* [thv client setup](thv_client_setup.md) - Interactively setup and register installed clients
25+
* [thv client status](thv_client_status.md) - Show status of all supported MCP clients
26+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## thv client setup
2+
3+
Interactively setup and register installed clients
4+
5+
### Synopsis
6+
7+
Presents a list of installed but unregistered clients for interactive selection and registration.
8+
9+
```
10+
thv client setup [flags]
11+
```
12+
13+
### Options
14+
15+
```
16+
-h, --help help for setup
17+
```
18+
19+
### Options inherited from parent commands
20+
21+
```
22+
--debug Enable debug mode
23+
```
24+
25+
### SEE ALSO
26+
27+
* [thv client](thv_client.md) - Manage MCP clients
28+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## thv client status
2+
3+
Show status of all supported MCP clients
4+
5+
### Synopsis
6+
7+
Display the installation and registration status of all supported MCP clients in a table format.
8+
9+
```
10+
thv client status [flags]
11+
```
12+
13+
### Options
14+
15+
```
16+
-h, --help help for status
17+
```
18+
19+
### Options inherited from parent commands
20+
21+
```
22+
--debug Enable debug mode
23+
```
24+
25+
### SEE ALSO
26+
27+
* [thv client](thv_client.md) - Manage MCP clients
28+

docs/toolhive/reference/cli/thv_config.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ The config command provides subcommands to manage application configuration sett
2121
### SEE ALSO
2222

2323
* [thv](thv.md) - ToolHive (thv) is a lightweight, secure, and fast manager for MCP servers
24-
* [thv config auto-discovery](thv_config_auto-discovery.md) - Set whether to enable auto-discovery of MCP clients
2524
* [thv config get-ca-cert](thv_config_get-ca-cert.md) - Get the currently configured CA certificate path
2625
* [thv config get-registry-url](thv_config_get-registry-url.md) - Get the currently configured registry URL
2726
* [thv config list-registered-clients](thv_config_list-registered-clients.md) - List all registered MCP clients

docs/toolhive/reference/cli/thv_config_auto-discovery.md

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

0 commit comments

Comments
 (0)