unity-mcp/MCPForUnity/Editor/Services
Marcus Sanatan 17cd543fab
Fix stdio reloads (#402)
* First pass at MCP client refactor

* Restore original text instructions

Well most of them, I modified a few

* Move configurators to their own folder

It's less clusterd

* Remvoe override for Windsurf because we no longer need to use it

* Add Antigravity configs

Works like Windsurf, but it sucks ass

* Add some docs for properties

* Add comprehensive MCP client configurators documentation

* Add missing imports (#7)

* Handle Linux paths when unregistering CLI commands

* Construct a JSON error in a much more secure fashion

* Fix stdio auto-reconnect after domain reloads

We mirror what we've done with the HTTP/websocket connection

We also ensure the states from the stdio/HTTP connections are handled separately. Things now work as expected

* Fix ActiveMode to return resolved transport mode instead of preferred mode

The ActiveMode property now calls ResolvePreferredMode() to return the actual active transport mode rather than just the preferred mode setting.

* Minor improvements for stdio bridge

- Consolidated the !useHttp && isRunning checks into a single shouldResume flag.
- Wrapped the fire-and-forget StopAsync in a continuation that logs faults (matching the HTTP handler pattern).
- Wrapped StartAsync in a continuation that logs failures and only triggers the health check on success.

* Refactor TransportManager to use switch expressions and improve error handling

- Replace if-else chains with switch expressions for better readability and exhaustiveness checking
- Add GetClient() helper method to centralize client retrieval logic
- Wrap StopAsync in try-catch to log failures when stopping a failed transport
- Use client.TransportName instead of mode.ToString() for consistent naming in error messages
2025-11-27 19:33:26 -04:00
..
Transport Fix stdio reloads (#402) 2025-11-27 19:33:26 -04:00
BridgeControlService.cs Fix stdio reloads (#402) 2025-11-27 19:33:26 -04:00
BridgeControlService.cs.meta New UI and work without MCP server embedded (#313) 2025-10-11 03:08:16 -04:00
ClientConfigurationService.cs Simplify MCP client configs (#401) 2025-11-27 18:18:44 -04:00
ClientConfigurationService.cs.meta New UI and work without MCP server embedded (#313) 2025-10-11 03:08:16 -04:00
HttpBridgeReloadHandler.cs Fix stdio reloads (#402) 2025-11-27 19:33:26 -04:00
HttpBridgeReloadHandler.cs.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
IBridgeControlService.cs HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
IBridgeControlService.cs.meta New UI and work without MCP server embedded (#313) 2025-10-11 03:08:16 -04:00
IClientConfigurationService.cs Simplify MCP client configs (#401) 2025-11-27 18:18:44 -04:00
IClientConfigurationService.cs.meta New UI and work without MCP server embedded (#313) 2025-10-11 03:08:16 -04:00
IPackageUpdateService.cs HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
IPackageUpdateService.cs.meta Notify users when there's a new version (#329) 2025-10-18 20:42:18 -04:00
IPathResolverService.cs HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
IPathResolverService.cs.meta New UI and work without MCP server embedded (#313) 2025-10-11 03:08:16 -04:00
IPlatformService.cs Remove old UI and do lots of cleanup (#340) 2025-10-24 00:50:29 -04:00
IPlatformService.cs.meta Remove old UI and do lots of cleanup (#340) 2025-10-24 00:50:29 -04:00
IServerManagementService.cs HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
IServerManagementService.cs.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
ITestRunnerService.cs Add testing and move menu items to resources (#316) 2025-10-13 11:16:43 -04:00
ITestRunnerService.cs.meta Add testing and move menu items to resources (#316) 2025-10-13 11:16:43 -04:00
IToolDiscoveryService.cs HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
IToolDiscoveryService.cs.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
MCPServiceLocator.cs HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
MCPServiceLocator.cs.meta New UI and work without MCP server embedded (#313) 2025-10-11 03:08:16 -04:00
PackageUpdateService.cs HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
PackageUpdateService.cs.meta Notify users when there's a new version (#329) 2025-10-18 20:42:18 -04:00
PathResolverService.cs HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
PathResolverService.cs.meta New UI and work without MCP server embedded (#313) 2025-10-11 03:08:16 -04:00
PlatformService.cs Remove old UI and do lots of cleanup (#340) 2025-10-24 00:50:29 -04:00
PlatformService.cs.meta Remove old UI and do lots of cleanup (#340) 2025-10-24 00:50:29 -04:00
ServerManagementService.cs Simplify MCP client configs (#401) 2025-11-27 18:18:44 -04:00
ServerManagementService.cs.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
StdioBridgeReloadHandler.cs Fix stdio reloads (#402) 2025-11-27 19:33:26 -04:00
StdioBridgeReloadHandler.cs.meta Fix stdio reloads (#402) 2025-11-27 19:33:26 -04:00
TestRunnerService.cs Harden PlayMode test runs (#396) 2025-11-25 17:08:33 -04:00
TestRunnerService.cs.meta Add testing and move menu items to resources (#316) 2025-10-13 11:16:43 -04:00
ToolDiscoveryService.cs HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
ToolDiscoveryService.cs.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
Transport.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00