@codai/cbd
Version:
Codai Better Database - High-Performance Vector Memory System with HPKV-inspired architecture and MCP server
37 lines • 1.15 kB
JavaScript
/*!
* CBD MCP Server CLI
* Command line interface for the CBD Model Context Protocol server
*/
import { CBDMCPServer } from './server.js';
async function main() {
try {
// Create and start the server
const server = new CBDMCPServer();
// Handle graceful shutdown
process.on('SIGINT', async () => {
console.error('🛑 Shutting down CBD MCP server...');
await server.stop();
process.exit(0);
});
process.on('SIGTERM', async () => {
console.error('🛑 Shutting down CBD MCP server...');
await server.stop();
process.exit(0);
});
// Start the server
await server.start();
}
catch (error) {
console.error('❌ Failed to start CBD MCP server:', error?.message || error);
process.exit(1);
}
}
// Only run if this file is being executed directly
if (import.meta.url === `file://${process.argv[1]}`) {
main().catch((error) => {
console.error('💥 Unhandled error:', error);
process.exit(1);
});
}
//# sourceMappingURL=cli.js.map