-
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Problem
The MCP status component doesn't update in real-time when MCP servers connect or disconnect. Users must restart Claude Code to see updated status.
Current Behavior
- MCP status is cached for 5 minutes (
CACHE_DURATION_MEDIUM) - Running
/mcpto reconnect a server doesn't update the statusline - Only way to see updated status is to restart Claude Code or wait for cache expiry
Root Cause
- No event-based mechanism to detect MCP state changes
- The statusline polls on a timer, not on MCP events
- Cache invalidation only happens on timeout, not on MCP operations
Proposed Solution
- Reduced Cache Duration: Reduce MCP cache to 30 seconds for more responsive updates
- Cache Invalidation Signal: Add mechanism for external tools to signal cache refresh
Files Affected
lib/mcp.sh- cache duration settingslib/cache/operations.sh- cache invalidation mechanism
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels