Skip to main content
Glama

Karakeep MCP server

by karakeep-app
ValidAccountCheck.tsx783 B
"use client"; import { useEffect } from "react"; import { useRouter } from "next/navigation"; import { api } from "@/lib/trpc"; /** * This component is used to address a confusion when the JWT token exists but the user no longer exists in the database. * So this component synchronusly checks if the user is still valid and if not, signs out the user. */ export default function ValidAccountCheck() { const router = useRouter(); const { error } = api.users.whoami.useQuery(undefined, { retry: (_failureCount, error) => { if (error.data?.code === "UNAUTHORIZED") { return false; } return true; }, }); useEffect(() => { if (error?.data?.code === "UNAUTHORIZED") { router.push("/logout"); } }, [error]); return <></>; }

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/karakeep-app/karakeep'

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