Theia API Documentation v1.65.0
    Preparing search index...

    A type that can provide Model Context Protocol server definitions. This should be registered using lm.registerMcpServerDefinitionProvider during extension activation.

    interface McpServerDefinitionProvider<
        T extends McpServerDefinition = McpServerDefinition,
    > {
        onDidChangeMcpServerDefinitions?: Event<void>;
        provideMcpServerDefinitions(token: CancellationToken): ProviderResult<T[]>;
        resolveMcpServerDefinition?(
            server: T,
            token: CancellationToken,
        ): ProviderResult<T>;
    }

    Type Parameters

    Index

    Properties

    onDidChangeMcpServerDefinitions?: Event<void>

    Optional event fired to signal that the set of available servers has changed.

    Methods

    • This function will be called when the editor needs to start a MCP server. At this point, the extension may take any actions which may require user interaction, such as authentication. Any non-readonly property of the server may be modified, and the extension should return the resolved server.

      The extension may return undefined to indicate that the server should not be started, or throw an error. If there is a pending tool call, the editor will cancel it and return an error message to the language model.

      Parameters

      Returns ProviderResult<T>

      The resolved server or thenable that resolves to such. This may be the given server definition with non-readonly properties filled in.