Skip to content

Commit 806bfff

Browse files
authored
Update proxy port flag (#50)
1 parent 6efc351 commit 806bfff

File tree

2 files changed

+27
-19
lines changed

2 files changed

+27
-19
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ Check the MCP server's documentation for the required arguments.
144144

145145
ToolHive creates a reverse proxy on a random port that forwards requests to the
146146
container. This is the port that client applications connect to. To set a
147-
specific proxy port instead, use the `--port` flag:
147+
specific proxy port instead, use the `--proxy-port` flag:
148148

149149
```bash
150-
thv run --port <port-number> <server-name>
150+
thv run --proxy-port <port-number> <server-name>
151151
```
152152

153153
## Run a custom MCP server
@@ -216,7 +216,7 @@ When you run an MCP server from a Docker image, ToolHive:
216216
1. Pulls the image (`my-mcp-server-image:latest`) and launches a container with
217217
the options and arguments you specified.
218218
2. Launches an HTTP proxy on a random port (optionally, add
219-
`--port <port-number>` to specify the port).
219+
`--proxy-port <port-number>` to specify the port).
220220
3. Labels the container so it can be tracked by ToolHive:
221221
```yaml
222222
toolhive: true

docs/toolhive/tutorials/quickstart.mdx

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -183,22 +183,30 @@ ToolHive will pull the container image and start the server. You'll see output
183183
similar to this:
184184

185185
```text
186-
Image [mcp/fetch:latest] has 'latest' tag, pulling to ensure we have the most recent version...
187-
Pulling image: [mcp/fetch:latest]
188-
...
189-
Successfully pulled image: [mcp/fetch:latest]
190-
Using host port: [49226]
191-
Logging to: [~/Library/Application Support/toolhive/logs/fetch.log]
192-
MCP server is running in the background (PID: [80087])
193-
Use 'thv stop [fetch]' to stop the server
186+
8:41AM INF MCP server ghcr.io/stackloklabs/gofetch/server:latest is verified successfully
187+
8:41AM INF Image ghcr.io/stackloklabs/gofetch/server:latest has 'latest' tag, pulling to ensure we have the most recent version...
188+
8:41AM INF Pulling image: ghcr.io/stackloklabs/gofetch/server:latest
189+
Pulling from stackloklabs/gofetch/server: latest
190+
Digest: sha256:b9cbe3a8367f39e584d3fdd96d9c5046643c5f4798c3372b0c9049ece202cdef
191+
Status: Image is up to date for ghcr.io/stackloklabs/gofetch/server:latest
192+
8:41AM INF Successfully pulled image: ghcr.io/stackloklabs/gofetch/server:latest
193+
8:41AM INF Using target port: 15266
194+
8:41AM INF Logging to: ~/Library/Application Support/toolhive/logs/fetch.log
195+
8:41AM INF MCP server is running in the background (PID: 16834)
196+
8:41AM INF Use 'thv stop fetch' to stop the server
194197
```
195198

196199
:::info What's happening?
197200

198-
ToolHive downloads the container image for the fetch server (if you don't
199-
already have it), creates a container with the appropriate security settings,
200-
and starts the server. It also sets up a proxy that lets your AI agent
201-
communicate with the server.
201+
When you run an MCP server, ToolHive:
202+
203+
- Verifies the MCP server image provenance (if attestation information is
204+
available in the registry)
205+
- Downloads the container image
206+
- Sets up the container with the necessary security settings and starts it in
207+
the background
208+
- Sets up a reverse proxy that lets your AI client applications communicate with
209+
the server
202210

203211
:::
204212

@@ -213,11 +221,11 @@ thv list
213221
You should see output similar to this:
214222

215223
```text
216-
NAME PACKAGE STATUS URL PORT TOOL TYPE CREATED AT
217-
fetch mcp/fetch:latest running http://127.0.0.1:15266/sse#fetch 15266 mcp 2025-06-30 09:12:53 -0400 EDT
224+
NAME PACKAGE STATUS URL PORT TOOL TYPE CREATED AT
225+
fetch ghcr.io/stackloklabs/gofetch/server:latest running http://127.0.0.1:15266/sse#fetch 15266 mcp 2025-07-10 08:41:56 -0400 EDT
218226
```
219227

220-
This confirms that the fetch server is running and available on port 15266.
228+
This confirms that the fetch server is running and available on port 49226.
221229

222230
:::info What's happening?
223231

@@ -304,7 +312,7 @@ If the server fails to start, check:
304312
Try running with a specific port:
305313

306314
```bash
307-
thv run --port 8081 fetch
315+
thv run --proxy-port 8081 fetch
308316
```
309317

310318
</details>

0 commit comments

Comments
 (0)