#!/usr/bin/env node
import { config } from 'dotenv';
import { AcuityMCPServer } from './server.js';

config();

const userId = process.env.ACUITY_USER_ID;
const apiKey = process.env.ACUITY_API_KEY;
const oauth2Token = process.env.ACUITY_OAUTH2_TOKEN;

if (!userId || !apiKey) {
  console.error('Error: ACUITY_USER_ID and ACUITY_API_KEY must be set in environment variables');
  process.exit(1);
}

const server = new AcuityMCPServer(userId, apiKey, oauth2Token);
server.run().catch((error) => {
  console.error('Server error:', error);
  process.exit(1);
});
