Skip to content

Commit c70067c

Browse files
Update ToolHive reference docs for v0.13.1 (#645)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 0a956b7 commit c70067c

3 files changed

Lines changed: 40 additions & 4 deletions

File tree

docs/toolhive/reference/cli/thv_run.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ thv run [flags] SERVER_OR_IMAGE_OR_PROTOCOL [-- ARGS...]
111111
### Options
112112

113113
```
114+
--allow-docker-gateway Allow outbound connections to Docker gateway addresses (host.docker.internal, gateway.docker.internal, 172.17.0.1). Only applies when --isolate-network is set. These are blocked by default even when insecure_allow_all is enabled.
114115
--audit-config string Path to the audit configuration file
115116
--authz-config string Path to the authorization configuration file
116117
--ca-cert string Path to a custom CA certificate file to use for container builds

docs/toolhive/reference/crd-spec.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ _Appears in:_
281281
| `telemetry` _[pkg.telemetry.Config](#pkgtelemetryconfig)_ | Telemetry configures OpenTelemetry-based observability for the Virtual MCP server<br />including distributed tracing, OTLP metrics export, and Prometheus metrics endpoint. | | Optional: \{\} <br /> |
282282
| `audit` _[pkg.audit.Config](#pkgauditconfig)_ | Audit configures audit logging for the Virtual MCP server.<br />When present, audit logs include MCP protocol operations.<br />See audit.Config for available configuration options. | | Optional: \{\} <br /> |
283283
| `optimizer` _[vmcp.config.OptimizerConfig](#vmcpconfigoptimizerconfig)_ | Optimizer configures the MCP optimizer for context optimization on large toolsets.<br />When enabled, vMCP exposes only find_tool and call_tool operations to clients<br />instead of all backend tools directly. This reduces token usage by allowing<br />LLMs to discover relevant tools on demand rather than receiving all tool definitions. | | Optional: \{\} <br /> |
284+
| `sessionStorage` _[vmcp.config.SessionStorageConfig](#vmcpconfigsessionstorageconfig)_ | SessionStorage configures session storage for stateful horizontal scaling.<br />When provider is "redis", the operator injects Redis connection parameters<br />(address, db, keyPrefix) here. The Redis password is provided separately via<br />the THV_SESSION_REDIS_PASSWORD environment variable. | | Optional: \{\} <br /> |
284285

285286

286287
#### vmcp.config.ConflictResolutionConfig
@@ -502,6 +503,27 @@ _Appears in:_
502503
| `default` _[pkg.json.Any](#pkgjsonany)_ | Default is the fallback value if template expansion fails.<br />Type coercion is applied to match the declared Type. | | Schemaless: \{\} <br />Optional: \{\} <br /> |
503504

504505

506+
#### vmcp.config.SessionStorageConfig
507+
508+
509+
510+
SessionStorageConfig configures session storage for stateful horizontal scaling.
511+
The Redis password is not stored here; it is injected as the THV_SESSION_REDIS_PASSWORD
512+
environment variable by the operator when spec.sessionStorage.passwordRef is set.
513+
514+
515+
516+
_Appears in:_
517+
- [vmcp.config.Config](#vmcpconfigconfig)
518+
519+
| Field | Description | Default | Validation |
520+
| --- | --- | --- | --- |
521+
| `provider` _string_ | Provider is the session storage backend type. | | Enum: [memory redis] <br />Required: \{\} <br /> |
522+
| `address` _string_ | Address is the Redis server address (required when provider is redis). | | Optional: \{\} <br /> |
523+
| `db` _integer_ | DB is the Redis database number. | 0 | Minimum: 0 <br />Optional: \{\} <br /> |
524+
| `keyPrefix` _string_ | KeyPrefix is an optional prefix for all Redis keys used by ToolHive. | | Optional: \{\} <br /> |
525+
526+
505527
#### vmcp.config.StaticBackendConfig
506528

507529

@@ -991,6 +1013,7 @@ _Appears in:_
9911013
| Field | Description | Default | Validation |
9921014
| --- | --- | --- | --- |
9931015
| `issuer` _string_ | Issuer is the issuer identifier for this authorization server.<br />This will be included in the "iss" claim of issued tokens.<br />Must be a valid HTTPS URL (or HTTP for localhost) without query, fragment, or trailing slash (per RFC 8414). | | Pattern: `^https?://[^\s?#]+[^/\s?#]$` <br />Required: \{\} <br /> |
1016+
| `authorizationEndpointBaseUrl` _string_ | AuthorizationEndpointBaseURL overrides the base URL used for the authorization_endpoint<br />in the OAuth discovery document. When set, the discovery document will advertise<br />`\{authorizationEndpointBaseUrl\}/oauth/authorize` instead of `\{issuer\}/oauth/authorize`.<br />All other endpoints (token, registration, JWKS) remain derived from the issuer.<br />This is useful when the browser-facing authorization endpoint needs to be on a<br />different host than the issuer used for backend-to-backend calls.<br />Must be a valid HTTPS URL (or HTTP for localhost) without query, fragment, or trailing slash. | | Pattern: `^https?://[^\s?#]+[^/\s?#]$` <br />Optional: \{\} <br /> |
9941017
| `signingKeySecretRefs` _[api.v1alpha1.SecretKeyRef](#apiv1alpha1secretkeyref) array_ | SigningKeySecretRefs references Kubernetes Secrets containing signing keys for JWT operations.<br />Supports key rotation by allowing multiple keys (oldest keys are used for verification only).<br />If not specified, an ephemeral signing key will be auto-generated (development only -<br />JWTs will be invalid after restart). | | MaxItems: 5 <br />Optional: \{\} <br /> |
9951018
| `hmacSecretRefs` _[api.v1alpha1.SecretKeyRef](#apiv1alpha1secretkeyref) array_ | HMACSecretRefs references Kubernetes Secrets containing symmetric secrets for signing<br />authorization codes and refresh tokens (opaque tokens).<br />Current secret must be at least 32 bytes and cryptographically random.<br />Supports secret rotation via multiple entries (first is current, rest are for verification).<br />If not specified, an ephemeral secret will be auto-generated (development only -<br />auth codes and refresh tokens will be invalid after restart). | | Optional: \{\} <br /> |
9961019
| `tokenLifespans` _[api.v1alpha1.TokenLifespanConfig](#apiv1alpha1tokenlifespanconfig)_ | TokenLifespans configures the duration that various tokens are valid.<br />If not specified, defaults are applied (access: 1h, refresh: 7d, authCode: 10m). | | Optional: \{\} <br /> |
@@ -2698,10 +2721,8 @@ SessionStorageConfig defines session storage configuration for horizontal scalin
26982721
This is the CRD/K8s-aware surface: it uses SecretKeyRef for secret resolution.
26992722
The reconciler resolves PasswordRef to a plain string and builds a
27002723
session.RedisConfig (pkg/transport/session) for the actual storage backend.
2701-
2702-
vMCP process receives session storage config through the existing config injection
2703-
path (same as Optimizer and Audit). The CRD type will remain separate because
2704-
PasswordRef is K8s-specific and gets resolved away before the config-pkg type.
2724+
The operator also populates pkg/vmcp/config.SessionStorageConfig (without PasswordRef)
2725+
into the vMCP ConfigMap so the vMCP process receives connection parameters at startup.
27052726

27062727

27072728

static/api-specs/toolhive-api.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,13 @@ components:
429429
type: string
430430
type: array
431431
uniqueItems: false
432+
authorization_endpoint_base_url:
433+
description: |-
434+
AuthorizationEndpointBaseURL overrides the base URL used for the authorization_endpoint
435+
in the OAuth discovery document. When set, the discovery document will advertise
436+
`{authorization_endpoint_base_url}/oauth/authorize` instead of `{issuer}/oauth/authorize`.
437+
All other endpoints remain derived from the issuer.
438+
type: string
432439
hmac_secret_files:
433440
description: |-
434441
HMACSecretFiles contains file paths to HMAC secrets for signing authorization codes
@@ -869,6 +876,13 @@ components:
869876
type: object
870877
github_com_stacklok_toolhive_pkg_runner.RunConfig:
871878
properties:
879+
allow_docker_gateway:
880+
description: |-
881+
AllowDockerGateway permits outbound connections to Docker gateway addresses
882+
(host.docker.internal, gateway.docker.internal, 172.17.0.1). These are
883+
blocked by default in the egress proxy even when InsecureAllowAll is set.
884+
Only applicable to Docker deployments with network isolation enabled.
885+
type: boolean
872886
audit_config:
873887
$ref: '#/components/schemas/github_com_stacklok_toolhive_pkg_audit.Config'
874888
audit_config_path:

0 commit comments

Comments
 (0)