UNPKG

strategic-intelligence-mcp

Version:

Strategic Intelligence MCP Server - connecting technical progress to business outcomes with systematic strategic planning

49 lines 2.19 kB
#!/usr/bin/env node "use strict"; // Strategic Intelligence MCP Server CLI Entry Point console.error('Strategic Intelligence MCP: CLI started'); console.error('Strategic Intelligence MCP: Node version:', process.version); console.error('Strategic Intelligence MCP: Working directory:', process.cwd()); // Check for required environment async function checkEnvironment() { try { console.error('Strategic Intelligence MCP: Checking environment...'); // Check if we can write to the current directory const fs = await import('fs'); const path = await import('path'); const testFile = path.join(process.cwd(), '.strategic-mcp-test'); try { fs.writeFileSync(testFile, 'test'); fs.unlinkSync(testFile); console.error('Strategic Intelligence MCP: Write permissions OK'); } catch (writeError) { console.error('Strategic Intelligence MCP: WARNING - No write permissions in current directory:', writeError instanceof Error ? writeError.message : 'Unknown error'); } // Check if data file exists const dataPath = path.join(process.cwd(), 'strategic-data.json'); if (fs.existsSync(dataPath)) { console.error('Strategic Intelligence MCP: Data file exists at:', dataPath); } else { console.error('Strategic Intelligence MCP: Data file does not exist, will be created at:', dataPath); } } catch (envError) { console.error('Strategic Intelligence MCP: Environment check failed:', envError); } } checkEnvironment(); console.error('Strategic Intelligence MCP: Loading main server...'); // Re-export the main server functionality import('../index.js').catch((error) => { console.error('Strategic Intelligence MCP: Failed to load main server:', error); console.error('Strategic Intelligence MCP: Error details:', { message: error instanceof Error ? error.message : 'Unknown error', stack: error instanceof Error ? error.stack : 'No stack trace', cwd: process.cwd(), nodeVersion: process.version }); process.exit(1); }); //# sourceMappingURL=cli.js.map