stacklok / stacklok/mecatl

mecatui: configure the ToolHive MCP discovery group for its embedded server

Open
#1,019 0 comments 0 reactions 1 assignee View on GitHub

@JAORMX is already working on this.

Since Sep 7, 2026.

enhancement
Dominant language
Go
Stars
152
Forks
16
Avg merge
14h 48m
Merged PRs (30d)
536

Description

Problem

mecatui’s embedded mecated server enables ToolHive MCP workload discovery, but hard-codes ToolHive’s default group:

ToolHiveEnabled: true,
ToolHiveGroup:   "", // empty -> "default"

(cmd/mecatui/main.go:1089-1095)

Unlike mecated, mecatui does not expose --toolhive or --toolhive-group flags (cmd/mecatui/helpmeta.go:157-159). There is also no operator-global settings.yaml setting for the discovery group; the existing mcp.servers configuration only supports explicit Streamable HTTP endpoint profiles, not ToolHive workload discovery.

As a result, an operator whose running ToolHive MCP workloads belong to a non-default group cannot use automatic discovery in locally hosted mecatui. They must either run a separate mecated --toolhive-group GROUP and connect to it, or manually configure every ToolHive proxy URL.

Proposal

Add an operator-global configuration surface for the ToolHive MCP discovery group used by mecatui’s embedded server.

The setting should feed app.Config.ToolHiveGroup exactly as mecated’s existing --toolhive-group does. It must not be project-configurable: selecting a running-workload source is operator/deployment configuration, not repository-owned agent steering.

Optionally, expose the same setting as a local-only mecatui CLI override, mirroring mecated:

mecatui --toolhive-group engineering

Precedence should be explicit CLI override → operator-global settings → current default (default group).

Acceptance criteria

  1. An operator can configure the ToolHive MCP workload group for mecatui’s embedded server without running a separate mecated process.
  2. With no setting or flag, behavior remains unchanged: discovery is enabled and uses ToolHive’s default group.
  3. A local mecatui CLI override, if added, takes precedence over the operator-global setting.
  4. Project-level settings cannot set or override the ToolHive discovery group.
  5. The configured group reaches app.Config.ToolHiveGroup, and only workloads in that group are considered for discovery.
  6. Discovered workloads retain current behavior: running workloads only; Streamable HTTP proxy mode required; stdio-backed workloads remain supported when ToolHive proxies them as Streamable HTTP.
  7. The MCP inventory is available once at least one discovered endpoint connects successfully; no connected workload continues to mean no /mcp built-in.
  8. mecatui --help and the public mecatui/MCP documentation describe the new configuration and clarify that it applies only to embedded-server mode, not mecatui connect.
  9. Add offline coverage for default behavior, operator-global configuration, CLI precedence if implemented, and rejection/ignoring of project-tier configuration.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.