Angular Modernizer
    Preparing search index...

    Main MCP server class that handles the complete MCP protocol lifecycle.

    Owns the stdio server lifecycle. The protocol is served by the MCP SDK (serveStdio, both eras) over a size-limited stdio transport; the tools come from the tool registry.

    The stdio server ends when the client goes away: stdin end, close or error, a failing stdout (EPIPE), SIGINT, SIGTERM, SIGHUP, or its parent process disappearing. The last check covers clients that die while another process still holds the stdin pipe open, so EOF never arrives.

    Index

    Constructors

    Methods

    • Get server statistics.

      Returns { running: boolean; tools: { toolNames: string[]; totalTools: number } }

      • running: boolean

        Whether start() ran and the server has not stopped.

      • tools: { toolNames: string[]; totalTools: number }

        Registered tools.

        • toolNames: string[]

          Names of the registered tools.

        • totalTools: number

          Number of registered tools.

    • Get all registered tools as a map.

      Returns Map<string, MCPTool>

    • Check if the server is running.

      Returns boolean

    • Register an MCP tool with the server.

      Parameters

      Returns void

    • Start the MCP server and listen for messages via stdio.

      Returns void

    • Stop the MCP server.

      Returns void