Class McpService
java.lang.Object
fr.tiogars.chat.domains.mcp.services.McpService
Service for managing MCP services and executing actions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecuteAction(McpActionRequest request) Execute an action on an MCP service.Get all registered MCP service configurations.getService(String serviceId) Get a specific MCP service configuration by ID.registerService(McpServiceConfig config) Register a new MCP service.
-
Constructor Details
-
McpService
public McpService()
-
-
Method Details
-
getAllServices
Get all registered MCP service configurations.- Returns:
- list of all MCP service configs
-
getService
Get a specific MCP service configuration by ID.- Parameters:
serviceId- the service ID- Returns:
- the service configuration or null if not found
-
registerService
Register a new MCP service.- Parameters:
config- the service configuration- Returns:
- the registered configuration
-
executeAction
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
-