MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / setContext

Method setContext

packages/mcp/src/session-manager.ts:25–36  ·  view source on GitHub ↗
(id: string, context: McpAuthContext)

Source from the content-addressed store, hash-verified

23 }
24
25 async setContext(id: string, context: McpAuthContext): Promise<void> {
26 await getRedisCache().setJson(redisKey(id), SESSION_TTL_SECONDS, context);
27 logger.info(
28 {
29 sessionId: id,
30 clientType: context.clientType,
31 organizationId: context.organizationId,
32 projectId: context.projectId,
33 },
34 'MCP session context stored',
35 );
36 }
37
38 getContext(id: string): Promise<McpAuthContext | null> {
39 return getRedisCache().getJson<McpAuthContext>(redisKey(id));

Callers 2

handleMcpPostFunction · 0.80

Calls 3

getRedisCacheFunction · 0.90
redisKeyFunction · 0.85
infoMethod · 0.80

Tested by

no test coverage detected