diff --git a/.github/upstream-projects.yaml b/.github/upstream-projects.yaml index 2d1854b0..fb27c87d 100644 --- a/.github/upstream-projects.yaml +++ b/.github/upstream-projects.yaml @@ -71,7 +71,7 @@ projects: - id: toolhive-studio repo: stacklok/toolhive-studio - version: v0.31.0 + version: v0.32.1 docs_paths: - docs/toolhive/guides-ui diff --git a/docs/toolhive/guides-ui/mcp-optimizer.mdx b/docs/toolhive/guides-ui/mcp-optimizer.mdx deleted file mode 100644 index 4a17987a..00000000 --- a/docs/toolhive/guides-ui/mcp-optimizer.mdx +++ /dev/null @@ -1,132 +0,0 @@ ---- -title: Optimize MCP tool usage -description: - Enable the MCP Optimizer to enhance tool selection and reduce token usage. ---- - -:::danger[Deprecated - removal on April 22, 2026] - -The MCP Optimizer in the ToolHive UI is deprecated and will be removed on April -22, 2026. The optimizer is now built into -[Virtual MCP Server (vMCP)](../guides-vmcp/optimizer.mdx), which provides the -same tool filtering and token reduction at the team level with no per-user -configuration needed. - -For details on the migration, see the -[announcement blog post](https://stacklok.com/blog/mcp-optimizer-is-now-built-into-the-stacklok-platform/). - -::: - -## Overview - -The ToolHive MCP Optimizer acts as an intelligent intermediary between AI -clients and MCP servers. It provides tool discovery, unified access to multiple -MCP servers through a single endpoint, and intelligent routing of requests to -appropriate MCP tools. - -Learn more about the MCP Optimizer, its benefits, and how it works in the -tutorial: -[Reduce token usage with MCP Optimizer](../tutorials/mcp-optimizer.mdx). - -## Enable MCP Optimizer - -:::note[Limitations] - -MCP Optimizer does not currently work with Podman Desktop on Windows or with MCP -servers that have network isolation enabled. Supported configurations: - -- macOS with Docker Desktop, Podman Desktop, or Rancher Desktop -- Windows with Docker Desktop or Rancher Desktop -- Linux: see [Linux setup](../tutorials/mcp-optimizer.mdx#linux-setup) - -::: - -To enable the MCP Optimizer in the ToolHive UI: - -1. Open the **Settings** (⚙️) screen and enable **MCP Optimizer** under - **Experimental Features** -2. Click the **Configure** button on the notification that pops up, or go to the - main **MCP Servers** screen and click **MCP Optimizer** in the left sidebar -3. Select the group that contains the MCP servers you want to optimize and click - **Apply Changes** - -ToolHive automatically updates clients that were registered with the selected -group to use the MCP Optimizer. If you want to connect a new client, go to the -group which is enabled for optimization and use the **Manage Clients** button to -register it. - -For best results, connect your client to only the optimized group. If you -connect it to multiple groups, ensure there is no overlap in MCP servers between -the groups to avoid unpredictable behavior. - -:::info[What's happening?] - -When you enable MCP Optimizer, ToolHive automatically creates an internal group -and runs the `mcp-optimizer` MCP server in that group. - -The MCP Optimizer server discovers the MCP servers in the selected group and -builds an index of their tools for intelligent routing. Automatic polling keeps -the index up to date as servers are added or removed from the optimized group. - -ToolHive also disconnects your AI clients from the original MCP server group and -reconnects them to the MCP Optimizer group. - -::: - -## Customize MCP Optimizer settings - -To update the MCP Optimizer's default settings, click the **Advanced** menu and -select **Customize MCP Optimizer configuration**. This opens a form where you -can modify the `mcp-optimizer` MCP server's configuration. - -:::note - -Changes to the MCP Optimizer configuration might cause the feature to stop -working correctly. Only modify these settings if you understand their -implications. - -Generally, you should only need to change the Docker image tag and the -environment variables detailed below. - -::: - -You can customize the MCP Optimizer's behavior using the following environment -variables: - -- `MAX_TOOLS_TO_RETURN`: Number of tools to return from `find_tool` (default: - `8`) -- `TOOL_DISTANCE_THRESHOLD`: Distance threshold for tool similarity (default: - `1.0`) -- `MAX_TOOL_RESPONSE_TOKENS`: Maximum number of tokens to return from - `call_tool` (default: `None`) -- `WORKLOAD_POLLING_INTERVAL`: Polling interval for running MCP servers, in - seconds (default: `60`) -- `REGISTRY_POLLING_INTERVAL`: Polling interval for ToolHive registry, in - seconds (default: `86400`, 24 hours) - -## Disable MCP Optimizer - -To disable the MCP Optimizer, open the **Settings** (⚙️) screen and disable the -**MCP Optimizer** option under the **Experimental Features** section. - -ToolHive stops and removes the MCP Optimizer server and reconnects your clients -to the original MCP server group. - -## Troubleshooting - -If you encounter issues while using the MCP Optimizer, check the logs for -debugging information. On the **MCP Optimizer** page, click the **Advanced** -menu and select **MCP Optimizer logs**. - -## Next steps - -- Try the [Playground](./playground.mdx) to test your optimized tool set -- [Organize MCP servers into groups](./group-management.mdx) to control which - servers the optimizer includes - -## Related information - -- Tutorial: - [Reduce token usage with MCP Optimizer](../tutorials/mcp-optimizer.mdx) -- [Optimizing LLM context](../concepts/tool-optimization.mdx) - background on - tool filtering and context pollution diff --git a/docs/toolhive/guides-ui/playground.mdx b/docs/toolhive/guides-ui/playground.mdx index b40e4740..2610c6b5 100644 --- a/docs/toolhive/guides-ui/playground.mdx +++ b/docs/toolhive/guides-ui/playground.mdx @@ -157,7 +157,7 @@ Stop all unhealthy MCP servers ``` ```text -Show me the logs for the meta-mcp server +Show me the logs for the fetch MCP server ``` ### Validating tool responses diff --git a/docs/toolhive/tutorials/mcp-optimizer.mdx b/docs/toolhive/tutorials/mcp-optimizer.mdx index c20c9d64..a1fe2453 100644 --- a/docs/toolhive/tutorials/mcp-optimizer.mdx +++ b/docs/toolhive/tutorials/mcp-optimizer.mdx @@ -387,7 +387,5 @@ kind delete cluster --name toolhive tool filtering and context pollution - [Virtual MCP Server overview](../concepts/vmcp.mdx) - conceptual overview of vMCP -- [MCP Optimizer UI guide](../guides-ui/mcp-optimizer.mdx) - standalone desktop - approach without Kubernetes (legacy, being replaced by the vMCP path) - [Quickstart: Kubernetes Operator](../guides-k8s/quickstart.mdx) - prerequisite tutorial diff --git a/sidebars.ts b/sidebars.ts index 6881a878..ec876f3c 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -59,7 +59,6 @@ const sidebars: SidebarsConfig = { }, 'toolhive/guides-ui/client-configuration', 'toolhive/guides-ui/cli-access', - 'toolhive/guides-ui/mcp-optimizer', 'toolhive/guides-ui/playground', ], }, diff --git a/vercel.json b/vercel.json index 112cd9f5..9c0c5dea 100644 --- a/vercel.json +++ b/vercel.json @@ -95,6 +95,11 @@ "source": "/toolhive/reference/crd-spec", "destination": "/toolhive/reference/crds", "permanent": true + }, + { + "source": "/toolhive/guides-ui/mcp-optimizer", + "destination": "/toolhive/guides-vmcp/optimizer", + "permanent": true } ], "installCommand": "dnf install -q -y jq && npm install",