Skip to content

Commit ea80d6b

Browse files
committed
run prettier
1 parent c61cb1b commit ea80d6b

File tree

2 files changed

+51
-29
lines changed

2 files changed

+51
-29
lines changed

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

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ To see all currently running MCP servers:
1717
thv list
1818
```
1919

20-
This shows the server name, package, status, url, port, tool type, group, and created
21-
at. Remote servers display their target URL in the URL column. The word 'remote'
22-
is indicated in both the package and tool type columns, making it easy to
23-
identify remote servers.
20+
This shows the server name, package, status, url, port, tool type, group, and
21+
created at. Remote servers display their target URL in the URL column. The word
22+
'remote' is indicated in both the package and tool type columns, making it easy
23+
to identify remote servers.
2424

2525
To include stopped servers in the list:
2626

@@ -64,7 +64,8 @@ thv stop <SERVER_NAME>
6464

6565
This stops the server and the associated proxy process, removes the MCP server's
6666
entry from your configured clients, but keeps the container for future use. For
67-
remote servers, this terminates the proxy process but preserves the configuration.
67+
remote servers, this terminates the proxy process but preserves the
68+
configuration.
6869

6970
Add the `--group` flag to stop all servers in a specific group:
7071

@@ -104,8 +105,8 @@ thv rm <SERVER_NAME>
104105

105106
This removes the container and cleans up the MCP server's entry in your
106107
configured clients. If the server is still running, it will be stopped as part
107-
of the removal. For remote servers, this removes the proxy process, configuration,
108-
and stored authentication tokens.
108+
of the removal. For remote servers, this removes the proxy process,
109+
configuration, and stored authentication tokens.
109110

110111
Add the `--group` flag to remove all servers in a specific group:
111112

@@ -123,9 +124,9 @@ won't clean up the MCP server's entry in your configured clients. Use
123124

124125
### Remote server authentication
125126

126-
Remote servers with OAuth authentication will automatically refresh tokens
127-
when they expire during normal operation. However, restarting a remote server
128-
always triggers a new OAuth authentication flow:
127+
Remote servers with OAuth authentication will automatically refresh tokens when
128+
they expire during normal operation. However, restarting a remote server always
129+
triggers a new OAuth authentication flow:
129130

130131
```bash
131132
thv restart <REMOTE_SERVER_NAME>

docs/toolhive/guides-cli/run-mcp-servers.mdx

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,35 @@ thv run fetch
3232

3333
### Remote MCP servers
3434

35-
Remote MCP servers in the registry don't run as local containers but instead use ToolHive's transparent http proxy to forward requests to remote servers. For example:
35+
Remote MCP servers in the registry don't run as local containers but instead use
36+
ToolHive's transparent http proxy to forward requests to remote servers. For
37+
example:
3638

3739
```bash
3840
thv run neon
3941
thv run stripe
4042
```
4143

42-
When you run a remote server from the registry, ToolHive uses the pre-configured remote URL and authentication settings.
44+
When you run a remote server from the registry, ToolHive uses the pre-configured
45+
remote URL and authentication settings.
4346

4447
:::note[Naming convention]
4548

46-
Remote MCP servers use the `-remote` suffix **when they have a local containerized counterpart** to distinguish between the two versions. For example:
47-
- `github-remote` indicates this is the remote version of a server that also has a local `github` version
48-
- `neon` and `stripe` don't have local counterparts, so they don't use the `-remote` suffix
49+
Remote MCP servers use the `-remote` suffix **when they have a local
50+
containerized counterpart** to distinguish between the two versions. For
51+
example:
52+
53+
- `github-remote` indicates this is the remote version of a server that also has
54+
a local `github` version
55+
- `neon` and `stripe` don't have local counterparts, so they don't use the
56+
`-remote` suffix
4957

5058
To run a remote github mcp server, you should use the `github-remote` name.
5159

5260
```bash
5361
thv run github-remote
5462
```
63+
5564
:::
5665

5766
:::info[What's happening?]
@@ -60,6 +69,7 @@ When you run an MCP server from the registry, ToolHive handles different server
6069
types automatically:
6170

6271
**For local containerized servers:**
72+
6373
1. Pulls the image and launches a container using the configuration from the
6474
registry.
6575
2. Starts an HTTP proxy process on a random port to forward client requests to
@@ -71,12 +81,14 @@ types automatically:
7181
```
7282
7383
**For remote MCP servers:**
84+
7485
1. Uses the pre-configured remote URL from the registry.
7586
2. Automatically detects if the remote server requires authentication.
7687
3. Handles OAuth/OIDC authentication flows if needed.
7788
4. Starts an HTTP proxy process on a random port to forward client requests to
7889
the remote server.
79-
5. Manages the server like any other ToolHive workload. No container is created for remote MCP servers.
90+
5. Manages the server like any other ToolHive workload. No container is created
91+
for remote MCP servers.
8092
8193
:::
8294
@@ -581,10 +593,10 @@ thv run --ca-cert /path/to/special-ca.crt uvx://other-package
581593

582594
## Run a remote MCP server
583595

584-
You can run remote MCP servers directly by providing their URL. This allows you to
585-
connect to MCP servers hosted elsewhere without needing to manage containers locally.
586-
ToolHive creates a transparent proxy that handles authentication and forwards requests
587-
to the remote server.
596+
You can run remote MCP servers directly by providing their URL. This allows you
597+
to connect to MCP servers hosted elsewhere without needing to manage containers
598+
locally. ToolHive creates a transparent proxy that handles authentication and
599+
forwards requests to the remote server.
588600

589601
### Basic remote server setup
590602

@@ -600,9 +612,12 @@ For example:
600612
thv run https://api.example.com/mcp
601613
```
602614

603-
If you don't specify a name with `--name`, ToolHive will automatically derive a name from the URL by extracting the main domain name (e.g., `notion` from `https://api.notion.com/mcp`).
615+
If you don't specify a name with `--name`, ToolHive will automatically derive a
616+
name from the URL by extracting the main domain name (e.g., `notion` from
617+
`https://api.notion.com/mcp`).
604618

605-
By default, remote servers use the `streamable-http` transport. If the server uses Server-Sent Events (SSE), specify the transport flag:
619+
By default, remote servers use the `streamable-http` transport. If the server
620+
uses Server-Sent Events (SSE), specify the transport flag:
606621

607622
```bash
608623
thv run https://api.example.com/sse --transport sse
@@ -616,7 +631,8 @@ When you run a remote MCP server, ToolHive:
616631
2. Handles OAuth/OIDC authentication flows if needed.
617632
3. Starts an HTTP proxy process on a random port to forward client requests to
618633
the remote server.
619-
4. Manages the server like any other ToolHive workload. No container is created for remote MCP servers.
634+
4. Manages the server like any other ToolHive workload. No container is created
635+
for remote MCP servers.
620636

621637
:::
622638

@@ -634,7 +650,10 @@ examining the server's response headers and status codes:
634650
thv run https://protected-api.com/mcp --name my-server
635651
```
636652

637-
If authentication is required, ToolHive will prompt you to complete the OAuth flow. When no client credentials are provided, ToolHive automatically registers an OAuth client with the authorization server using RFC 7591 dynamic client registration, eliminating the need to pre-configure client ID and secret.
653+
If authentication is required, ToolHive will prompt you to complete the OAuth
654+
flow. When no client credentials are provided, ToolHive automatically registers
655+
an OAuth client with the authorization server using RFC 7591 dynamic client
656+
registration, eliminating the need to pre-configure client ID and secret.
638657

639658
#### OIDC authentication
640659

@@ -649,7 +668,8 @@ thv run https://api.example.com/mcp \
649668

650669
#### OAuth2 authentication
651670

652-
For servers using OAuth2, you can specify the authorization and token URLs manually:
671+
For servers using OAuth2, you can specify the authorization and token URLs
672+
manually:
653673

654674
```bash
655675
thv run https://api.example.com/mcp \
@@ -662,10 +682,11 @@ thv run https://api.example.com/mcp \
662682

663683
#### Automatic token refresh
664684

665-
ToolHive automatically handles OAuth token refresh for remote MCP servers. When you
666-
authenticate with a remote server, ToolHive stores both the access token and refresh
667-
token securely. The refresh token is used to automatically obtain new access tokens
668-
when they expire, ensuring uninterrupted service without requiring manual re-authentication.
685+
ToolHive automatically handles OAuth token refresh for remote MCP servers. When
686+
you authenticate with a remote server, ToolHive stores both the access token and
687+
refresh token securely. The refresh token is used to automatically obtain new
688+
access tokens when they expire, ensuring uninterrupted service without requiring
689+
manual re-authentication.
669690

670691
### Advanced remote server configuration
671692

0 commit comments

Comments
 (0)