ART Framework API Docs
    Preparing search index...

    Class McpManager

    Manages MCP (Model Context Protocol) server connections and tool registration.

    The McpManager is responsible for:

    • Connecting to configured MCP servers.
    • Discovering available tools from servers.
    • Creating proxy tools that wrap MCP server tools.
    • Registering proxy tools with the ToolRegistry.
    • Managing server health and status.
    • Handling thread-specific tool activation/deactivation.

    This enables dynamic tool loading from external MCP servers while maintaining seamless integration with the ART Framework's tool system.

    McpManager

    Index

    Constructors

    • Creates an instance of McpManager.

      Parameters

      • toolRegistry: ToolRegistry

        The tool registry to register proxy tools with.

      • _stateManager: StateManager

        The state manager (not currently used).

      • OptionalauthManager: AuthManager

        The authentication manager.

      Returns McpManager

    Methods

    • Searches a discovery service for available MCP servers.

      Parameters

      • OptionaldiscoveryEndpoint: string

        The URL of the discovery service.

      Returns Promise<McpServerConfig[]>

      A promise resolving to an array of McpServerConfig.

    • Initializes the McpManager, discovers and registers tools from configured servers.

      Parameters

      • OptionalmcpConfig: { discoveryEndpoint?: string; enabled?: boolean }

        The MCP configuration.

        • OptionaldiscoveryEndpoint?: string

          The endpoint for discovering MCP servers.

        • Optionalenabled?: boolean

          Whether MCP is enabled.

      Returns Promise<void>

      A promise that resolves when initialization is complete.

    • Shuts down all active MCP connections.

      Returns Promise<void>

      A promise that resolves when all connections are shut down.

    • Uninstalls a server: disconnects, removes registered proxy tools, and deletes config.

      Parameters

      • serverId: string

        The ID of the server to uninstall.

      Returns Promise<void>

      A promise that resolves when the server is uninstalled.