Skip to main content
Glama
validate-config.ts1.34 kB
#!/usr/bin/env node import { getWranglerConfig } from '../src/config/wrangler-config'; import { env } from '../src/config/env'; /** * A script to validate all critical configurations for the Tally MCP server. * This should be run during CI/CD and before local development sessions. */ function validateAllConfigs(): void { console.log('🔍 Starting configuration validation...'); try { // 1. Validate environment variables console.log('Validating environment variables...'); // The `env` object from `src/config/env.ts` automatically validates on import. // If it fails, it will throw an error and the script will exit. // We reference it here to ensure it's loaded and validated. if (!env) { throw new Error('Environment variables could not be loaded.'); } console.log('✅ Environment variables are valid.'); // 2. Validate wrangler.toml console.log('Validating wrangler.toml...'); getWranglerConfig(); console.log('✅ wrangler.toml is valid.'); console.log('\n🎉 All configurations are valid!'); process.exit(0); } catch (error) { console.error('\n❌ Configuration validation failed:'); if (error instanceof Error) { console.error(error.message); } else { console.error(error); } process.exit(1); } } validateAllConfigs();

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/learnwithcc/tally-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server