Skip to main content
Glama

Google Calendar and Meet MCP Server

by INSIDE-HAIR
test-mcp.ts•2.43 kB
#!/usr/bin/env node /** * Test MCP server initialization and tool registration */ import dotenv from "dotenv"; import GoogleMeetAPI from "../src/GoogleMeetAPI.js"; // Load environment variables from .env.local dotenv.config({ path: ".env.local" }); async function testMCPInitialization() { console.log("šŸ” Testing MCP Server Initialization\n"); const credentialsPath = process.env.G_OAUTH_CREDENTIALS; if (!credentialsPath) { console.error("āŒ Please set G_OAUTH_CREDENTIALS environment variable"); process.exit(1); } console.log(`šŸ“ Using credentials: ${credentialsPath}`); const tokenPath = credentialsPath.replace(/\.json$/, ".token.json"); console.log(`šŸ”‘ Using token: ${tokenPath}`); try { // Test API initialization console.log("\nšŸ” Initializing Google Meet API..."); const api = new GoogleMeetAPI(credentialsPath, tokenPath); await api.initialize(); console.log("āœ… API initialized successfully"); // Check if token exists const fs = await import("fs"); if (fs.existsSync(tokenPath)) { console.log("āœ… Token file exists"); } else { console.log("āŒ Token file missing"); } // Test basic functionality console.log("\nšŸ“‹ Testing basic functionality..."); // Test Calendar API try { await api.listCalendarEvents(); console.log("āœ… Calendar API: Working"); } catch (error) { if ( error.message.includes("not been used") || error.message.includes("quota") ) { console.log("āœ… Calendar API: Available (API not enabled/quota limit)"); } else { console.log(`āš ļø Calendar API: ${error.message}`); } } // Test Meet API try { await api.createMeetSpace({ accessType: "TRUSTED" }); console.log("āœ… Meet API: Working"); } catch (error) { if ( error.message.includes("not been used") || error.message.includes("disabled") ) { console.log("āœ… Meet API: Available (API not enabled)"); } else { console.log(`āš ļø Meet API: ${error.message}`); } } console.log("\nšŸŽÆ MCP Server should work correctly with Claude Desktop"); console.log("āœ… All components initialized properly"); } catch (error) { console.error("āŒ Initialization failed:", error.message); process.exit(1); } } testMCPInitialization().catch(console.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/INSIDE-HAIR/mcp-google-calendar-and-meet'

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