Skip to main content
Glama
session-cookies.server.ts764 B
import { createCookieSessionStorage } from "react-router" type SessionData = { userId: string } type SessionFlashData = { error: string } const { getSession, commitSession, destroySession } = createCookieSessionStorage<SessionData, SessionFlashData>({ // a Cookie from `createCookie` or the CookieOptions to create one cookie: { name: "mcp_secret", isSigned: true, httpOnly: true, // Set to expire in year 9999 (effectively never) // expires: new Date("9999-12-31"), path: "/", sameSite: "lax", secrets: [process.env.AUTH_SECRET ?? ""], secure: true, }, }) export { getSession, commitSession, destroySession }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/supermemoryai/supermemory-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server