@zrald/graph-rag-mcp-server
Version:
Advanced Graph RAG MCP Server with sophisticated graph structures, operators, and agentic capabilities for AI agents
34 lines • 1.01 kB
JavaScript
import { GraphRAGMCPServer } from './mcp-server.js';
import { config } from 'dotenv';
// Load environment variables
config();
async function main() {
const server = new GraphRAGMCPServer();
// Handle graceful shutdown
process.on('SIGINT', async () => {
console.log('\nReceived SIGINT, shutting down gracefully...');
await server.shutdown();
process.exit(0);
});
process.on('SIGTERM', async () => {
console.log('\nReceived SIGTERM, shutting down gracefully...');
await server.shutdown();
process.exit(0);
});
try {
await server.initialize();
await server.start();
}
catch (error) {
console.error('Failed to start Graph RAG MCP Server:', error);
process.exit(1);
}
}
if (import.meta.url === `file://${process.argv[1]}`) {
main().catch((error) => {
console.error('Unhandled error:', error);
process.exit(1);
});
}
//# sourceMappingURL=index.js.map