Skip to main content
Glama
client.ts938 B
// import { jwtVerify } from 'jose'; // const JWT_SECRET = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!; // const JWT_ISSUER = 'claudekeep'; // const JWT_AUDIENCE = 'claudekeep-mcp'; import { SupabaseClient } from "@supabase/supabase-js"; export async function refreshUserToken(supabase: SupabaseClient, userId: string): Promise<string | null> { try { // Delete existing token await supabase.from('user_tokens').delete().eq('user_id', userId); // Call the API to generate a new token const response = await fetch('/api/auth/token', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ userId }), }); if (!response.ok) { throw new Error('Failed to refresh token'); } const { token } = await response.json(); return token; } catch (error) { console.error('Error refreshing token:', error); return null; } }

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/sdairs/claudekeep'

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