Merge pull request #202 from continuedev/tingwai/con-3456

fix: dont immediately exit on mcp config error
This commit is contained in:
Nate Sesti 2025-08-14 11:12:14 -07:00 • committed by GitHub
commit 47ddf3fa18
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -28,7 +28,9 @@ export class MCPConnection {
}
if (!config?.command) {
throw new Error("MCP server command is not specified");
const name = config?.name ?? config?.url ?? "server";
logger.error(`MCP command missing for ${name}`);
return;
}
const transport = new StdioClientTransport({

View file

@ -27,7 +27,9 @@ export class MCPService {
const connectionPromises = assistant.mcpServers.map((server) =>
MCPConnection.create(server),
);
const connections = await Promise.all(connectionPromises);
const connections = (await Promise.all(connectionPromises)).filter(
(item) => item !== undefined,
);
service.connections.push(...connections);
logger.debug("MCP connections established", {
connectionCount: connections.length,