docs icon indicating copy to clipboard operation
docs copied to clipboard

issue: Inadequate documentation for TOOL_SERVER_CONNECTIONS environment variable

Open andyslucky opened this issue 3 months ago • 4 comments

I disable persistent configuration since I keep configuration in source control. I recently found the TOOL_SERVER_CONNECTIONS environment variable documented and created a json string to setup my MCPO server

[{"name": "Activepieces", "url": "http://mcpo.service.consul:8000/Activepieces"}]

This follows the sample in the documentation; however after redeploying I see the following errors in the log file:

{'type': 'missing', 'loc': ('response', 'TOOL_SERVER_CONNECTIONS', 0, 'path'), 'msg': 'Field required', 'input': {'name': 'Activepieces', 'url': 'http://mcpo.service.consul:8000/Activepieces'}}
{'type': 'missing', 'loc': ('response', 'TOOL_SERVER_CONNECTIONS', 0, 'auth_type'), 'msg': 'Field required', 'input': {'name': 'Activepieces', 'url': 'http://mcpo.service.consul:8000/Activepieces'}}
{'type': 'missing', 'loc': ('response', 'TOOL_SERVER_CONNECTIONS', 0, 'key'), 'msg': 'Field required', 'input': {'name': 'Activepieces', 'url': 'http://mcpo.service.consul:8000/Activepieces'}}
{'type': 'missing', 'loc': ('response', 'TOOL_SERVER_CONNECTIONS', 0, 'config'), 'msg': 'Field required', 'input': {'name': 'Activepieces', 'url': 'http://mcpo.service.consul:8000/Activepieces'}}

None of the following keys are documented:

  • path
  • auth_type
  • key
  • config

The only place I have seen an example of these is in a closed ticket https://github.com/open-webui/docs/issues/609

I believe the current documentation which is referenced in the closing comment (https://github.com/open-webui/docs/issues/609#issuecomment-3289379331), is not adequate, and is missing required information for users. This documentation should be updated to provide a clear schema / information about the structure of the tool server objects.

andyslucky avatar Oct 03 '25 02:10 andyslucky

It's not supposed to be used as an env var, but we might consider this use case. PR welcome as well!

tjbck avatar Oct 03 '25 03:10 tjbck

@tjbck why not if I may ask? It's already in the documentation. I think having global tools as configuration in code is an excellent use-case.

Here is a working example: https://github.com/javydekoning/homelab/blob/main/k8s/ai-platform/openwebui/TOOL_SERVER_CONNECTIONS.json https://github.com/javydekoning/homelab/blob/main/k8s/ai-platform/openwebui/kustomization.yaml#L13-L19

javydekoning avatar Oct 07 '25 19:10 javydekoning

@tjbck why not if I may ask? It's already in the documentation. I think having global tools as configuration in code is an excellent use-case.

Here is a working example: https://github.com/javydekoning/homelab/blob/main/k8s/ai-platform/openwebui/TOOL_SERVER_CONNECTIONS.json https://github.com/javydekoning/homelab/blob/main/k8s/ai-platform/openwebui/kustomization.yaml#L13-L19

I second this. That is exactly how I am using this as well.

andyslucky avatar Oct 11 '25 21:10 andyslucky

@tjbck why not if I may ask? It's already in the documentation. I think having global tools as configuration in code is an excellent use-case.

Here is a working example: https://github.com/javydekoning/homelab/blob/main/k8s/ai-platform/openwebui/TOOL_SERVER_CONNECTIONS.json https://github.com/javydekoning/homelab/blob/main/k8s/ai-platform/openwebui/kustomization.yaml#L13-L19

Also seconding this.

For my personal use case I have an automated discovery service that looks for deployments inside my cluster which are labeled as an mcp server. Having a mounted json file that can be overwritten by a sidecar container and is read regularly would be even better than the env var. Or being able to define an HTTP endpoint in the env var instead of a json file would also be an option I guess. I'm not sure if this is too niche of a use case though... If people think it makes sense I could work on a PR.

Edit:

It's not supposed to be used as an env var, but we might consider this use case. PR welcome as well!

I created a small PR implementing the concept of a updatable json file https://github.com/open-webui/open-webui/pull/18588

jobunk avatar Oct 24 '25 08:10 jobunk