Files
vscode/src/vscode-dts/vscode.proposed.mcpConfigurationProvider.d.ts
Connor Peet 248739282e mcp: support sse (#243621)
* mcp: support sse

Didn't seem like Claude Desktop configs have SSE support yet, but I did
the obvious of having an object with a `url`. I also added a `type`
(optional for stdio) so we can better disambiguate types of configs.

Example .vscode/mcp.json:

```
{
  "servers": {
    "everything": {
      "type": "sse",
      "url": "http://localhost:3001/sse"
    }
	}
}
```

Closes #243242

* update layer check
2025-03-15 06:32:00 +00:00

46 lines
1.2 KiB
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'vscode' {
// https://github.com/microsoft/vscode/issues/243522
export class McpStdioServerDefinition {
label: string;
cwd?: Uri;
command: string;
args: readonly string[];
env: Record<string, string | number | null>;
constructor(label: string, command: string, args: string[], env: { [key: string]: string });
}
export class McpSSEServerDefinition {
label: string;
uri: Uri;
headers: [string, string][];
constructor(label: string, uri: Uri);
}
export type McpServerDefinition = McpStdioServerDefinition | McpSSEServerDefinition;
export interface McpConfigurationProvider {
onDidChange?: Event<void>;
provideMcpServerDefinitions(token: CancellationToken): ProviderResult<McpServerDefinition[]>;
}
namespace lm {
export function registerMcpConfigurationProvider(id: string, provider: McpConfigurationProvider): Disposable;
}
}