-
Notifications
You must be signed in to change notification settings - Fork 711
Open
Description
During integration of MCP Server capabilities into our platform, we've come across a use case where we need to utilize certain session specific parameters across all RPC calls during the session. We are utilizing our own transport layer and utilizing core functionality only with a different approach to sessions, so this may not be 100% relevant for all, but, two minor changes would open up new capabilities:
- Adding a generic "Map<String, Object> sessionParameters" variable to McpServerSession
- Making "session" variable within McpAsyncServerExchange & McpSyncServerExchange accessible
With these two, information such as requestor profile can be passed with an initial request and made accessible in tool calls:
(exchange, arguments) -> {
McpServerSession session = exchange.getSession();
Map<String, Object> sessionParameters = session.getSessionParameters();
//Enriched tool call with arguments & sessionParameters
}
krzysztof-osiecki, stantonk, MaxHoecker and MarkRx
Metadata
Metadata
Assignees
Labels
No labels