UNPKG

substack-mcp-plus

Version:

Unofficial Substack MCP server. Born from frustration, built with AI. 12 tools, browser auth, rich text support. Not affiliated with Substack Inc.

40 lines (32 loc) • 1.22 kB
#!/usr/bin/env node import { spawn } from 'child_process'; import { fileURLToPath } from 'url'; import { dirname, join } from 'path'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); // Find the Python executable in the virtual environment const projectRoot = join(__dirname, '..'); const venvPython = process.platform === 'win32' ? join(projectRoot, 'venv', 'Scripts', 'python.exe') : join(projectRoot, 'venv', 'bin', 'python'); const setupScript = join(projectRoot, 'setup_auth.py'); console.log('šŸ”§ Starting Substack MCP Plus authentication setup...\n'); // Spawn the Python setup script const setupProcess = spawn(venvPython, [setupScript], { stdio: 'inherit', cwd: projectRoot }); setupProcess.on('error', (err) => { console.error('āŒ Failed to start setup:', err.message); console.error('šŸ’” Try running: python setup_auth.py'); process.exit(1); }); setupProcess.on('exit', (code) => { if (code === 0) { console.log('\nāœ… Setup complete! Next steps:'); console.log('1. Configure Claude Desktop (see docs)'); console.log('2. Restart Claude Desktop'); console.log('3. Start creating content!'); } process.exit(code || 0); });