Skip to content

fix(mecatui): load operator mcp.servers in embedded mode (#658) - #660

Merged
jbeda merged 1 commit into
mainfrom
wt-3
Aug 19, 2026
Merged

jbeda merged 1 commit into
mainfrom
wt-3

Conversation

@jbeda

@jbeda jbeda commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix #658: mecatui's embedded server silently ignored operator-tier mcp.servers from ~/.config/mecatl/settings.yaml.

Root cause: app.Build only folds the parsed mcp: settings block into cfg.MCPServers when cfg.MCPProfileLoader is installed. The three headless binaries (mecated, mecatequi, mecak8s) install it; mecatui embedded mode did not, so the settings half was parsed and discarded (commit edd944e missed it when back-fitting the resolution seam).

Fix: wire MCPProfileLoader: cliconfig.NewMCPProfileResolver(nil, os.LookupEnv) in embeddedConfig so operator settings activate with no flag. The legacy --mcp-server flag deliberately stays off — respecting the original heavier-opt-in intent from commit c33784d.

Also: composition-level WARN in app.Build — any loader-less consumer with an operator mcp.servers block now gets a single WARN naming the count (never names/URLs/tokens), so the silent-drop becomes loud for future consumers.

Review path (dev-pipeline)

Architect plan → implementer → 5-reviewer panel (spec + standards + security + reuse + duplication all no-findings; QA found two test-hardening items, both fixed) → iterate → commit. task lint, task test, go run ./cmd/mecademo all green.

Co-Authored-By: mecatl [email protected]

mecatui's embedded server wired no MCPProfileLoader, so the operator-tier
mcp.servers block from ~/.config/mecatl/settings.yaml was parsed by
permconfig and silently discarded before app.Build ever saw it. The three
headless binaries (mecated, mecatequi, mecak8s) were wired when the
loader was added in #562; mecatui was missed.

Wire NewMCPProfileResolver(nil, os.LookupEnv) so operator settings activate
under the TUI's embedded server with no flag required — the legacy
--mcp-server flag stays off per the original heavier-opt-in intent.

Also add a composition-level WARN: any consumer omitting the loader gets a
settings-only diagnostic (count only, never server names/URLs/tokens), so
the silent-drop is now loud for future consumers.

Co-Authored-By: mecatl <[email protected]>
@jbeda
jbeda merged commit bb1bcd1 into main Aug 19, 2026
15 checks passed
@jbeda
jbeda deleted the wt-3 branch August 19, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mecatui: option to honor static mcp.servers (settings/--mcp-server) in embedded mode, default off

1 participant