msteams-mcp-server
Version:
Microsoft Teams MCP Server - Complete Teams integration for Claude Desktop and MCP clients with secure OAuth2 authentication and comprehensive team management
36 lines (27 loc) ⢠1.11 kB
JavaScript
import fs from 'fs';
import path from 'path';
import os from 'os';
const CONFIG_DIR = path.join(os.homedir(), '.msteams-mcp');
try {
// Create configuration directory if it doesn't exist
if (!fs.existsSync(CONFIG_DIR)) {
fs.mkdirSync(CONFIG_DIR, { recursive: true });
console.log('ā
Created Microsoft Teams MCP configuration directory');
}
console.log(`
š Microsoft Teams MCP Server installed successfully!
š Configuration directory: ${CONFIG_DIR}
š Quick Start:
1. Authenticate: npx msteams-mcp-server --login
2. Start server: npx msteams-mcp-server
š§ Setup Options:
- Device Code Flow (Recommended): npx msteams-mcp-server --login
- Environment Variables: Set TEAMS_CLIENT_ID, TEAMS_TENANT_ID
- Interactive Setup: npx msteams-mcp-server --setup-auth
š Help: npx msteams-mcp-server --help
š For Azure App Registration guidance, see the README.md
`);
} catch (error) {
console.error('ā ļø Warning: Could not create configuration directory:', error.message);
console.log('This may affect authentication setup, but the server should still work.');
}