Refactor MCP servlet to adapter architecture
Introduce clean adapter layer between Moqui infrastructure and MCP protocol: - transport/MoquiMcpTransport: Interface abstracting transport concerns - transport/SseTransport: SSE implementation with session management - adapter/McpSessionAdapter: Maps Moqui Visit to MCP sessions - adapter/McpToolAdapter: Maps MCP tools/methods to Moqui services - adapter/MoquiNotificationMcpBridge: Bridges Moqui notifications to MCP Simplify EnhancedMcpServlet to orchestrator role, removing inline session management, SSE logic, and tool dispatch. Remove redundant session validation in Initialize service (MoquiAuthFilter handles auth). Delete obsolete files: - VisitBasedMcpSession.groovy (replaced by McpSessionAdapter) - JsonRpcMessage.groovy (using plain Maps) - MoquiMcpTransport.groovy (replaced by new interface)
Showing
10 changed files
with
843 additions
and
344 deletions
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment