✨ feat: add MCP server support for agents
- Add MCP server configuration UI for agent settings - Update agent and session forms to include MCP server selection - Fix MCP API service logging and tools handling - Add Chinese localization for MCP settings - Update type definitions to support MCP server arrays This enables agents to use MCP (Model Control Protocol) servers as additional tools and capabilities in their execution context.
This commit is contained in:
@@ -113,14 +113,14 @@ class MCPApiService extends EventEmitter {
|
||||
const client = await mcpService.initClient(server)
|
||||
const tools = await client.listTools()
|
||||
|
||||
logger.info(`Server with id ${id} info:`, { tools: JSON.stringify(tools) })
|
||||
logger.silly(`Server with id ${id} info:`, { tools: JSON.stringify(tools.tools) })
|
||||
|
||||
return {
|
||||
id: server.id,
|
||||
name: server.name,
|
||||
type: server.type,
|
||||
description: server.description,
|
||||
tools
|
||||
tools: tools.tools
|
||||
}
|
||||
} catch (error: any) {
|
||||
logger.error(`Failed to get server info with id ${id}:`, error)
|
||||
|
||||
Reference in New Issue
Block a user