Skip to main content
Glama

AutoDev Codebase MCP Server

by anrgct
demo-runner.js•3.05 kB
#!/usr/bin/env node /** * Simple demo runner that can be executed directly * This compiles and runs the TypeScript demo */ const { spawn } = require('child_process') const path = require('path') const fs = require('fs') async function main() { console.log('šŸš€ AutoDev Codebase Demo Runner') console.log('=' .repeat(40)) // Check if we need to build first const distExists = fs.existsSync('./dist') if (!distExists) { console.log('šŸ“¦ Building project first...') await runCommand('npm', ['run', 'build']) console.log('āœ… Build complete') } // Check dependencies console.log('šŸ” Checking dependencies...') // Check if Ollama is running try { const response = await fetch('http://localhost:11434/api/tags') if (response.ok) { const data = await response.json() console.log('āœ… Ollama is running') console.log('šŸ“‹ Available models:', data.models?.map(m => m.name).join(', ') || 'None') } } catch (error) { console.log('āŒ Ollama not accessible at http://localhost:11434') console.log(' Please start Ollama: ollama serve') console.log(' And install embedding model: ollama pull nomic-embed-text') } // Check if Qdrant is running try { const response = await fetch('http://localhost:6333/collections') if (response.ok) { console.log('āœ… Qdrant is running') } } catch (error) { console.log('āŒ Qdrant not accessible at http://localhost:6333') console.log(' Please start Qdrant with Docker:') console.log(' docker run -p 6333:6333 qdrant/qdrant') } console.log('\nšŸŽÆ Starting demo...') console.log('=' .repeat(40)) // Run the compiled demo const demoPath = './dist/src/examples/run-demo.js' if (fs.existsSync(demoPath)) { await runCommand('node', [demoPath], { stdio: 'inherit' }) } else { console.error('āŒ Demo file not found. Please run: npm run build') process.exit(1) } } function runCommand(command, args, options = {}) { return new Promise((resolve, reject) => { const proc = spawn(command, args, { stdio: options.stdio || 'pipe', shell: true, ...options }) let stdout = '' let stderr = '' if (proc.stdout) { proc.stdout.on('data', (data) => { stdout += data.toString() if (options.stdio !== 'inherit') { process.stdout.write(data) } }) } if (proc.stderr) { proc.stderr.on('data', (data) => { stderr += data.toString() if (options.stdio !== 'inherit') { process.stderr.write(data) } }) } proc.on('close', (code) => { if (code === 0) { resolve({ stdout, stderr }) } else { reject(new Error(`Command failed with code ${code}: ${stderr}`)) } }) proc.on('error', reject) }) } // Handle graceful shutdown process.on('SIGINT', () => { console.log('\nšŸ‘‹ Demo stopped') process.exit(0) }) main().catch(error => { console.error('āŒ Demo failed:', error) process.exit(1) })

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/anrgct/autodev-codebase'

If you have feedback or need assistance with the MCP directory API, please join our Discord server