Skip to main content

serve

Function serve 

Source
pub async fn serve(config: ServerConfig) -> Result<(), Error>
Expand description

Start the MCPLS server with the given configuration.

This is the primary entry point for running the MCP-LSP bridge. Implements graceful degradation: if some but not all LSP servers fail to initialize, the service continues with available servers.

§Errors

Returns an error if:

  • All LSP servers fail to initialize
  • MCP server setup fails
  • Configuration is invalid

§Graceful Degradation

  • All servers succeed: Service runs normally
  • Partial success: Logs warnings for failures, continues with available servers
  • All servers fail: Returns Error::AllServersFailedToInit with details