inspector icon indicating copy to clipboard operation
inspector copied to clipboard

Implement auto-open feature for browser launch on server start

Open moeki0 opened this issue 8 months ago • 7 comments

Motivation and Context

This eliminates the manual step of copying URLs and opening browsers, making the development workflow more efficient.

How Has This Been Tested?

Tested on macOS environments with various browsers (Chrome, Firefox, Safari). Verified that the feature respects user configuration and can be disabled via configuration options.

Breaking Changes

No breaking changes. The feature is enabled by default but can be disabled through configuration.

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Documentation update

Checklist

  • [x] I have read the [MCP Documentation](https://modelcontextprotocol.io)
  • [x] My code follows the repository's style guidelines
  • [x] New and existing tests pass locally
  • [x] I have added appropriate error handling
  • [x] I have added or updated documentation as needed

moeki0 avatar Apr 07 '25 07:04 moeki0

@cliffhall I've commited

moeki0 avatar Apr 13 '25 13:04 moeki0

This is a double negative that made me have to think about its validity for a second. Could it instead be "Enable Browser Auto-open" and default to true?

Screenshot 2025-04-14 at 12 53 41 PM

cliffhall avatar Apr 14 '25 16:04 cliffhall

@cliffhall Review please

moeki0 avatar Apr 17 '25 09:04 moeki0

@cliffhall Review please

@kawakamidev It works fine for opening, but the UI configuration field doesn't change the behavior. If I set it to false then close the inspector, when I run the inspector again, it just auto launches.

cliffhall avatar Apr 18 '25 22:04 cliffhall

@kawakamidev It works fine for opening, but the UI configuration field doesn't change the behavior. If I set it to false then close the inspector, when I run the inspector again, it just auto launches.

The problem here is that for this to work, the setting can't just be stored in the browser's local storage, it also has to write back to a locally stored configuration that will be consulted before the app launches next time. That's tough, since we don't currently have such a file and plumbing backwards from the client to write it would be a pain.

Perhaps we should trim this back to the place you originally had it. Just the auto-open, no UI affordance.

cliffhall avatar Apr 30 '25 17:04 cliffhall

OK

moeki0 avatar May 04 '25 10:05 moeki0

@cliffhall I have reverted the changes!

moeki0 avatar May 04 '25 10:05 moeki0