McpServerDefinitionProvider

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

Online Documentation

Properties

Link copied to clipboard

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

Link copied to clipboard
abstract var resolveMcpServerDefinition: (server: T, token: CancellationToken) -> ProviderResult<T>?

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.

Functions

Link copied to clipboard

Provides available MCP servers. The editor will call this method eagerly to ensure the availability of servers for the language model, and so extensions should not take actions which would require user interaction, such as authentication.