fix: enable dynamic MCP server start/stop without app restart#55
Merged
Mouseww merged 1 commit intoMouseww:mainfrom May 4, 2026
Merged
Conversation
The `mcp-server:saveConfig` handler only wrote config to disk without starting/stopping the MCP server, requiring a full app restart. Now it dynamically starts or stops the server after saving, matching the existing MITM proxy saveConfig pattern. Fixes Mouseww#54 Co-Authored-By: Craft Agent <agents-noreply@craft.do>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mcp-server:saveConfighandler now dynamically starts/stops the MCP server after saving config, instead of requiring a full app restartsaveConfighandlerProblem
When users enable the MCP Server toggle and click "保存 MCP Server 设置", the config is saved to disk but the server doesn't actually start. The UI shows "已停止" even though
enabled: true. Users must restart the entire app for the server to start. (See #54)Root Cause
The
mcp-server:saveConfigIPC handler only calledsaveMCPServerConfig(config)without invokinginitMCPServer(). The MCP server was only initialized once at app startup (app.whenReady).Fix
Added dynamic start/stop logic to
saveConfighandler (matching the existing MITM proxy pattern):Closes #54