VS Code API
    Preparing search index...

    Function registerMcpServerDefinitionProvider

    • Registers a provider that publishes Model Context Protocol servers for the editor to consume. This allows MCP servers to be dynamically provided to the editor in addition to those the user creates in their configuration files.

      Before calling this method, extensions must register the contributes.mcpServerDefinitionProviders extension point with the corresponding id, for example:

      	"contributes": {
      "mcpServerDefinitionProviders": [
      {
      "id": "cool-cloud-registry.mcp-servers",
      "label": "Cool Cloud Registry",
      }
      ]
      }

      When a new McpServerDefinitionProvider is available, the editor will, by default, automatically invoke it to discover new servers and tools when a chat message is submitted. To enable this flow, extensions should call registerMcpServerDefinitionProvider during activation.

      Parameters

      Returns Disposable

      A disposable that unregisters the provider when disposed.