Skip to content

Commit d03edae

Browse files
committed
add guide for proxy stdio to integrate with claude desktop
1 parent 0778396 commit d03edae

File tree

3 files changed

+87
-1
lines changed

3 files changed

+87
-1
lines changed

docs/toolhive/_partials/_client-compat-table.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
| Continue (JetBrains) ||| v1.0.23+ |
1919
| PydanticAI ||| v0.2.18+ |
2020
| ChatGPT Desktop ||| See [workaround for STDIO-only clients][4] |
21-
| Claude Desktop | | | See [workaround for STDIO-only clients][4] |
21+
| Claude Desktop | | | v0.2.7+ |
2222
| Kiro ||| See [workaround for STDIO-only clients][4] |
2323

2424
[3]: /toolhive/reference/client-compatibility.mdx#vs-code-with-copilot
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: Expand transport compatibility with proxy stdio
3+
description:
4+
How to use the thv proxy stdio command to enable Claude Desktop and other
5+
stdio-only clients to connect to MCP servers using SSE or HTTP transport.
6+
---
7+
8+
## Overview
9+
10+
Claude Desktop and many other MCP clients only support MCP servers that
11+
communicate via stdio transport. However, many popular MCP servers use
12+
Server-Sent Events (SSE) or Streamable-HTTP transport protocols. This means
13+
that out of the box, these clients cannot connect to those servers.
14+
15+
ToolHive overcomes this limitation with the `thv proxy stdio` command. This
16+
command transforms servers using SSE or Streamable-HTTP into stdio-compatible
17+
processes, immediately expanding the tools available to stdio-only clients like
18+
Claude Desktop.
19+
20+
## How it works
21+
22+
The `thv proxy stdio` command wraps an existing MCP server—regardless of its
23+
transport method—and exposes it as a stdio-compatible process. When you use
24+
this command:
25+
26+
1. ToolHive continues to run the MCP server (for example, `osv`) in its
27+
container with its default transport (SSE, HTTP, or other).
28+
2. The `thv proxy stdio` command sets up a stdio-level wrapper pointing to that
29+
existing server.
30+
3. Tools exposed by this MCP are recognized in your client and are ready to be
31+
used.
32+
4. Your client interacts with this wrapper just like any other stdio MCP
33+
server. The client has no idea whether the underlying server uses SSE or
34+
HTTP.
35+
36+
## Usage example
37+
38+
Here's how to configure an SSE-based MCP server to work with Claude Desktop.
39+
40+
First, run an MCP server with SSE transport:
41+
42+
```bash
43+
thv run osv --transport sse --name osv
44+
```
45+
46+
Then configure Claude Desktop to use the proxy stdio command. Update your
47+
Claude Desktop configuration file (typically located at
48+
`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
49+
50+
```json
51+
{
52+
"mcpServers": {
53+
"osv": {
54+
"command": "thv",
55+
"args": ["proxy", "stdio", "osv"]
56+
}
57+
}
58+
}
59+
```
60+
61+
:::tip
62+
63+
The workload name you pass to `thv proxy stdio` (in this case, `osv`) must
64+
match the name you used when running the server with `thv run`.
65+
66+
:::
67+
68+
After restarting Claude Desktop, the MCP server's tools will be available for
69+
use, even though it uses SSE transport.
70+
71+
72+
## Related commands
73+
74+
- [`thv run`](../reference/cli/thv_run.md) - Run an MCP server with ToolHive
75+
- [`thv proxy stdio`](../reference/cli/thv_proxy_stdio.md) - CLI reference for
76+
the proxy stdio command
77+
- [`thv proxy tunnel`](../reference/cli/thv_proxy_tunnel.md) - Create a tunnel
78+
proxy for remote MCP servers
79+
80+
## See also
81+
82+
- [Client configuration](client-configuration.mdx) - Configure MCP clients to
83+
connect to ToolHive servers
84+
- [Run MCP servers](run-mcp-servers.mdx) - Learn how to run MCP servers with
85+
ToolHive

sidebars.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ const sidebars: SidebarsConfig = {
7373
'toolhive/guides-cli/group-management',
7474
'toolhive/guides-cli/secrets-management',
7575
'toolhive/guides-cli/client-configuration',
76+
'toolhive/guides-cli/proxy-stdio',
7677
{
7778
type: 'category',
7879
label: 'Custom permissions',

0 commit comments

Comments
 (0)