aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorClawd <ai@clawd.bot>2026-03-01 08:45:09 -0800
committerClawd <ai@clawd.bot>2026-03-01 08:45:09 -0800
commit12099b4f8cd10002810438bd309e208169960107 (patch)
treeb00e2043b6f66c1569c43c9ae9cad346f8dbdd42 /src/main
parentd44d0f61e4026da35c0d1a4acb87ba71ed6cd599 (diff)
feat(settings): add MCP server configuration
- Add McpSettings component with add/edit/delete server UI - Support stdio (command + args + env) and sse/http (url + headers) transports - Array builder for args, key-value builder for env vars and headers - Pass mcpServers config to SDK query() calls - Store config as JSON in settings table
Diffstat (limited to 'src/main')
-rw-r--r--src/main/claude/index.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/claude/index.ts b/src/main/claude/index.ts
index 7867a9f..d576c15 100644
--- a/src/main/claude/index.ts
+++ b/src/main/claude/index.ts
@@ -51,6 +51,10 @@ export async function sendMessage({
51 // Load global model override (empty string or null → let SDK use its default) 51 // Load global model override (empty string or null → let SDK use its default)
52 const configuredModel = getSetting("model") || undefined; 52 const configuredModel = getSetting("model") || undefined;
53 53
54 // Load MCP servers config (JSON string → object, or undefined if not set)
55 const mcpServersJson = getSetting("mcpServers");
56 const mcpServers = mcpServersJson ? JSON.parse(mcpServersJson) : undefined;
57
54 const phaseConfig = getPhaseConfig( 58 const phaseConfig = getPhaseConfig(
55 session.phase as Phase, 59 session.phase as Phase,
56 sessionDir, 60 sessionDir,
@@ -63,6 +67,7 @@ export async function sendMessage({
63 options: { 67 options: {
64 cwd: project.path, 68 cwd: project.path,
65 model: configuredModel, 69 model: configuredModel,
70 mcpServers,
66 resume: session.claude_session_id ?? undefined, 71 resume: session.claude_session_id ?? undefined,
67 tools: phaseConfig.tools, 72 tools: phaseConfig.tools,
68 permissionMode: phaseConfig.permissionMode, 73 permissionMode: phaseConfig.permissionMode,