From 0b912f22c5415d0b5cd4ddfce5b95da0ac4e83e8 Mon Sep 17 00:00:00 2001 From: lujunsan Date: Mon, 8 Sep 2025 15:09:39 +0200 Subject: [PATCH 1/3] Update docs for run --from-config Signed-off-by: lujunsan --- docs/toolhive/guides-cli/run-mcp-servers.mdx | 15 ++++++++++++--- docs/toolhive/reference/cli/thv_export.md | 3 ++- docs/toolhive/reference/cli/thv_run.md | 3 +++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/docs/toolhive/guides-cli/run-mcp-servers.mdx b/docs/toolhive/guides-cli/run-mcp-servers.mdx index f0b24304..5303e109 100644 --- a/docs/toolhive/guides-cli/run-mcp-servers.mdx +++ b/docs/toolhive/guides-cli/run-mcp-servers.mdx @@ -527,9 +527,18 @@ For example, to run a server using the exported configuration: thv run --from-config ./fetch-config.json ``` -This creates a new server instance with identical settings to the original. If -the original server used secrets, you must have the same secrets available in -your ToolHive secrets store. +This creates a persistent server instance with identical settings to the original +and saves a real configuration file. The server can be stopped, restarted, and +managed like any other workload. If the original server used secrets, you must +have the same secrets available in your ToolHive secrets store. + +:::note + +When using `--from-config`, no other command-line flags can be used to avoid +unexpected behavior. All configuration must be specified in the configuration +file. + +::: ## Next steps diff --git a/docs/toolhive/reference/cli/thv_export.md b/docs/toolhive/reference/cli/thv_export.md index ff9a2d70..721b6282 100644 --- a/docs/toolhive/reference/cli/thv_export.md +++ b/docs/toolhive/reference/cli/thv_export.md @@ -18,7 +18,8 @@ Export a workload's run configuration to a file Export a workload's run configuration to a file for sharing or backup. The exported configuration can be used with 'thv run --from-config ' to recreate -the same workload with identical settings. +the same workload with identical settings as a persistent server that can be +stopped, restarted, and managed like any other workload. Examples: diff --git a/docs/toolhive/reference/cli/thv_run.md b/docs/toolhive/reference/cli/thv_run.md index 150a0545..ebff2c4e 100644 --- a/docs/toolhive/reference/cli/thv_run.md +++ b/docs/toolhive/reference/cli/thv_run.md @@ -49,6 +49,9 @@ ToolHive supports five ways to run an MCP server: $ thv run --from-config Runs an MCP server using a previously exported configuration file. + This saves a real configuration file and creates a persistent workload that + can be stopped, restarted, and managed like any other server. Cannot + be used with other flags. 5. Remote MCP server: From 7a99abe0e161151ca1f1d2c26b4c2206ccffe29f Mon Sep 17 00:00:00 2001 From: lujunsan Date: Mon, 8 Sep 2025 15:19:56 +0200 Subject: [PATCH 2/3] Fix formatting issues Signed-off-by: lujunsan --- docs/toolhive/guides-cli/run-mcp-servers.mdx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/toolhive/guides-cli/run-mcp-servers.mdx b/docs/toolhive/guides-cli/run-mcp-servers.mdx index 5303e109..deb0ec2a 100644 --- a/docs/toolhive/guides-cli/run-mcp-servers.mdx +++ b/docs/toolhive/guides-cli/run-mcp-servers.mdx @@ -527,10 +527,11 @@ For example, to run a server using the exported configuration: thv run --from-config ./fetch-config.json ``` -This creates a persistent server instance with identical settings to the original -and saves a real configuration file. The server can be stopped, restarted, and -managed like any other workload. If the original server used secrets, you must -have the same secrets available in your ToolHive secrets store. +This creates a persistent server instance with identical settings to the +original and saves a real configuration file. The server can be stopped, +restarted, and managed like any other workload. If the original server used +secrets, you must have the same secrets available in your ToolHive secrets +store. :::note From 4a5ae5da8133823b0150b499eaac3bc0f8d26361 Mon Sep 17 00:00:00 2001 From: Dan Barr <6922515+danbarr@users.noreply.github.com> Date: Wed, 8 Oct 2025 11:52:39 -0400 Subject: [PATCH 3/3] Apply review suggestions Signed-off-by: Dan Barr <6922515+danbarr@users.noreply.github.com> --- docs/toolhive/guides-cli/run-mcp-servers.mdx | 13 +++++-------- docs/toolhive/reference/cli/thv_export.md | 3 +-- docs/toolhive/reference/cli/thv_run.md | 3 --- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/docs/toolhive/guides-cli/run-mcp-servers.mdx b/docs/toolhive/guides-cli/run-mcp-servers.mdx index 527534db..40b47479 100644 --- a/docs/toolhive/guides-cli/run-mcp-servers.mdx +++ b/docs/toolhive/guides-cli/run-mcp-servers.mdx @@ -801,17 +801,14 @@ For example, to run a server using the exported configuration: thv run --from-config ./fetch-config.json ``` -This creates a persistent server instance with identical settings to the -original and saves a real configuration file. The server can be stopped, -restarted, and managed like any other workload. If the original server used -secrets, you must have the same secrets available in your ToolHive secrets -store. +This creates a new server instance with identical settings to the original. If +the original server used secrets, you must have the same secrets available in +your ToolHive secrets store. :::note -When using `--from-config`, no other command-line flags can be used to avoid -unexpected behavior. All configuration must be specified in the configuration -file. +When you use `--from-config`, you cannot specify any other command-line flags. +The configuration file must contain all server settings. ::: diff --git a/docs/toolhive/reference/cli/thv_export.md b/docs/toolhive/reference/cli/thv_export.md index 721b6282..ff9a2d70 100644 --- a/docs/toolhive/reference/cli/thv_export.md +++ b/docs/toolhive/reference/cli/thv_export.md @@ -18,8 +18,7 @@ Export a workload's run configuration to a file Export a workload's run configuration to a file for sharing or backup. The exported configuration can be used with 'thv run --from-config ' to recreate -the same workload with identical settings as a persistent server that can be -stopped, restarted, and managed like any other workload. +the same workload with identical settings. Examples: diff --git a/docs/toolhive/reference/cli/thv_run.md b/docs/toolhive/reference/cli/thv_run.md index 123932f8..5338ab03 100644 --- a/docs/toolhive/reference/cli/thv_run.md +++ b/docs/toolhive/reference/cli/thv_run.md @@ -49,9 +49,6 @@ ToolHive supports five ways to run an MCP server: $ thv run --from-config Runs an MCP server using a previously exported configuration file. - This saves a real configuration file and creates a persistent workload that - can be stopped, restarted, and managed like any other server. Cannot - be used with other flags. 5. Remote MCP server: