Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/upstream-projects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ projects:

- id: toolhive
repo: stacklok/toolhive
version: v0.66.0
version: v0.67.0
# toolhive is a monorepo covering the CLI, the Kubernetes
# operator, and the vMCP gateway. It also introduces cross-
# cutting features that land in concepts/, integrations/,
Expand Down
8 changes: 6 additions & 2 deletions docs/toolhive/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,12 @@ Each MCP server proxy, and each Virtual MCP Server (vMCP), sends a report every
15 minutes. A report contains:

- The number of tool calls so far that day, split by the MCP client that made
them, such as Claude Code or Cursor. ToolHive recognizes a fixed list of
clients and reports any other client as `other`.
them, such as Claude Code or Cursor. ToolHive identifies the client from the
information the client sends when it connects or, when the server doesn't
track sessions, from a known client name in the request's `User-Agent` header.
ToolHive never stores or sends the raw `User-Agent` value. It recognizes a
fixed list of clients, reports any other client as `other`, and reports calls
it can't attribute as `unknown`.
- How the server is set up, each value from a fixed list: the transport, whether
it runs in a container or remotely, where its definition came from (the
built-in registry, a custom registry, a `uvx://`, `npx://`, or `go://`
Expand Down
12 changes: 12 additions & 0 deletions docs/toolhive/guides-cli/ai-plugins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,24 @@ Before building, check the manifest and directory structure:
thv ai-plugin validate ./my-plugin
```

Validation also checks every skill bundled in the plugin and reports its errors
and warnings, prefixed with `bundled skill "<PATH>":`. Warnings, such as a
broken link in a bundled skill's `SKILL.md`, never make the plugin invalid.
ToolHive installs the whole plugin, so a bundled skill's links can point
anywhere inside the plugin directory, and bundled scripts keep their executable
permissions. For the full list of skill checks and warnings, see
[Validate a skill](./skills-management.mdx#validate-a-skill).

For JSON output:

```bash
thv ai-plugin validate ./my-plugin --format json
```

The JSON output includes a `findings` array with the severity, rule ID, file,
and line of each issue. For a bundled skill, `file` is relative to the plugin
directory, such as `skills/release-notes/SKILL.md`.

### Build an OCI artifact

Package the plugin into an OCI artifact stored in the local OCI store:
Expand Down
24 changes: 22 additions & 2 deletions docs/toolhive/guides-cli/run-mcp-servers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,10 @@ thv run <uvx|npx|go>://<PACKAGE_NAME>@<VERSION|latest>
```

You'll likely need to specify additional arguments like the transport method,
volumes, and environment variables. Check your MCP server's documentation and
see [`thv run --help`](../reference/cli/thv_run.md) for more options.
volumes, and environment variables. By default, `uvx://` servers use the `stdio`
transport and other servers use `streamable-http`. Check your MCP server's
documentation and see [`thv run --help`](../reference/cli/thv_run.md) for more
options.

:::info[What's happening?]

Expand Down Expand Up @@ -240,6 +242,24 @@ must be a valid package in the [PyPI registry](https://pypi.org/). The
thv run --name aws-docs uvx://awslabs.aws-documentation-mcp-server@latest
```

Most Python MCP servers communicate over stdio, so `uvx://` servers use the
`stdio` transport unless you set `--transport`, `--target-port`, or
`--stateless`, or the server's registry entry specifies a transport. If the
package serves Streamable HTTP or SSE, set the transport explicitly:

```bash
thv run --transport streamable-http uvx://<PACKAGE_NAME> -- --transport streamable-http
```

:::info[Changed in v0.67.0]

`uvx://` servers used to default to `streamable-http`. If you run an HTTP or SSE
`uvx://` package without `--transport` or `--target-port`, add
`--transport streamable-http` or `--transport sse`; otherwise ToolHive starts it
as a stdio server and clients can't reach it.

:::

</TabItem>
<TabItem value='npx' label='Node.js (npx)'>

Expand Down
52 changes: 52 additions & 0 deletions docs/toolhive/guides-cli/skills-management.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,10 @@ name, and must not start or end with a hyphen.
You can also add optional files in `scripts/`, `references/`, and `assets/`
subdirectories for executable code, documentation, and static resources.

ToolHive installs skill files without executable permissions, so tell the agent
to run bundled scripts through an interpreter, such as `bash scripts/check.sh`
or `python3 scripts/report.py`, instead of `./scripts/check.sh`.

For the full list of frontmatter fields (version, license, allowed-tools, and
more) and directory structure details, see
[Understanding skills](../concepts/skills.mdx#skill-structure).
Expand All @@ -386,6 +390,50 @@ This verifies that:
- The `name` matches the directory name
- No symlinks or path traversal issues exist

Validation also reports warnings for problems that pass these checks but break
the skill once it's installed. Warnings never make a skill invalid or change the
exit code:

- `ref-unresolved`: a relative link or image in `SKILL.md`, or in a Markdown
file it links to, points at a file that doesn't exist.
- `ref-escapes-root`: a link or path leaves the skill directory, for example
`../shared/notes.md`. Only the skill directory is installed, so the target
won't exist on the user's machine.
- `script-direct-exec`: the instructions run a bundled script directly, such as
`./scripts/check.sh`. Installed skill files aren't executable, so run the
script through an interpreter instead, such as `bash scripts/check.sh`.
- `allowed-tools-comma`: the `allowed-tools` field is comma-delimited instead of
space-delimited.
- `skill-md-too-long`: `SKILL.md` is longer than 500 lines.

For machine-readable results, for example in CI or an editor integration, add
`--format json`. Alongside the `errors` and `warnings` strings, the output
includes a `findings` array with the severity, a stable rule ID, the file, and
the line of each issue:

```bash
thv skill validate ./my-skill --format json
```

```json
{
"valid": true,
"warnings": ["link \"references/setup.md\" does not exist"],
"findings": [
{
"severity": "warning",
"rule": "ref-unresolved",
"file": "SKILL.md",
"line": 12,
"message": "link \"references/setup.md\" does not exist"
}
]
}
```

The `line` is `0` when a check doesn't apply to a specific line. Rule IDs are
stable, so you can filter on them in scripts.

### Build an OCI artifact

Package your skill into an OCI artifact:
Expand Down Expand Up @@ -620,6 +668,10 @@ Common issues include:
- Skill `name` doesn't match the directory name
- Symlinks present in the skill directory (not allowed for security)

Warnings such as `ref-unresolved` or `script-direct-exec` don't fail validation,
but they point at links or commands that won't work once the skill is installed.
See [Validate a skill](#validate-a-skill) for what each warning means.

</details>

<details>
Expand Down
17 changes: 16 additions & 1 deletion docs/toolhive/guides-k8s/embedded-auth-server-k8s.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ with a generic "authorization header required" error.
| `cimd` | Optional Client ID Metadata Document (CIMD) configuration. When `cimd.enabled` is `true`, the auth server accepts HTTPS URLs as `client_id` values and resolves them via CIMD, letting clients (for example, VS Code) authenticate without prior Dynamic Client Registration. See [Enable CIMD for zero-registration clients](#enable-cimd-for-zero-registration-clients). |
| `baselineClientScopes` | Optional list of OAuth 2.0 scopes merged into every DCR-registered client's scope set. Use this when MCP clients register with a narrowed `scope` field but then request wider scopes at `/oauth/authorize`. See [Enable baseline scopes for DCR clients](#enable-baseline-scopes-for-dcr-clients). |
| `tlsListener` | Optional. Serves the authorization server's OAuth endpoints over HTTPS on port 8443, using a certificate and private key from a Secret. See [Serve the authorization server over TLS](#serve-the-authorization-server-over-tls). |
| `spiffeTrustDomains` | Optional. Declares SPIFFE trust domains and their trust bundles, used with `inboundGrants.spiffeClientAuth` to let SPIFFE workloads authenticate with JWT-SVIDs or X.509-SVIDs for token exchange. See [Authenticate workloads with SPIFFE SVIDs](../guides-vmcp/delegate-agent-identity.mdx#authenticate-workloads-with-spiffe-svids). |
| `spiffeTrustDomains` | Optional. Declares SPIFFE trust domains and their trust bundles, used with `inboundGrants.spiffeClientAuth` to let SPIFFE workloads authenticate with JWT-SVIDs or X.509-SVIDs for token exchange or the client credentials grant. See [Authenticate workloads with SPIFFE SVIDs](../guides-vmcp/delegate-agent-identity.mdx#authenticate-workloads-with-spiffe-svids). |
| `disableUpstreamTokenInjection` | Optional. When `true`, the embedded auth server authenticates clients normally but the proxy strips `Authorization`, `Cookie`, and `Proxy-Authorization` from forwarded requests instead of swapping the JWT for an upstream token. Use this for public backends (such as documentation servers) that you still want to gate behind client auth. Cannot be combined with `tokenExchange`, `awsSts`, or OBO (Stacklok Enterprise) on the same workload, since each would re-add credentials after the strip. |

## Step 5: Create the MCPOIDCConfig and MCPServer resources
Expand Down Expand Up @@ -1023,6 +1023,21 @@ entirely.
Don't set `clientId` or `clientSecretRef` when you set `dcrConfig`. ToolHive
obtains the client ID and client secret from the DCR response.

ToolHive registers as `ToolHive MCP Client` by default, and the upstream shows
that name to users on its authorization screen. To show a name your users
recognize, set `dcrConfig.clientName`:

```yaml
dcrConfig:
clientName: Acme Engineering MCP Gateway
```

The name can be up to 256 characters, without leading or trailing whitespace or
control characters. Changing it doesn't rename a client that's already
registered. The new name applies the next time ToolHive registers a fresh
client, for example after you change
[`rotationKey`](#re-register-a-dropped-upstream-client).

#### DCR with an OAuth 2.0 upstream

For an OAuth 2.0 upstream, use an RFC 8414 discovery document. ToolHive reads
Expand Down
32 changes: 31 additions & 1 deletion docs/toolhive/guides-k8s/remote-mcp-proxy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,35 @@ When you apply an `MCPRemoteProxy` resource, here's what happens:

:::

#### Size the proxy container

The operator fills in any CPU or memory request or limit you leave unset with
these defaults:

| | CPU | Memory |
| -------- | ------ | ------- |
| Requests | `50m` | `64Mi` |
| Limits | `200m` | `256Mi` |

Values you set in `spec.resources`, or on the `toolhive` container through
[`podTemplateSpec`](#customize-the-remote-proxy-pod), override the defaults
field by field, and `podTemplateSpec` takes precedence over `spec.resources`. If
you set a limit without a request, Kubernetes uses the limit as the request. If
you set a request above the default limit, the limit rises to match it.

A busy proxy, especially one that runs the embedded authorization server, can
use more than 256Mi of memory. Check the pod's memory usage and set
`spec.resources.limits.memory` explicitly so the pod isn't OOMKilled.

:::info[Changed in v0.67.0]

`MCPRemoteProxy` containers used to run without default requests or limits.
After the operator upgrade, each proxy that leaves a resource field unset
restarts once and gets the 256Mi memory limit. Before you upgrade, set explicit
limits on any proxy whose memory usage is near or above 256Mi.

:::

### Authentication configuration

The `oidcConfigRef` field references an MCPOIDCConfig resource that validates
Expand Down Expand Up @@ -1100,7 +1129,8 @@ Typical causes:
- The remote server uses a private CA but `caBundleRef` is missing or points to
a Secret/ConfigMap that doesn't exist.
- The pod was OOMKilled. `kubectl describe pod` shows `Reason: OOMKilled` in the
last terminated state - raise `resources.limits`.
last terminated state - raise `resources.limits.memory` above the 256Mi
default. See [Size the proxy container](#size-the-proxy-container).

</details>

Expand Down
19 changes: 13 additions & 6 deletions docs/toolhive/guides-vmcp/accept-workload-assertions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,16 @@ hashing the raw assertion for replay protection instead), and whether the
assertion's `aud` needs an `acceptedAudiences` entry to match, per the tabs
above.

| Error | Likely cause |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `invalid_grant`: "The JWT bearer assertion issuer is not enabled for this grant." | The assertion's `iss` doesn't match a `trustedIssuers` entry with an `inboundGrants.jwtBearer.issuerPolicies` entry configured. |
| `invalid_grant`: "The JWT bearer assertion subject is not configured for this grant." | The assertion's `sub` has no matching entry in `issuerPolicies[].subjectBindings`. |
| `invalid_target` | The `resource` parameter isn't in the matched subject binding's `allowedResources`. |
| `invalid_grant`: "The JWT bearer assertion has already been used." | The assertion's replay key (its `jti`, or a hash of the assertion when `jti` is absent) was already consumed. |
When an assertion fails a validation rule, ToolHive returns `invalid_grant` with
an `error_description` that starts with the reason code `invalid_assertion`,
followed by a hint. A client can read the reason code to decide how to respond
without parsing the hint.

| Error | Likely cause |
| ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `invalid_grant`: "invalid_assertion: The JWT bearer assertion issuer is not enabled for this grant." | The assertion's `iss` doesn't match a `trustedIssuers` entry with an `inboundGrants.jwtBearer.issuerPolicies` entry configured. |
| `invalid_grant`: "The JWT bearer assertion subject is not configured for this grant." | The assertion's `sub` has no matching entry in `issuerPolicies[].subjectBindings`. |
| `invalid_target` | The `resource` parameter isn't in the matched subject binding's `allowedResources`. |
| `invalid_grant`: "invalid_assertion: The JWT bearer assertion has already been used." | The assertion's replay key (its `jti`, or a hash of the assertion when `jti` is absent) was already consumed. |
| `invalid_grant`: "invalid_assertion: The JWT bearer assertion exceeds the configured maximum age." | The assertion's issued lifetime (`exp` minus `iat`) is longer than the issuer policy's `maxAssertionAge`. Request a shorter-lived assertion, or raise `maxAssertionAge`. |
| HTTP 503 `temporarily_unavailable`: "issuer_unavailable" | ToolHive couldn't fetch the issuer's signing keys, so it never evaluated the assertion. Check that the issuer's JWKS endpoint is reachable from the authorization server, then retry the request. |
Loading
Loading