Skip to content

fix: refactor MCP server#511

Merged
luanfreitasdev merged 2 commits into4.xfrom
mcp-server-fixes
Feb 6, 2026
Merged

fix: refactor MCP server#511
luanfreitasdev merged 2 commits into4.xfrom
mcp-server-fixes

Conversation

@luanfreitasdev
Copy link
Member

This pull request introduces a major refactor to the MCP server management and its UI integration. The MCP server is now managed as a native Node.js instance within the Electron app, replacing the previous child process spawn approach. The UI receives a new, reactive MCP status indicator component, improving user feedback and error handling. Several improvements are made to project/environment switching logic for robustness.

MCP Server Management Refactor:

  • Replaced child process spawning logic in src/main/mcp-manager.ts with direct instantiation and management of the MCP server using the new createMcpServer API, enabling better integration, logging, and lifecycle management. [1] [2] [3]
  • Added system info logging and enhanced error handling/reporting for MCP server startup, shutdown, and status checks. Status is now broadcast to renderer windows.

MCP Server API and Initialization:

  • Introduced createMcpServer and McpServerInstance in src/mcp-server/index.ts, supporting both HTTP and stdio modes, structured logging, and clean shutdown. Standalone script execution is supported for desktop usage. [1] [2]

UI Integration and Status Indicator:

  • Replaced the old static MCP indicator in TheNavBar.vue with a new reactive NavBarMCP.vue component, which displays real-time MCP status, errors, and allows navigation to relevant settings or logs. [1] [2] [3]

Project/Environment Switcher Robustness:

  • Improved logic in NavBarProjectSwitcher.vue to prevent errors when project/environment info is missing, ensuring safer state updates and persistence. [1] [2] [3] [4]

Minor Typing Improvements:

  • Added explicit TypeScript language attribute to NavBarAlwaysOnTop.vue for improved type checking.

@luanfreitasdev luanfreitasdev marked this pull request as ready for review February 6, 2026 18:57
@luanfreitasdev luanfreitasdev merged commit fc0f824 into 4.x Feb 6, 2026
6 checks passed
@luanfreitasdev luanfreitasdev deleted the mcp-server-fixes branch February 6, 2026 18:57
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