- Add 5-minute inactivity timeout to prevent memory leaks
- Reset timer on each message received from client
- Clear timer on transport close
- Add comprehensive tests for timeout behavior
- Fix async/await in redisRelayToMcpServer calls
Sessions will now automatically shutdown after 5 minutes of no client activity.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add Accept header to mock requests per MCP spec requirement
- Fix TypeScript build errors in integration tests
- Add shutdownSession calls to properly clean up MCP server intervals
- Update afterEach to ensure proper test cleanup
- Add debug configurations for Jest in VS Code launch.json
All tests now pass without hanging processes.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update tests to handle async session initialization
- Fix session ID retrieval from SSE/JSON responses
- Update DELETE request tests to match new behavior
- Remove references to deprecated startServerListeningToRedis
- Add proper waits for async operations
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add cleanup function to mcp server creation
- Export new Redis transport functions from index
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
**MCP Server Auth Page (src/auth/provider.ts):**
- Black background with white card design
- Official MCP logo and branding
- Clear client information display
- Elegant "Continue to Authentication" flow
- Professional MCP server identification
**Upstream Fake Auth Page (src/handlers/fakeauth.ts):**
- Updated branding to distinguish from MCP server
- Lock icon and "Upstream Authentication" title
- Clear user ID management with localStorage
- Generate/edit user ID functionality for testing
- Multi-user testing instructions
**Technical Updates:**
- Permissive CSP headers for both auth pages
- Logo serving route at /mcp-logo.png
- Responsive design with modern CSS
- Clear visual distinction between MCP server auth vs upstream auth
- Enhanced userId integration in OAuth authorization flow
Both pages now provide professional user experience while maintaining
clear distinction between the MCP server's auth and the fake upstream
provider auth for testing purposes.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add userId: string field to distinguish individual users from OAuth clients
- Prepares for user session isolation implementation
- clientId represents OAuth application, userId represents individual user
This separation allows multiple users to use the same OAuth client while
maintaining session isolation for security.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Test Redis subscription cleanup after response completion
- Test DELETE request session termination with control messages
- Test error handling for invalid session IDs
- Test user session isolation scenarios (documents expected behavior)
- Use MockRedisClient directly instead of mocking the mock
- Verify actual Redis channel creation and cleanup behavior
- Add proper Express Response mock with all required methods
Tests cover the three key areas:
1. Redis subscription cleanup after shttp responses
2. MCP server shutdown on DELETE requests
3. Session isolation between authenticated users
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add explicit DELETE request handling in handleStreamableHTTP
- Validate session existence before termination
- Send shutdown control messages to clean up Redis resources
- Return proper HTTP status codes (200 for success, 404 for not found)
- Fix TypeScript issue with JSONRPCMessage id access in redisTransport
- Add missing semicolon in startServerListeningToRedis call
Follows MCP specification for explicit session termination.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix timing issue by awaiting startServerListeningToRedis
- Add request-id based response channel routing
- Implement control message system for proper server shutdown
- Add comprehensive integration tests
- Ensure response subscription is established before message sending
- Fix MCP server cleanup integration to prevent async hanging
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Implement new ServerRedisTransport for server->client messages using request-specific channels
- Add redisRelayToMcpServer function for dynamic request-id based subscriptions
- Update shttp handler to use new transport return types with cleanup functions
- Remove old relayTransports and helper functions in favor of new architecture
- Add comprehensive test suites for Redis transport and shttp handler components
- Fix linting issues and ensure all tests pass
The new system routes server responses to channels like:
- mcp:shttp:toclient:${sessionId}:${requestId} for request responses
- mcp:shttp:toclient:${sessionId}:__GET_stream for notifications
This enables efficient scaling across multiple shttp instances as each client
only subscribes to channels relevant to their specific requests.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add detailed logging to Redis transport lifecycle
- Log session validation and message flow
- Track MCP server request handling
- Add diagnostics for streamable HTTP transport connections
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Updated Jest configuration to use ts-jest ESM preset
- Added NODE_OPTIONS flag for experimental VM modules support
- Fixed import statements in all test files to import Jest globals
- Rewrote provider.test.ts to work with ESM (using actual implementations with mock Redis)
- Fixed test expectations to match actual implementation
- Fixed encryption key generation in tests (using proper 64-char hex tokens)
- Standardized token_type to "Bearer" across codebase
- Removed unused imports to fix lint errors
- Excluded scratch folder from test runs
All tests now pass successfully with proper ES module support.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Relocked