@softeria/ms-365-mcp-server
Version:
Microsoft 365 MCP Server
27 lines (22 loc) • 864 B
JavaScript
import { Command } from 'commander';
import { readFileSync } from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const packageJsonPath = path.join(__dirname, '..', 'package.json');
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
const version = packageJson.version;
const program = new Command();
program
.name('ms-365-mcp-server')
.description('Microsoft 365 MCP Server')
.version(version)
.option('-v', 'Enable verbose logging')
.option('--login', 'Login using device code flow')
.option('--logout', 'Log out and clear saved credentials')
.option('--test-login', 'Test login without starting the server')
.option('--file <path>', 'Specify Excel file path');
export function parseArgs() {
program.parse();
return program.opts();
}