Skip to main content
Glama

Calendar Tools MCP Server

auth.ts702 B
import { promises as fs } from "fs"; import { JWT } from "google-auth-library"; import path from "path"; const SCOPES = ["https://www.googleapis.com/auth/calendar"]; const CREDENTIALS_PATH = process.env.GOOGLE_CREDENTIALS_PATH || path.join(process.cwd(), "credentials.json"); export async function getAuthClient(): Promise<JWT> { try { const content = await fs.readFile(CREDENTIALS_PATH); const credentials = JSON.parse(content.toString()); const client = new JWT({ email: credentials.client_email, key: credentials.private_key, scopes: SCOPES, }); return client; } catch (error) { console.error("Authentication error:", error); throw error; } }

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/cablate/mcp-google-calendar'

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