feat: turn chatflow into MCP server (#5930)
* feat: turn chatflow into MCP server - Added '@modelcontextprotocol/sdk' version 1.12.0 - Added 'zod' version 3.25.32 - Added migrations for MCP server config - Added MCP endpoints (Streamable HTTP and SSE) - Added MCP server configuration tab - Added unit tests for MCP endpoints and services * feat: Implement MCP endpoint service with SSE support - Added a new MCP endpoint service to handle requests for chatflows, including support for SSE (Server-Sent Events) and stateless transport. - Introduced functions for handling MCP requests, SSE connections, and message routing. - Implemented error handling for service errors and session management for SSE. - Created unit tests for the MCP server service, covering configuration CRUD operations and token management. - Updated the MCP server configuration logic to ensure proper validation and error handling. - Refactored the UI component to utilize a new API hook for fetching MCP server configuration. * chore: handle error when get mcp server config * - Introduced a new chat type 'MCP' in the ChatType enum, including UI filters and backend processing. - Updated the zod dependency version specification to support both ^3.25.76 and ^4. - Fix setHasExistingConfig * fix: update chatflowCallback to enable chatflow building with active state for MCP * refactor: remove deprecated SSE transport endpoints and related logic - Removed handleGet and handleSseMessage methods from MCP endpoint controller. - Updated MCP endpoint routes to eliminate SSE-related routes. - Refactored service layer to remove SSE session management and related methods. - Updated tests to remove references to deprecated SSE functionality. - Adjusted UI component to remove SSE endpoint URL handling. * chore: update MCP endpoint routes and references to align with new API structure * chore: remove abortChatMessage when mcp request closed * optimize mcpserver dialog for dark mode * feat: implement form input schema generation for agentflow chatflows --------- Co-authored-by: Henry <hzj94@hotmail.com>
H
Hoang Doan committed
62a5d1d59c2a2c396ac926b5c828d43ad9c1132f
Parent: 96fca43
Committed by GitHub <noreply@github.com>
on 4/15/2026, 7:36:28 PM