aminghadersohi opened a new pull request, #37617:
URL: https://github.com/apache/superset/pull/37617

   ### SUMMARY
   
   Add `MCP_PARSE_REQUEST_ENABLED` config option (default: `True`) to control 
whether the `parse_request` decorator applies its string-to-model parsing 
workaround for MCP tools.
   
   The `parse_request` decorator was introduced to work around a [Claude Code 
double-serialization 
bug](https://github.com/anthropics/claude-code/issues/5504) where requests 
arrive as JSON strings instead of objects. When set to `False`, the decorator 
becomes a no-op and returns the original function unchanged, letting FastMCP 
handle request parsing natively.
   
   **Changes:**
   - Add `MCP_PARSE_REQUEST_ENABLED = True` default in `mcp_config.py`
   - Add `_is_parse_request_enabled()` helper that checks Flask config (with 
fallback chain)
   - Early return in `parse_request` decorator when disabled
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   N/A - no UI changes
   
   ### TESTING INSTRUCTIONS
   1. Default behavior (enabled): Verify MCP tools continue to accept both JSON 
string and object requests as before
   2. Disabled: Set `MCP_PARSE_REQUEST_ENABLED = False` in 
`superset_config.py`, verify MCP tools work with FastMCP's native request 
parsing (object-only, no string workaround)
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [x] Introduces new feature or API
   - [ ] Removes existing feature or API


-- 
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]

Reply via email to