Skip to content

Conversation

@lvluoyue
Copy link
Contributor

@lvluoyue lvluoyue commented Oct 21, 2025

Added a new PSR-16 compliant cache-based session store implementation that allows using any PSR-16 compatible cache as the backend for session data storage.

Motivation and Context

This change addresses the need for flexible session storage solutions by implementing the SessionStoreInterface using PSR-16 standard cache. It provides developers with the ability to use Redis, Memcached, or other PSR-16 compliant cache systems for storing session data, offering more flexibility than file-based storage.

How Has This Been Tested?

Tested with Symfony Cache component's Redis implementation. All session operations function correctly with proper exception handling and key prefixing.

Breaking Changes

No breaking changes. This is a completely new feature implementation that does not affect existing code.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should still be an optional dependency - you might not need it when using the sdk

@chr-hertel chr-hertel added Server Issues & PRs related to the Server component Status: Needs Work labels Oct 21, 2025
Copy link
Member

@chr-hertel chr-hertel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lvluoyue for working on this - please see my comments and think about adding documentation as well 👍

@lvluoyue lvluoyue requested a review from chr-hertel October 25, 2025 07:24
@lvluoyue
Copy link
Contributor Author

Thanks @lvluoyue for working on this - please see my comments and think about adding documentation as well 👍

hi @chr-hertel , I have added the documentation as requested. Please review the code

Copy link
Member

@chr-hertel chr-hertel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @lvluoyue!

@lvluoyue lvluoyue force-pushed the main branch 2 times, most recently from faeb38f to 55eef46 Compare October 25, 2025 11:35
@chr-hertel chr-hertel merged commit f41ea86 into modelcontextprotocol:main Oct 27, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Server Issues & PRs related to the Server component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants