UNPKG

neuralmcp-mcp-adapter

Version:

Universal MCP adapter for Neural Memory MCP - Connect any IDE to persistent AI memory

48 lines (38 loc) 999 B
/** * Neural Memory MCP - Universal MCP Adapter * Main entry point for the package */ const { spawn } = require('child_process'); const path = require('path'); function startMCPAdapter(options = {}) { const { url = 'https://neuralmcp.promptbetter.live', token, timeout = 30000, debug = false } = options; if (!token) { throw new Error('Token is required'); } const binPath = path.join(__dirname, 'bin', 'neuralmcp-mcp.js'); const args = [ '--url', url, '--header', `Authorization:${token}`, '--timeout', timeout.toString() ]; if (debug) { args.push('--debug'); } const child = spawn('node', [binPath, ...args], { stdio: ['pipe', 'pipe', 'inherit'] }); return child; } module.exports = { startMCPAdapter }; // If run directly if (require.main === module) { console.log('Neural Memory MCP Adapter'); console.log('For CLI usage, run: npx @neuralmcp/mcp-adapter --help'); }