Antonio-RiveroMartnez opened a new pull request, #36497:
URL: https://github.com/apache/superset/pull/36497
<!---
### SUMMARY
This PR adds support for FastMCP 2.13.0+ features to the MCP service:
Response Caching Middleware
- New caching.py module with ResponseCachingMiddleware integration
- Configurable TTLs for different MCP operations (list_tools,
list_resources, call_tool, etc.)
- Tool exclusion list for non-cacheable operations (execute_sql,
generate_chart, etc.)
- Uses FastMCP's native caching middleware for optimal performance
External Storage Layer
- New storage.py module providing a reusable Redis store factory
- get_mcp_store(prefix) factory function for creating prefixed stores
- Supports PrefixKeysWrapper for multi-tenant key isolation
- Extensible architecture for future features (auth state,
events, etc.)
Configuration
- MCP_STORE_CONFIG: Shared Redis infrastructure settings
- MCP_CACHE_CONFIG: Per-operation TTLs and exclusion rules
- Both disabled by default in OSS (opt-in)
Compatibility Updates
- Updated auth.py decorators for FastMCP 2.13.2+ compatibility
- Enhanced schema_utils.py with improved JSON parsing utilities
Testing
- Added unit tests for storage.py and caching.py
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A - Backend infrastructure changes
TESTING INSTRUCTIONS
1. Enable the features in the configs
2. Point to your redis
3. Call tools
4. Inspect your redis keys
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [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]