mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-13 17:26:04 +00:00
The MCP detail page invokes testMcp() through an imperative handle (formRef.current.testMcp()). The handle closure is only refreshed when [mcpTesting] changes, so testMcp read a stale snapshot of the stdioArgs/ extraArgs React state — on the detail page that snapshot is the empty initial [], so stdio 'args' were dropped entirely. The sandbox then launched 'uvx' with no package, which exits 2 and surfaces only an opaque 'Connection closed' with no detail. Read command/args/env via form.getValues() (kept in sync on every edit and on load) instead of the captured state, matching how 'command' was already read. Fixes stdio MCP test failing with empty args on the detail page.
Debug LangBot Frontend
Please refer to the Development Guide for more information.