UNPKG

@codai/memorai-mcp

Version:

MemorAI Advanced MCP Server - CBD-Based High-Performance Vector Memory System with HTTP/SSE Support

38 lines (30 loc) • 976 B
#!/usr/bin/env node /** * MemorAI MCP Server Startup Script * Starts the HTTP/SSE MCP server for VS Code integration */ const { spawn } = require('child_process'); const path = require('path'); console.log('šŸš€ Starting MemorAI MCP Server...'); const serverPath = path.join(__dirname, 'http-mcp-server.cjs'); const server = spawn('node', [serverPath], { stdio: 'inherit', cwd: __dirname }); server.on('error', (error) => { console.error('āŒ Failed to start MemorAI MCP Server:', error); process.exit(1); }); server.on('exit', (code) => { console.log(`šŸ›‘ MemorAI MCP Server exited with code ${code}`); process.exit(code); }); // Handle graceful shutdown process.on('SIGINT', () => { console.log('\nšŸ›‘ Shutting down MemorAI MCP Server...'); server.kill('SIGINT'); }); process.on('SIGTERM', () => { console.log('\nšŸ›‘ Shutting down MemorAI MCP Server...'); server.kill('SIGTERM'); });