Skip to main content
Glama

Convex MCP server

Official
by get-convex
useAnalyticsCookies.ts1.24 kB
import useIsBrowser from "@docusaurus/useIsBrowser"; import { useCookies } from "react-cookie"; // We share a single cookie across the website, Docs, Stack, etc. to avoid // having users reject/accept the cookie banner repeatedly. When making changes, // ensure that those projects are updated as well. const COOKIE_NAME = "allowsCookies"; export function useAnalyticsCookies() { const [cookies, setCookie] = useCookies([COOKIE_NAME]); const isBrowser = useIsBrowser(); // An undefined value indicates that the cookie is not present, so the user // has not yet accepted or rejected the cookie banner. const allowsCookies = cookies[COOKIE_NAME] as boolean | undefined; const setAllowsCookies = (value: boolean) => { // Return early if we're running on the server. if (!isBrowser) { return; } const hostname = window.location.hostname; const isConvex = hostname === "convex.dev" || hostname.endsWith(".convex.dev"); setCookie(COOKIE_NAME, value, { domain: isConvex ? ".convex.dev" : undefined, path: "/", maxAge: 34560000, // Ensures cookie is only sent over HTTPS. secure: hostname !== "localhost", }); }; return { allowsCookies, setAllowsCookies }; }

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/get-convex/convex-backend'

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