feat: consolidate remote MCP servers to use url in config (#13762)

This commit is contained in:
Jack Wotherspoon
2025-12-02 20:01:33 -05:00
committed by GitHub
parent 145fb246a6
commit bdbbe9232d
9 changed files with 801 additions and 271 deletions

View File

@@ -107,6 +107,7 @@ describe('mcp add command', () => {
expect(mockSetValue).toHaveBeenCalledWith(SettingScope.User, 'mcpServers', {
'sse-server': {
url: 'https://example.com/sse-endpoint',
type: 'sse',
headers: { 'X-API-Key': 'your-key' },
},
});
@@ -122,7 +123,8 @@ describe('mcp add command', () => {
'mcpServers',
{
'http-server': {
httpUrl: 'https://example.com/mcp',
url: 'https://example.com/mcp',
type: 'http',
headers: { Authorization: 'Bearer your-token' },
},
},

View File

@@ -69,6 +69,7 @@ async function addMcpServer(
case 'sse':
newServer = {
url: commandOrUrl,
type: 'sse',
headers,
timeout,
trust,
@@ -79,7 +80,8 @@ async function addMcpServer(
break;
case 'http':
newServer = {
httpUrl: commandOrUrl,
url: commandOrUrl,
type: 'http',
headers,
timeout,
trust,