Skip to content

fix(mcp): connect servers immediately after dashboard install - #31

Open
elliottophellia wants to merge 1 commit into
enowdev:mainfrom
elliottophellia:auto-connect-mcp
Open

fix(mcp): connect servers immediately after dashboard install#31
elliottophellia wants to merge 1 commit into
enowdev:mainfrom
elliottophellia:auto-connect-mcp

Conversation

@elliottophellia

Copy link
Copy Markdown
Collaborator

Summary

Fixes newly added MCP servers remaining unavailable until the user manually clicks Refresh.

Both dashboard installation paths now run the shared MCP refresh lifecycle after saving and reloading configuration:

  • Manual Add server
  • MCP Browse installation

Deleting a server also refreshes the manager immediately, removing its registered tools and closing obsolete transports.

Implementation

Replaces the background Manager.Connect calls with the serialized Manager.Refresh lifecycle. This ensures that, before the mutation response returns:

  • Configured servers are connected
  • Connection errors are reflected in dashboard status
  • MCP tools are published to the agent registry
  • Removed tools are unregistered
  • Replaced transports are closed

Verification

  • go test ./...
  • go test -race ./internal/server ./internal/mcp
  • bun run typecheck
  • bun test
  • Focused tests for manual add, Browse install, deletion, and tool registry replacement

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.

1 participant