mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-01 14:01:38 +01:00
* 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
46 lines
1.2 KiB
TypeScript
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;
|
|
}
|
|
}
|