Skip to content

Commit 812e0fd

Browse files
committed
add proxy into the guide
1 parent 82a03c9 commit 812e0fd

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
lines changed

docs/toolhive/guides-cli/auth.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,26 @@ to perform an action, ToolHive will evaluate the request against the policies.
143143
If the request is permitted, the action will proceed; otherwise, it will be
144144
denied with a 403 Forbidden response.
145145

146+
## Standalone proxy authentication
147+
148+
In addition to authentication for MCP servers run with `thv run`, ToolHive
149+
provides a standalone `thv proxy` command that can create transparent HTTP
150+
proxies with advanced authentication capabilities.
151+
152+
The proxy command is useful when you need:
153+
154+
- **Outgoing authentication**: Authenticate to remote MCP servers using
155+
OAuth/OIDC without managing tokens in your client
156+
- **Incoming authentication**: Protect a proxy endpoint with OIDC validation,
157+
requiring clients to provide valid JWT tokens
158+
- **Bidirectional authentication**: Secure both incoming requests to the proxy
159+
and outgoing requests to remote servers
160+
- **Dynamic client registration**: Automatically register OAuth clients using
161+
RFC 7591, eliminating the need for pre-configuration
162+
163+
For complete details on using the proxy with authentication, see
164+
[Proxy with authentication](./proxy-authentication.mdx).
165+
146166
## Troubleshooting
147167

148168
<AuthTroubleshooting />

docs/toolhive/guides-cli/proxy-authentication.mdx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ description:
66

77
This guide explains how to use the `thv proxy` command to create a standalone
88
transparent HTTP proxy with authentication support for MCP servers. The proxy
9-
provides flexible authentication options for both incoming requests to the
10-
proxy and outgoing requests to remote MCP servers.
9+
provides flexible authentication options for both incoming requests to the proxy
10+
and outgoing requests to remote MCP servers.
1111

1212
## Overview
1313

@@ -105,8 +105,8 @@ thv proxy my-server \
105105

106106
### Auto-detect authentication
107107

108-
The proxy can automatically detect if a remote server requires authentication
109-
by examining WWW-Authenticate headers:
108+
The proxy can automatically detect if a remote server requires authentication by
109+
examining WWW-Authenticate headers:
110110

111111
```bash
112112
thv proxy my-server \
@@ -119,8 +119,8 @@ appropriate OAuth flow.
119119

120120
### Dynamic client registration
121121

122-
When no client credentials are provided, the proxy can automatically register
123-
an OAuth client using RFC 7591 dynamic client registration:
122+
When no client credentials are provided, the proxy can automatically register an
123+
OAuth client using RFC 7591 dynamic client registration:
124124

125125
```bash
126126
thv proxy my-server \
@@ -289,8 +289,7 @@ thv proxy my-server \
289289

290290
### Client secret sources
291291

292-
OAuth client secrets can be provided via three methods (in order of
293-
precedence):
292+
OAuth client secrets can be provided via three methods (in order of precedence):
294293

295294
1. `--remote-auth-client-secret` flag (not recommended for production)
296295
2. `--remote-auth-client-secret-file` flag (recommended)

0 commit comments

Comments
 (0)