#!/usr/bin/env node
/**
* Test Server for MCP Inspector
* Simple wrapper to run the MCP server for testing
*/
// Check if build exists, if not build first
import { existsSync } from 'fs';
import { spawn } from 'child_process';
if (!existsSync('./dist/index.js')) {
console.error('❌ Build not found. Please run "npm run build" first.');
process.exit(1);
}
// Run the compiled server
const child = spawn('node', ['dist/index.js'], {
stdio: 'inherit',
env: process.env
});
child.on('error', (error) => {
console.error('❌ Failed to start server:', error.message);
process.exit(1);
});
child.on('exit', (code) => {
process.exit(code);
});