cdi-mcp-server
Version:
CDI (Chemical Distribution Institute) MCP Server for retrieving and processing maritime inspection data with full CDI authentication support
28 lines (22 loc) • 596 B
JavaScript
import { fileURLToPath } from 'url';
import { dirname, resolve } from 'path';
import { spawn } from 'child_process';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const serverPath = resolve(__dirname, '../dist/index.js');
// Start the server
const server = spawn('node', [serverPath], {
stdio: 'inherit',
shell: true
});
// Handle process signals
process.on('SIGTERM', () => {
server.kill('SIGTERM');
});
process.on('SIGINT', () => {
server.kill('SIGINT');
});
server.on('close', (code) => {
process.exit(code);
});