Skip to content

Mcp server enhancements#515

Merged
luanfreitasdev merged 2 commits into4.xfrom
mcp-server-enhancements
Feb 12, 2026
Merged

Mcp server enhancements#515
luanfreitasdev merged 2 commits into4.xfrom
mcp-server-enhancements

Conversation

@luanfreitasdev
Copy link
Member

@luanfreitasdev luanfreitasdev commented Feb 12, 2026

This pull request introduces several improvements to error handling, logging, and robustness in the preload server and related utilities. It adds better diagnostics for server errors, timeouts for async operations, safer access to stores, and more resilient data processing. Additionally, it updates the MCP server URL output and bumps the package version.

Preload server and API robustness:

  • Added centralized error handling middleware to the Express app for catching and logging errors, and returning structured error responses. Also added a 404 handler for unknown routes. [1] [2]
  • Improved all /api/mcp/* endpoints to use optional chaining for safer access to stores, enhanced error logging, and standardized error responses when stores are uninitialized or data retrieval fails.
  • Introduced health check endpoint at /api/mcp/health for quickly assessing server status and store initialization.
  • Added request logging middleware for all incoming requests to aid in diagnostics.

Async operation reliability:

  • Added timeouts and improved error handling for IPC-based endpoints such as /api/mcp/search and /api/mcp/toggle-env, ensuring the client receives a response even if the backend hangs. [1] [2] [3]

Utility function resilience:

  • Updated applyLimit and slimForMcp in utils.js to wrap logic in try/catch blocks, log errors, and gracefully handle failures by returning fallback data. [1] [2] [3]

Other improvements:

  • Changed MCP server log output to show 127.0.0.1 instead of 0.0.0.0 for clarity.
  • Ensured window.LaraDumps is always defined with all expected store properties to prevent runtime errors.
  • Bumped package version from 4.11.3 to 4.11.4.

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