Skip to content
This repository was archived by the owner on Jul 27, 2026. It is now read-only.

bench: replay feat(mcp-clients) — MCP client subsystem with Smithery registry + UI - #2

Open
antfleet-ops wants to merge 1 commit into
mainfrom
bench/mcp-clients
Open

bench: replay feat(mcp-clients) — MCP client subsystem with Smithery registry + UI#2
antfleet-ops wants to merge 1 commit into
mainfrom
bench/mcp-clients

Conversation

@antfleet-ops

Copy link
Copy Markdown

Benchmark replay of tinyhumansai/openhuman#2276.

Adds MCP client subsystem: channel config panel, install dialog, server detail view, catalog browser — all in TypeScript/React.

Files under review: 10+ .tsx components + tests (ConfigAssistantPanel, InstallDialog, InstalledServerDetail, InstalledServerList, McpCatalogBrowser, ...)

AntFleet benchmark mirror — not maintained. Real project: github.com/tinyhumansai/openhuman

Adds an `mcp_clients` domain that lets users browse the Smithery.ai MCP
server registry, install servers locally, spawn them over stdio via the
existing JS/Python runtimes, and expose their tools to the agent.

Rust core (src/openhuman/mcp_clients/):
- Smithery registry client with 10-minute SQLite cache
- stdio MCP JSON-RPC client (initialize / tools/list / tools/call)
  behind a McpTransport trait so tests can inject a fake
- Per-server SQLite persistence (env values stored separately and
  never returned in list/status responses — only key names)
- 10 RPCs under openhuman.mcp_clients_* covering registry browse,
  install/uninstall, connect/disconnect, status, tool_call, and an
  LLM-backed config_assist for credential walkthroughs
- DomainEvent::Mcp{ServerInstalled,Connected,Disconnected,
  ClientToolExecuted} + bus subscriber
- tool_registry surfaces connected MCP-client tools to the agent
  with route { protocol: "mcp-client", rpc_method, server_id, tool_name }
- json_rpc_e2e lifecycle test + ~60 unit tests across the domain

React UI (app/src/components/channels/mcp/):
- New "MCP Servers" tab in the Channels page (virtual tab — not a
  backend channel definition)
- Catalog browser with debounced Smithery search + pagination
- Install dialog with per-required-env-key inputs (password type,
  values never logged or displayed back)
- Installed-server list + detail with Connect/Disconnect/Uninstall
- Inline config assistant chat that calls config_assist and can
  surface suggested env values
- Typed RPC wrapper in services/api/mcpClientsApi.ts
- Vitest suites for the wrapper and each non-trivial component
@antfleet

antfleet Bot commented May 20, 2026

Copy link
Copy Markdown

AntFleet · 2 findings

Both reviewers flagged the items below on the changed files. AntFleet posts only what two independent frontier models agree on.


Bug · Low — ConfigAssistantPanel error path leaves user message in history with no assistant reply and no rollback
app/src/components/channels/mcp/ConfigAssistantPanel.tsx:41-78

On a failed configAssist call, the user message is already appended to messages and the input is cleared. The error is shown, but the user has no way to retry without re-typing — and on the next send the failed user message is still included in the history sent to the server, with no assistant turn in between. This violates the request/response shape that most LLM endpoints expect (alternating user/assistant) and can confuse the backend or the next call's history validation.

Fix: Either (a) roll back the user message on failure, or (b) keep it but allow retry that does not re-append the same user message. Optionally restore the input text on error so user can edit/retry.


Maintainability · Low — InstallDialog re-fetches server detail when prefillEnv changes, causing unnecessary network calls
app/src/components/channels/mcp/InstallDialog.tsx

Including prefillEnv in the dependency array triggers a fresh registryGet whenever the suggested env values change, even though the server detail itself has not changed. This wastes network calls and risks brief UI flicker; only envValues need updating when prefillEnv changes.

Fix: Remove prefillEnv from the effect dependencies. Add a separate effect that, when detail is loaded and prefillEnv changes, updates envValues for the known keys without re-fetching detail.

Review eba8958d · claude-opus-4-7 + gpt-5 (unanimous) · 149s · ~$0.40

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants