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

feat: add auto-connect and auto-switch features to Inspector - #76

Merged
tonxxd merged 7 commits into
betafrom
feat/auto-connect-disable
Oct 14, 2025
Merged

feat: add auto-connect and auto-switch features to Inspector#76
tonxxd merged 7 commits into
betafrom
feat/auto-connect-disable

Conversation

@tonxxd

@tonxxd tonxxd commented Oct 14, 2025

Copy link
Copy Markdown
Contributor

Description

This PR adds auto-connect and auto-switch features to the Inspector dashboard, improving the user experience when connecting to MCP servers.

Key Changes:

  • Auto-Connect Feature: Added a toggle to automatically connect to servers when selected
  • Auto-Switch Feature: Automatically switches between direct and proxy connections if one fails
  • Connection Tester: Temporary component to handle connection attempts with success/failure callbacks
  • UI Improvements: Added @radix-ui/react-switch for better toggle controls
  • Bug Fixes:
    • Fixed status dot display
    • Ensured 1 transport per request
    • Improved logging (console.warn instead of console.log for connection status)

The auto-connect and auto-switch states are persisted in localStorage for a seamless user experience.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)

📦 Changeset Required?

Does this PR need a changeset?

  • ✅ Yes - I have created a changeset (pnpm changeset)
  • ❌ No - This is an internal-only change (docs, tests, tooling)

Quick reminder:

pnpm changeset  # Creates a changeset interactively

📚 Full guide: Changeset Workflow Guide
Need help? See when to create changesets and examples

🚀 Release Target

  • main branch → Stable release (default)
  • beta branch → Beta/prerelease version
  • Other feature branch → No release

Releasing a beta? See the Beta Release Workflow Guide for instructions.

Checklist

Code Quality

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective or that my feature works
  • Existing tests pass locally (pnpm test)
  • Linting passes (pnpm lint)
  • Build succeeds (pnpm build)

Documentation

  • The title of my pull request follows the conventional commits standard
  • Changes have been documented in the README/documentation (if applicable)
  • Breaking changes are clearly documented with migration steps

Release Preparation

  • I have created a changeset (pnpm changeset) - if this affects published packages
  • The changeset has a clear, user-focused description
  • Version bump type is appropriate (patch/minor/major)
  • All affected packages are included in the changeset

Additional Notes

This feature is specifically for the Inspector package and improves the developer experience when working with MCP servers. The auto-switch feature is particularly useful when testing different connection methods.

- Added @radix-ui/react-switch dependency to manage auto-connect setting.
- Updated InspectorDashboard to include a switch for enabling/disabling auto-connect.
- Enhanced McpContext to handle auto-connect state and connect/disconnect servers accordingly.
- Implemented auto-connection logic in ServerDetail for seamless user experience.
… updates

- Updated logging in InspectorDashboard and ServerDetail components to use console.warn for better visibility of connection state changes.
- Enhanced pending navigation checks to include data presence before navigating or canceling navigation.
* fix status dot

* fix: 1 transport per request

* chore: version packages and update changelogs
…rDashboard

- Added a temporary ConnectionTester component to handle connection attempts with success and failure callbacks.
- Introduced an auto-switch feature that allows users to automatically switch between direct and proxy connections if one fails.
- Updated the InspectorDashboard to manage pending connection configurations and handle connection success/failure logic.
- Enhanced UI to include a switch for enabling/disabling the auto-switch feature, with state persistence in localStorage.
@tonxxd
tonxxd merged commit 22dab13 into beta Oct 14, 2025
@tonxxd
tonxxd deleted the feat/auto-connect-disable branch October 14, 2025 16:19
@tonxxd
tonxxd restored the feat/auto-connect-disable branch October 15, 2025 14:04
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.

1 participant