UNPKG

gmail-mcp-server

Version:

Gmail MCP Server with on-demand authentication for SIYA/Claude Desktop. Complete Gmail integration with multi-user support and OAuth2 security.

18 lines (17 loc) 581 B
import * as fs from 'fs'; import * as path from 'path'; import * as os from 'os'; // Set up logging to temp file const logFile = path.join(os.tmpdir(), 'gmail-mcp-server.log'); // Logger utility functions export const logger = { log: (message) => { fs.appendFileSync(logFile, `[INFO] ${new Date().toISOString()} - ${message}\n`); }, error: (message, error) => { fs.appendFileSync(logFile, `[ERROR] ${new Date().toISOString()} - ${message}\n`); if (error) { fs.appendFileSync(logFile, `${error.stack || error}\n`); } } };