codeant-ai-for-open-source[bot] commented on PR #38560:
URL: https://github.com/apache/superset/pull/38560#issuecomment-4031666291
## **Sequence Diagram**
This PR updates MCP message logging so that missing Flask application
context during the initialize handshake no longer breaks the flow, allowing the
handshake to succeed while still logging messages when context is available.
```mermaid
sequenceDiagram
participant Client
participant MCPServer
participant Middleware
participant EventLogger
Client->>MCPServer: Send initialize message
MCPServer->>Middleware: on_message with context
Middleware->>EventLogger: Log MCP message
alt Flask context available
EventLogger-->>Middleware: Log entry recorded
else No Flask context
EventLogger-->>Middleware: RuntimeError raised
Middleware->>Middleware: Catch error and skip logging
end
Middleware->>MCPServer: call_next and continue handling
MCPServer-->>Client: Initialize response success
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]