@@ -5,82 +5,74 @@ description:
5
5
sidebar_position : 40
6
6
---
7
7
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.
10
10
11
11
## Understanding client configuration
12
12
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:
15
15
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.
22
22
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
26
24
[ Client compatibility reference] ( ../reference/client-compatibility.mdx ) .
27
25
28
- ## Enable auto-discovery
26
+ ## Register clients
29
27
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 ) :
35
30
36
31
``` bash
37
- thv config auto-discovery true
32
+ thv client setup
38
33
```
39
34
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
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.
45
40
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:
41
+ To view the current status of detected and configured clients, run:
50
42
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.
43
+ ``` bash
44
+ thv client status
45
+ ```
57
46
58
- :::
47
+ ::: note
59
48
60
- To disable auto-discovery:
49
+ ToolHive previously included an "auto-discovery" mode. We removed this mode in
50
+ v0.1.0 to simplify client configuration and ensure consistent control and
51
+ behavior. If you previously enabled client auto-discovery, ToolHive will
52
+ explicitly register all detected clients the first time you run v0.1.0 and
53
+ higher.
61
54
62
- ``` bash
63
- thv config auto-discovery false
64
- ```
55
+ Going forward, use the ` thv client setup ` command to manage your client
56
+ configurations.
65
57
66
- ## Manually register clients
58
+ :::
67
59
68
- If you want more control over client configuration, you can manually register
69
- clients.
60
+ ## Alternative client registration
70
61
71
- Use the following command to register a client:
62
+ If you prefer to register clients manually or in an automated script, use the
63
+ ` thv config register-client ` command:
72
64
73
65
``` bash
74
- thv config register-client < client-name >
66
+ thv config register-client < CLIENT_NAME >
75
67
```
76
68
77
- Replace ` <client-name > ` with the name of your client. Common client names
69
+ Replace ` <CLIENT_NAME > ` with the name of your client. Common client names
78
70
include:
79
71
80
72
- ` claude-code ` - Claude Code CLI
81
73
- ` cursor ` - Cursor IDE
82
- - ` roo-code ` - Roo Code extension for VS Code
83
- - ` vscode ` - VS Code (GitHub Copilot)
74
+ - ` roo-code ` - Roo Code extension for Visual Studio Code
75
+ - ` vscode ` - Visual Studio Code (GitHub Copilot)
84
76
- ` vscode-insider ` - VS Code Insiders edition
85
77
86
78
Example:
@@ -107,30 +99,33 @@ effect.
107
99
To remove a client configuration:
108
100
109
101
``` bash
110
- thv config remove-client < client-name >
102
+ thv config remove-client < CLIENT_NAME >
111
103
```
112
104
113
105
## Other clients or tools
114
106
115
107
If you have other clients or development libraries that ToolHive doesn't
116
108
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.
109
+ servers if they support the SSE or Streamable HTTP protocol. Check your client
110
+ or library documentation for configuration details.
119
111
120
112
List your running MCP servers to get the URL:
121
113
122
114
``` bash
123
115
thv list
124
116
```
125
117
126
- Example output:
118
+ Example output (some fields omitted for brevity) :
127
119
128
120
``` 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
121
+ NAME PACKAGE STATUS URL PORT
122
+ github ghcr.io/github/github-mcp-server :latest running http://127.0.0.1:55264 /sse#github 55264
123
+ osv ghcr.io/stackloklabs/osv -mcp/ server:latest running http://127.0.0.1:22089/mcp 22089
132
124
```
133
125
126
+ In this example, the ` github ` server uses the SSE transport (URL ends in
127
+ ` /sse ` ), and the ` osv ` server uses Streamable HTTP (URL ends in ` /mcp ` ).
128
+
134
129
You can also get the list in JSON format, which works with many clients that use
135
130
the standard configuration format:
136
131
@@ -143,44 +138,43 @@ Example output:
143
138
``` json
144
139
{
145
140
"mcpServers" : {
146
- "fetch" : {
147
- "url" : " http://localhost:43832/sse#fetch"
148
- },
149
141
"github" : {
150
- "url" : " http://localhost:19046/sse#github"
142
+ "url" : " http://127.0.0.1:55264/sse#github"
143
+ },
144
+ "osv" : {
145
+ "url" : " http://127.0.0.1:22089/mcp"
151
146
}
152
147
}
153
148
}
154
149
```
155
150
156
- Configure your client or library to connect to the MCP server using the URL that
151
+ Configure your client or library to connect to the MCP server using the URL
157
152
ToolHive provides.
158
153
159
154
## Related information
160
155
156
+ - [ ` thv client ` command reference] ( ../reference/cli/thv_client.md )
161
157
- [ ` thv config ` command reference] ( ../reference/cli/thv_config.md )
162
158
- [ Client compatibility] ( ../reference/client-compatibility.mdx )
163
159
- [ Run MCP servers] ( run-mcp-servers.mdx )
164
160
165
161
## Troubleshooting
166
162
167
- ### Client is not auto-discovered
168
-
169
- If your client isn't configured automatically:
163
+ ### Client is not detected by ` thv client setup `
170
164
171
- 1 . Make sure auto-discovery is enabled :
165
+ If ToolHive doesn't detect your client :
172
166
173
- ``` bash
174
- thv config auto-discovery true
175
- ```
176
-
177
- 2 . Check if your client supports auto-discovery in the
167
+ 1 . Verify ToolHive supports your client in the
178
168
[ Client compatibility reference] ( ../reference/client-compatibility.mdx ) .
179
169
170
+ 2 . Make sure you installed the client in its default location. ToolHive detects
171
+ clients based on their configuration files. If the client isn't in its
172
+ default location, ToolHive can't detect it.
173
+
180
174
3 . Try manually registering the client:
181
175
182
176
``` bash
183
- thv config register-client < client-name >
177
+ thv config register-client < CLIENT_NAME >
184
178
```
185
179
186
180
### Client can't connect to MCP server
@@ -193,20 +187,20 @@ If your client can't connect to the MCP server:
193
187
thv list
194
188
```
195
189
196
- 2 . If auto-discovery isn't enabled, check if the client is registered:
190
+ 2 . Check if the client is registered:
197
191
198
192
``` bash
199
- thv config list-registered-clients
193
+ thv client status
200
194
```
201
195
202
196
3 . Make sure the URL is correct and accessible. Use ` curl ` to test the
203
197
connection:
204
198
205
199
``` bash
206
- curl < mcp-server-url >
200
+ curl < MCP_SERVER_URL >
207
201
```
208
202
209
- 4 . Restart your client application
203
+ 4 . Restart your client application.
210
204
211
205
### Client can connect but tools aren't available
212
206
@@ -217,26 +211,26 @@ If your client connects to the MCP server but tools aren't available:
217
211
``` bash
218
212
thv list
219
213
220
- curl < mcp-server-url >
214
+ curl < MCP_SERVER_URL >
221
215
```
222
216
223
217
2 . Check the MCP server logs:
224
218
225
219
``` bash
226
- thv logs < server-name >
220
+ thv logs < SERVER_NAME >
227
221
```
228
222
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 ) )
223
+ 3 . Make sure you properly configured the MCP server in your client.
224
+ 4 . For Visual Studio Code, make sure you started the MCP server in the settings
225
+ (see the VS Code with Copilot section in the
226
+ [ Client compatibility reference] ( ../reference/client-compatibility.mdx#vs-code-with-copilot ) ).
233
227
5 . If you've implemented authentication for your MCP server, make sure the
234
- client has the necessary permissions to access the tools
228
+ client has the necessary permissions to access the tools.
235
229
236
230
### Containerized client can't connect to MCP server
237
231
238
232
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.
233
+ MCP server running on the same host, make sure you use the correct host address.
240
234
The ToolHive proxy is a standard OS process, so it listens on the host's network
241
235
interface.
242
236
0 commit comments