Skip to main content
Glama

Convex MCP server

Official
by get-convex
useLastViewed.tsx1.74 kB
import { useEffect } from "react"; import { useLocalStorage } from "react-use"; export function useLastViewedTeam() { return useLocalStorage<string>(`/lastViewedTeam`); } export function useRememberLastViewedTeam(slug: string | undefined) { const [, setLastViewedTeam] = useLastViewedTeam(); useEffect(() => { if (slug !== undefined) { setLastViewedTeam(slug); } }, [slug, setLastViewedTeam]); } export function useLastViewedProject() { return useLocalStorage<string>(`/lastViewedProject`); } export function useRememberLastViewedProject(slug: string | undefined) { const [, setLastViewedProject] = useLastViewedProject(); useEffect(() => { if (slug !== undefined) { setLastViewedProject(slug); } }, [slug, setLastViewedProject]); } export function useLastViewedDeployment() { return useLocalStorage<string>(`/lastViewedDeployment`); } export function useLastViewedDeploymentForProject(projectSlug: string) { return useLocalStorage<string>( `/lastViewedDeploymentForProject/${projectSlug}`, ); } export function useRememberLastViewedDeploymentForProject( projectSlug: string, name: string | undefined, ) { const [, setLastViewedDeploymentForProject] = useLastViewedDeploymentForProject(projectSlug); useRememberLastViewedDeployment(name); useEffect(() => { if (name !== undefined) { setLastViewedDeploymentForProject(name); } }, [name, setLastViewedDeploymentForProject]); } function useRememberLastViewedDeployment(name: string | undefined) { const [, setLastViewedDeployment] = useLastViewedDeployment(); useEffect(() => { if (name !== undefined) { setLastViewedDeployment(name); } }, [name, setLastViewedDeployment]); }

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