UNPKG

snow-flow

Version:

Snow-Flow v3.2.0: Complete ServiceNow Enterprise Suite with 180+ MCP Tools. ATF Testing, Knowledge Management, Service Catalog, Change Management with CAB scheduling, Virtual Agent chatbots with NLU, Performance Analytics KPIs, Flow Designer automation, A

64 lines 2.73 kB
#!/usr/bin/env node "use strict"; /** * ServiceNow MCP Server Launcher * Starts the ServiceNow MCP server with proper configuration */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const servicenow_mcp_server_js_1 = require("./servicenow-mcp-server.js"); const snow_oauth_js_1 = require("../utils/snow-oauth.js"); const dotenv_1 = __importDefault(require("dotenv")); // Load environment variables dotenv_1.default.config(); async function startServiceNowMCPServer() { console.log('🚀 Starting ServiceNow MCP Server...'); // Check if OAuth is configured const oauth = new snow_oauth_js_1.ServiceNowOAuth(); const isAuthenticated = await oauth.isAuthenticated(); if (isAuthenticated) { console.log('✅ ServiceNow OAuth authentication detected'); const credentials = await oauth.loadCredentials(); console.log(`🏢 Instance: ${credentials?.instance}`); } else { console.log('⚠️ ServiceNow OAuth not configured'); console.log('💡 Some tools will be unavailable until authentication is complete'); console.log('🔑 Run "snow-flow auth login" to authenticate'); } const config = { name: "servicenow-mcp-server", version: "1.0.0", oauth: { instance: process.env.SNOW_INSTANCE || '', clientId: process.env.SNOW_CLIENT_ID || '', clientSecret: process.env.SNOW_CLIENT_SECRET || '' } }; console.log('🔧 MCP Server Configuration:'); console.log(` 📛 Name: ${config.name}`); console.log(` 🏷️ Version: ${config.version}`); console.log(` 🏢 Instance: ${config.oauth.instance || 'Not configured'}`); console.log(` 🔑 Client ID: ${config.oauth.clientId ? '✅ Set' : '❌ Not set'}`); console.log(` 🔐 Client Secret: ${config.oauth.clientSecret ? '✅ Set' : '❌ Not set'}`); console.log(''); const server = new servicenow_mcp_server_js_1.ServiceNowMCPServer(config); console.log('🌐 ServiceNow MCP Server is running...'); console.log('💡 This server provides Claude Code with direct access to ServiceNow APIs'); console.log('🔧 Available tools depend on authentication status'); console.log('🛑 Press Ctrl+C to stop the server'); console.log(''); try { await server.run(); } catch (error) { console.error('❌ MCP Server error:', error); process.exit(1); } } if (require.main === module) { startServiceNowMCPServer().catch(console.error); } //# sourceMappingURL=start-servicenow-mcp.js.map