block / block/buzz

feat(desktop): show MCP connection and agent-tool availability in the UI

Open
#5,060 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
32.7k
Forks
4.3k
Avg merge
1d 13h
Merged PRs (30d)
253

Description

## User experience

A Buzz Desktop user can configure an MCP server or Project connection and restart the app, but the agent session gives no reliable, user-visible answer to two basic questions: did the server load, and are its tools available to this agent? In the Playwright case, the server can run successfully while the agent exposes zero Playwright tools.

## Reproduction

1. Configure a stdio MCP server such as `@playwright/mcp` in the project/agent configuration.
2. Restart Buzz Desktop and start an agent session.
3. Ask the agent which tools are available, or attempt to call a tool from the configured server.
4. Observe that the UI does not show a per-server state, discovered tool list, binding to the current agent, or actionable startup error.

## Expected behavior

The Project or agent UI should show each configured MCP connection with a clear state such as `configured`, `starting`, `ready`, or `failed`. A ready connection should show the discovered tool names and the agents/projects to which it is bound. A failure should include an actionable diagnostic and a retry/test action. The active agent view should expose which external tools were injected at session launch.

## Actual behavior

The user receives no authoritative UI feedback. A configured server may be healthy when launched manually, yet its tools are absent from the agent session. The only practical detection is asking the agent or inspecting logs, and the current workaround requires planning all browser operations into one shell invocation.

## Impact

This makes MCP setup appear broken even when the server process is healthy, increases setup time, and causes users to fall back to fragile shell workflows for browser automation and other long-running integrations.

## Source references

- [`desktop/src-tauri/src/managed_agents/agent_snapshot.rs`](https://github.com/block/buzz/blob/2ea9385015fb922de2adf0a53e86fc5a21d07b90/desktop/src-tauri/src/managed_agents/agent_snapshot.rs#L20-L30) - documents machine-local runtime fields while portable agent snapshots omit MCP configuration details.
- [`desktop/src-tauri/src/managed_agents/agent_snapshot_tests.rs`](https://github.com/block/buzz/blob/2ea9385015fb922de2adf0a53e86fc5a21d07b90/desktop/src-tauri/src/managed_agents/agent_snapshot_tests.rs#L374-L402) - regression assertions explicitly require MCP toolset/command fields to be absent from snapshots.
- [`desktop/src-tauri/src/managed_agents/runtime.rs`](https://github.com/block/buzz/blob/2ea9385015fb922de2adf0a53e86fc5a21d07b90/desktop/src-tauri/src/managed_agents/runtime.rs#L510-L580) - derives and injects the built-in MCP command into the spawned runtime but does not provide a user-facing discovered-tool state.
- [`desktop/tests/e2e/config-bridge-screenshots.spec.ts`](https://github.com/block/buzz/blob/2ea9385015fb922de2adf0a53e86fc5a21d07b90/desktop/tests/e2e/config-bridge-screenshots.spec.ts#L252-L279) - tests MCP server rendering in configuration discovery, but not readiness, agent binding, or session-level tool visibility.

## Suggested acceptance criteria

- Project/agent configuration displays every MCP connection and its current lifecycle state.
- The UI can test or retry a connection and surfaces stderr/startup failures without exposing secrets.
- Successful `tools/list` discovery is visible, with tool names and the active agent binding.
- The active agent/session view indicates which MCP tools were injected.
- E2E coverage verifies ready, failed, empty-tool, and unbound states.

## Related

- #4852 - configured MCP servers are not visible to agent sessions.
- #4853 - shell child processes are killed when the shell exits.
- #4588 - Project-owned MCP connection setup.

Contributor guide

Open the contributing guide

Research direction

Start with desktop/src-tauri/src/managed_agents/runtime.rs and agent_snapshot.rs to trace MCP command injection and the fields currently omitted from snapshots. Read the related snapshot tests and desktop/tests/e2e/config-bridge-screenshots.spec.ts, then map the existing configuration and agent-session entry points. Done means the UI shows connection states, discovered tools, bindings, actionable failures, and E2E coverage for ready, failed, empty-tool, and unbound states.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, typescript
Domain
desktop, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.