UNPKG

mcp-prompt-optimizer-local

Version:

Advanced Local Prompt Intelligence Engine - Complete privacy with sophisticated content analysis and optimization

60 lines (52 loc) โ€ข 2.2 kB
#!/usr/bin/env node /** * Simplified Setup for MCP Prompt Optimizer Local */ console.log('๐Ÿ—๏ธ MCP Prompt Optimizer Local - Setup\n'); const hasApiKey = process.env.OPTIMIZER_API_KEY; if (hasApiKey) { console.log('โœ… API key found in environment'); console.log('๐Ÿงช Testing license validation...\n'); const SimplifiedLicenseManager = require('./lib/license-manager'); const manager = new SimplifiedLicenseManager(); manager.validateLicense() .then(result => { if (result.valid) { console.log('โœ… License validation successful!'); console.log(`๐Ÿ“‹ Type: ${result.type}`); console.log(`๐ŸŽ Features: ${result.features.join(', ')}`); console.log('\n๐Ÿš€ Ready to use: mcp-prompt-optimizer-local'); console.log('\n๐Ÿ“– Claude Desktop configuration:'); console.log(`{ "mcpServers": { "prompt-optimizer-local": { "command": "mcp-prompt-optimizer-local", "env": { "OPTIMIZER_API_KEY": "${hasApiKey.substring(0, 20)}..." } } } }`); } else { console.log('โŒ License validation failed:', result.error); showSetupInstructions(); } }) .catch(error => { console.log('โš ๏ธ License validation error:', error.message); console.log('๐Ÿ’ก This might work in offline mode or with cached validation'); }); } else { console.log('โŒ No API key found'); showSetupInstructions(); } function showSetupInstructions() { console.log('\n๐Ÿ“‹ Setup Steps:'); console.log('1. ๐Ÿ”— Get your license: https://promptoptimizer-blog.vercel.app/local-license'); console.log('2. ๐Ÿ”ง Set environment variable:'); console.log(' export OPTIMIZER_API_KEY=your-license-key'); console.log('3. ๐Ÿงช Test setup: npm run setup'); console.log('4. ๐Ÿš€ Start server: mcp-prompt-optimizer-local'); console.log('\n๐Ÿ’ก The license enables all features: content analysis, debugging enhancement,'); console.log(' technical preservation, template management, and optional LLM integration.'); }