UNPKG

@noanswer/context-compose

Version:

Orchestrate complex AI interactions with Context Compose. A powerful CLI and server for building, validating, and managing context for large language models using the Model Context Protocol (MCP).

29 lines 776 B
#!/usr/bin/env node import ContextComposeServer from './src/index.js'; import logger from './src/logger.js'; /** * Start the MCP server */ async function startServer() { const server = new ContextComposeServer(); // Handle graceful shutdown process.on('SIGINT', async () => { await server.stop(); process.exit(0); }); process.on('SIGTERM', async () => { await server.stop(); process.exit(0); }); try { await server.start(); } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); logger.error(`Failed to start MCP server: ${errorMessage}`); process.exit(1); } } // Start the server startServer(); //# sourceMappingURL=server.js.map