cli.js•531 B
#!/usr/bin/env node
import { spawn } from 'child_process';
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
const __dirname = dirname(fileURLToPath(import.meta.url));
// Run the TypeScript file with tsx
const child = spawn('npx', ['tsx', join(__dirname, 'src', 'index.ts')], {
stdio: 'inherit',
shell: true,
env: process.env
});
child.on('exit', (code) => {
process.exit(code || 0);
});
child.on('error', (err) => {
console.error('Failed to start MCP server:', err);
process.exit(1);
});