Summary
Add safeguards to protect against unintended consequences when AI agents use the MCP server to manage Redis infrastructure.
Current Safeguards
--read-only mode blocks write operations
- Credential masking in profile tool outputs
Proposed Safeguards
Priority 1: Rate Limiting / Request Quotas
Priority 2: Tool Filtering
This extends the current --read-only concept to more granular control:
Note: When we add write tools (database creation, updates, deletions), tool filtering becomes critical. The --read-only flag already demonstrates this pattern - we just need to extend it.
Priority 3: Destructive Operation Guards
Priority 4: Audit Logging
Priority 5: Scope Limiting
Priority 6: Cost Awareness
Priority 7: Dry-Run Mode
Implementation Notes
- tower-mcp provides middleware layers for rate limiting
- Could use tower's
RateLimitLayer and ConcurrencyLimitLayer
- Tool filtering could be done at router construction time using tower-mcp's filtering APIs
- Audit logging fits naturally as middleware
- The existing
--read-only implementation in AppState is a good pattern to extend
Related
Summary
Add safeguards to protect against unintended consequences when AI agents use the MCP server to manage Redis infrastructure.
Current Safeguards
--read-onlymode blocks write operationsProposed Safeguards
Priority 1: Rate Limiting / Request Quotas
--max-requests-per-minute,--quota-windowPriority 2: Tool Filtering
This extends the current
--read-onlyconcept to more granular control:--disable-tools=profile_delete,profile_set_*--allow-tools=profile_list,profile_show--cloud-read-only,--enterprise-read-only--allow-operations=read,listvscreate,update,deleteNote: When we add write tools (database creation, updates, deletions), tool filtering becomes critical. The
--read-onlyflag already demonstrates this pattern - we just need to extend it.Priority 3: Destructive Operation Guards
--require-confirmationflag for delete operationsPriority 4: Audit Logging
--audit-log=/path/to/audit.jsonlPriority 5: Scope Limiting
--allowed-profiles=prod,stagingPriority 6: Cost Awareness
has_cost_implicationsmetadataPriority 7: Dry-Run Mode
--dry-runflag to preview changes without executingImplementation Notes
RateLimitLayerandConcurrencyLimitLayer--read-onlyimplementation inAppStateis a good pattern to extendRelated