UNPKG

ms365-mcp-server

Version:

Microsoft 365 MCP Server for managing Microsoft 365 email through natural language interactions with full OAuth2 authentication support

41 lines (32 loc) 1.13 kB
#!/usr/bin/env node import fs from 'fs'; import path from 'path'; import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); console.log('Setting up MS365 MCP Server...'); // Make CLI executable const binPath = path.join(__dirname, 'bin', 'cli.js'); if (fs.existsSync(binPath)) { try { fs.chmodSync(binPath, '755'); console.log('✓ Made CLI executable'); } catch (error) { console.warn('Warning: Could not make CLI executable:', error.message); } } else { console.warn('Warning: CLI file not found at', binPath); } // Display setup message console.log(` ✓ MS365 MCP Server installed successfully! Next steps: 1. Set up authentication: npx ms365-mcp-server --setup-auth 2. Start the server: npx ms365-mcp-server For help: npx ms365-mcp-server --help Authentication Setup: - Register app in Azure Portal: https://portal.azure.com - Set environment variables: MS365_CLIENT_ID, MS365_CLIENT_SECRET, MS365_TENANT_ID - Or use interactive setup with --setup-auth Documentation: https://github.com/yourusername/ms365-mcp-server `);