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,EAAK,KACX,YAAa,EAAK,YAClB,YAAa,EAAK,iBAMxB,GAAe,mBAAX,EAA6B,MAAO,CAAE,UAAW,IACrD,GAAe,iBAAX,EAA2B,MAAO,CAAE,QAAS,IAGjD,GAAe,eAAX,EACF,IACE,MAAM,KAAE,EAAM,UAAW,EAAO,CAAC,GAAM,GAAU,CAAC,EAElD,QAAQ,MAAM,cAAc,KAG5B,MAAM,EAAO,MAAM,MAAK,GAAK,EAAE,OAAS,IAExC,OAAI,GAAQ,EAAK,cACF,EAAK,QAAQ,GAIrB,CACL,MAAO,CACL,MAAO,MACP,QAAS,mBAAmB,KAGlC,CAAE,MAAO,GAEP,OADA,QAAQ,MAAM,uBAAwB,GAC/B,CACL,MAAO,CACL,MAAO,MACP,QAAS,+BAA+B,EAAM,WAGpD,CAIF,MAAO,CACL,MAAO,CACL,MAAO,MACP,QAAS,qBAAqB,KAGpC,CAAE,MAAO,GAEP,OADA,QAAQ,MAAM,mCAAoC,GAC3C,CACL,MAAO,CACL,MAAO,MACP,QAAS,6BAA6B,EAAM,WAGlD,GAIF,QAAQ,GAAG,WAAW,KACpB,QAAQ,MAAM,qCAAqC,IAIrD,MAAM,UAAY,IAAI,qBACtB,OAAO,QAAQ,WACZ,MAAK,IAAM,QAAQ,MAAM,GAAG,OAAO,yCACnC,OAAM,IACL,QAAQ,MAAM,qBAAqB,EAAM,WACzC,QAAQ,KAAK,EAAE","file":"/npm/outlook-mcp@2.3.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/outlook-mcp@2.3.0/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","#!/usr/bin/env node\n/**\n * Outlook MCP Server - Main entry point\n * \n * A Model Context Protocol server that provides access to\n * Microsoft Outlook through the Microsoft Graph API.\n */\nconst { Server } = require(\"@modelcontextprotocol/sdk/server/index.js\");\nconst { StdioServerTransport } = require(\"@modelcontextprotocol/sdk/server/stdio.js\");\nconst config = require('./config');\n\n// Import module tools\nconst { authTools } = require('./auth');\nconst { calendarTools } = require('./calendar');\nconst { emailTools } = require('./email');\nconst { folderTools } = require('./folder');\nconst { rulesTools } = require('./rules');\nconst { contactsTools } = require('./contacts');\nconst { tasksTools } = require('./tasks');\nconst { teamsTools } = require('./teams');\n\n// Log startup information\nconsole.error(`STARTING ${config.SERVER_NAME.toUpperCase()} MCP SERVER`);\nconsole.error(`Test mode is ${config.USE_TEST_MODE ? 'enabled' : 'disabled'}`);\n\n// Combine all tools\nconst TOOLS = [\n  ...authTools,\n  ...calendarTools,\n  ...emailTools,\n  ...folderTools,\n  ...rulesTools,\n  ...contactsTools,\n  ...tasksTools,\n  ...teamsTools\n];\n\n// Create server with tools capabilities\nconst server = new Server(\n  { name: config.SERVER_NAME, version: config.SERVER_VERSION },\n  { \n    capabilities: { \n      tools: TOOLS.reduce((acc, tool) => {\n        acc[tool.name] = {};\n        return acc;\n      }, {})\n    } \n  }\n);\n\n// Handle all requests\nserver.fallbackRequestHandler = async (request) => {\n  try {\n    const { method, params, id } = request;\n    console.error(`REQUEST: ${method} [${id}]`);\n    \n    // Initialize handler\n    if (method === \"initialize\") {\n      console.error(`INITIALIZE REQUEST: ID [${id}]`);\n      return {\n        protocolVersion: \"2024-11-05\",\n        capabilities: { \n          tools: TOOLS.reduce((acc, tool) => {\n            acc[tool.name] = {};\n            return acc;\n          }, {})\n        },\n        serverInfo: { name: config.SERVER_NAME, version: config.SERVER_VERSION }\n      };\n    }\n    \n    // Tools list handler\n    if (method === \"tools/list\") {\n      console.error(`TOOLS LIST REQUEST: ID [${id}]`);\n      console.error(`TOOLS COUNT: ${TOOLS.length}`);\n      console.error(`TOOLS NAMES: ${TOOLS.map(t => t.name).join(', ')}`);\n      \n      return {\n        tools: TOOLS.map(tool => ({\n          name: tool.name,\n          description: tool.description,\n          inputSchema: tool.inputSchema\n        }))\n      };\n    }\n    \n    // Required empty responses for other capabilities\n    if (method === \"resources/list\") return { resources: [] };\n    if (method === \"prompts/list\") return { prompts: [] };\n    \n    // Tool call handler\n    if (method === \"tools/call\") {\n      try {\n        const { name, arguments: args = {} } = params || {};\n        \n        console.error(`TOOL CALL: ${name}`);\n        \n        // Find the tool handler\n        const tool = TOOLS.find(t => t.name === name);\n        \n        if (tool && tool.handler) {\n          return await tool.handler(args);\n        }\n        \n        // Tool not found\n        return {\n          error: {\n            code: -32601,\n            message: `Tool not found: ${name}`\n          }\n        };\n      } catch (error) {\n        console.error(`Error in tools/call:`, error);\n        return {\n          error: {\n            code: -32603,\n            message: `Error processing tool call: ${error.message}`\n          }\n        };\n      }\n    }\n    \n    // For any other method, return method not found\n    return {\n      error: {\n        code: -32601,\n        message: `Method not found: ${method}`\n      }\n    };\n  } catch (error) {\n    console.error(`Error in fallbackRequestHandler:`, error);\n    return {\n      error: {\n        code: -32603,\n        message: `Error processing request: ${error.message}`\n      }\n    };\n  }\n};\n\n// Make the script executable\nprocess.on('SIGTERM', () => {\n  console.error('SIGTERM received but staying alive');\n});\n\n// Start the server\nconst transport = new StdioServerTransport();\nserver.connect(transport)\n  .then(() => console.error(`${config.SERVER_NAME} connected and listening`))\n  .catch(error => {\n    console.error(`Connection error: ${error.message}`);\n    process.exit(1);\n  });\n"]}