summaryrefslogtreecommitdiff
path: root/packages/server/src/config/config.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/server/src/config/config.ts')
-rw-r--r--packages/server/src/config/config.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/server/src/config/config.ts b/packages/server/src/config/config.ts
index e104eaaa..4221b71e 100644
--- a/packages/server/src/config/config.ts
+++ b/packages/server/src/config/config.ts
@@ -20,6 +20,7 @@ import { WriteFileTool } from '../tools/write-file.js';
import { WebFetchTool } from '../tools/web-fetch.js';
import { ReadManyFilesTool } from '../tools/read-many-files.js';
import { BaseTool, ToolResult } from '../tools/tools.js';
+import { StdioServerParameters } from '@modelcontextprotocol/sdk/client/stdio.js';
export class Config {
private toolRegistry: ToolRegistry;
@@ -35,6 +36,9 @@ export class Config {
private readonly toolDiscoveryCommand: string | undefined,
private readonly toolCallCommand: string | undefined,
private readonly mcpServerCommand: string | undefined,
+ private readonly mcpServers:
+ | Record<string, StdioServerParameters>
+ | undefined,
private readonly userAgent: string,
private userMemory: string = '', // Made mutable for refresh
private geminiMdFileCount: number = 0,
@@ -86,6 +90,10 @@ export class Config {
return this.mcpServerCommand;
}
+ getMcpServers(): Record<string, StdioServerParameters> | undefined {
+ return this.mcpServers;
+ }
+
getUserAgent(): string {
return this.userAgent;
}
@@ -146,6 +154,7 @@ export function createServerConfig(
toolDiscoveryCommand?: string,
toolCallCommand?: string,
mcpServerCommand?: string,
+ mcpServers?: Record<string, StdioServerParameters>,
userAgent?: string,
userMemory?: string,
geminiMdFileCount?: number,
@@ -161,6 +170,7 @@ export function createServerConfig(
toolDiscoveryCommand,
toolCallCommand,
mcpServerCommand,
+ mcpServers,
userAgent ?? 'GeminiCLI/unknown', // Default user agent
userMemory ?? '',
geminiMdFileCount ?? 0,