UNPKG

@jupiterone/jupiterone-mcp

Version:

Model Context Protocol server for JupiterOne account rules and rule details

45 lines 1.66 kB
#!/usr/bin/env node "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const mcp_server_js_1 = require("./server/mcp-server.js"); const dotenv_1 = __importDefault(require("dotenv")); dotenv_1.default.config(); async function main() { try { // Get configuration from environment variables const config = { apiKey: process.env.JUPITERONE_API_KEY || '', accountId: process.env.JUPITERONE_ACCOUNT_ID || '', baseUrl: process.env.JUPITERONE_BASE_URL || 'https://graphql.us.jupiterone.io', oauthToken: process.env.JUPITERONE_OAUTH_TOKEN || '', }; // Create and start the MCP server const server = new mcp_server_js_1.JupiterOneMcpServer(config); // Handle graceful shutdown process.on('SIGINT', async () => { console.error('Received SIGINT, shutting down gracefully...'); await server.stop(); process.exit(0); }); process.on('SIGTERM', async () => { console.error('Received SIGTERM, shutting down gracefully...'); await server.stop(); process.exit(0); }); // Start the server await server.start(); } catch (error) { console.error('Failed to start JupiterOne MCP server:', error); process.exit(1); } } // Start the server main().catch((error) => { console.error('Unhandled error:', error); process.exit(1); }); //# sourceMappingURL=index.js.map