Skip to main content
Glama

MCP Calendar Server

by Tekuor
get-token.ts853 B
import { google } from "googleapis"; import readline from "readline"; import dotenv from "dotenv"; dotenv.config(); const { GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GOOGLE_REDIRECT_URI } = process.env; const oAuth2Client = new google.auth.OAuth2( GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GOOGLE_REDIRECT_URI ); const SCOPES = ["https://www.googleapis.com/auth/calendar"]; const authUrl = oAuth2Client.generateAuthUrl({ access_type: "offline", scope: SCOPES, }); console.log("Authorize this app by visiting this URL:\n", authUrl); const rl = readline.createInterface({ input: process.stdin, output: process.stdout, }); rl.question("\nEnter the code from that page here: ", async (code) => { rl.close(); const { tokens } = await oAuth2Client.getToken(code); console.log("\nYour refresh token is:\n", tokens.refresh_token); });

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

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