Class McpService

java.lang.Object
fr.tiogars.chat.domains.mcp.services.McpService

@Service public class McpService extends Object
Service for managing MCP services and executing actions.
  • Constructor Details

    • McpService

      public McpService()
  • Method Details

    • getAllServices

      public List<McpServiceConfig> getAllServices()
      Get all registered MCP service configurations.
      Returns:
      list of all MCP service configs
    • getService

      public McpServiceConfig getService(String serviceId)
      Get a specific MCP service configuration by ID.
      Parameters:
      serviceId - the service ID
      Returns:
      the service configuration or null if not found
    • registerService

      public McpServiceConfig registerService(McpServiceConfig config)
      Register a new MCP service.
      Parameters:
      config - the service configuration
      Returns:
      the registered configuration
    • executeAction

      public McpActionResponse executeAction(McpActionRequest request)
      Execute an action on an MCP service. This is a simplified implementation that simulates MCP calls. In a real implementation, this would connect to the actual MCP server.
      Parameters:
      request - the action request
      Returns:
      the action response