basic-server.ts•517 B
import { TestMCPServer } from '../src/server';
async function main() {
const server = new TestMCPServer({
port: 9002,
host: 'localhost',
debug: true
});
try {
await server.start();
console.log('Server is running...');
// Handle shutdown gracefully
process.on('SIGINT', async () => {
console.log('Shutting down...');
await server.stop();
process.exit(0);
});
} catch (error) {
console.error('Server failed:', error);
process.exit(1);
}
}
main();