Skip to main content
Glama
run-with-smithery.js•1.43 kB
#!/usr/bin/env node // Enhanced Smithery runner for Brevo MCP import { spawn } from 'child_process'; import fs from 'fs'; import path from 'path'; import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const rootDir = path.resolve(__dirname, '..'); // Check if build exists const buildPath = path.join(rootDir, 'build', 'index.js'); if (!fs.existsSync(buildPath)) { console.log('šŸ”Ø Building project first...'); const buildProcess = spawn('npm', ['run', 'build'], { cwd: rootDir, stdio: 'inherit' }); buildProcess.on('exit', (code) => { if (code !== 0) { console.error('āŒ Build failed'); process.exit(1); } startSmithery(); }); } else { startSmithery(); } function startSmithery() { console.log('šŸš€ Starting Brevo MCP with Smithery...'); const smitheryProcess = spawn('node', ['scripts/start-smithery.js'], { cwd: rootDir, stdio: 'inherit' }); smitheryProcess.on('exit', (code) => { console.log(`Smithery process exited with code ${code}`); process.exit(code); }); smitheryProcess.on('error', (err) => { console.error('Failed to start Smithery:', err); process.exit(1); }); // Handle termination process.on('SIGINT', () => { smitheryProcess.kill('SIGINT'); }); process.on('SIGTERM', () => { smitheryProcess.kill('SIGTERM'); }); }

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/samihalawa/brevo-mcp'

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