mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-07 03:40:36 -07:00
feat: consolidate remote MCP servers to use url in config (#13762)
This commit is contained in:
@@ -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' },
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user