Skip to main content
Glama

Google Calendar and Meet MCP Server

by INSIDE-HAIR
setup.ts•1.9 kB
/** * Vitest setup file * Configures global test environment and utilities */ import dotenv from 'dotenv'; import { beforeEach, vi } from 'vitest'; // Load environment variables for testing dotenv.config({ path: '.env.local' }); // Mock console methods to reduce noise during tests const originalConsole = { ...console }; beforeEach(() => { // Reset all mocks before each test vi.clearAllMocks(); vi.restoreAllMocks(); // Restore console console.log = originalConsole.log; console.error = originalConsole.error; console.warn = originalConsole.warn; }); // Global test utilities global.testUtils = { // Mock credentials path for tests getMockCredentialsPath: () => '/mock/path/to/credentials.json', getMockTokenPath: () => '/mock/path/to/token.json', // Mock event data getMockCalendarEvent: () => ({ id: 'test-event-id', summary: 'Test Event', description: 'Test Description', start: { dateTime: '2025-08-01T10:00:00Z' }, end: { dateTime: '2025-08-01T11:00:00Z' }, attendees: [{ email: 'test@example.com' }] }), // Mock space data getMockMeetSpace: () => ({ name: 'spaces/test-space-id', meetingUri: 'https://meet.google.com/test-meeting', meetingCode: 'test-code', config: { accessType: 'TRUSTED', entryPointAccess: 'ALL' } }), // Mock credentials data getMockCredentials: () => ({ installed: { client_id: 'mock-client-id', client_secret: 'mock-client-secret', redirect_uris: ['http://localhost:3000'] } }), // Mock token data getMockToken: () => ({ access_token: 'mock-access-token', refresh_token: 'mock-refresh-token', expiry_date: Date.now() + 3600000 }), // Helper to suppress console during specific tests suppressConsole: () => { console.log = vi.fn(); console.error = vi.fn(); console.warn = vi.fn(); } };

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