Skip to main content
Glama

Onyx Documentation MCP Server

validate.jsโ€ข2.5 kB
import { fileURLToPath } from 'url'; import path from 'path'; import fs from 'fs/promises'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); export async function validateSetup() { console.log('๐Ÿ” Quick validation of Onyx MCP setup...\n'); const validator = new ProjectValidator(); await validator.validate(); } class ProjectValidator { async validate() { let passed = 0; let failed = 0; // Test package.json try { const pkg = JSON.parse(await fs.readFile(path.join(__dirname, '../package.json'), 'utf8')); console.log(`โœ… Package.json: ${pkg.name} v${pkg.version}`); passed++; } catch (error) { console.log(`โŒ Package.json: ${error.message}`); failed++; } // Test SearchEngine try { const { SearchEngine } = await import('./core/search-engine.js'); const engine = new SearchEngine('/tmp'); console.log('โœ… SearchEngine: Module loads and instantiates'); passed++; } catch (error) { console.log(`โŒ SearchEngine: ${error.message}`); failed++; } // Test GitHubCrawler try { const GitHubCrawler = (await import('./crawlers/github.js')).default; const crawler = new GitHubCrawler(); console.log('โœ… GitHubCrawler: Module loads and instantiates'); passed++; } catch (error) { console.log(`โŒ GitHubCrawler: ${error.message}`); failed++; } // Test UrlCrawler try { const { UrlCrawler } = await import('./crawlers/urls.js'); const crawler = new UrlCrawler(); console.log('โœ… UrlCrawler: Module loads and instantiates'); passed++; } catch (error) { console.log(`โŒ UrlCrawler: ${error.message}`); failed++; } // Test data directory try { await fs.mkdir(path.join(__dirname, '../data'), { recursive: true }); console.log('โœ… Data directory: Created successfully'); passed++; } catch (error) { console.log(`โŒ Data directory: ${error.message}`); failed++; } console.log(`\n๐Ÿ“Š Results: ${passed} passed, ${failed} failed`); if (failed === 0) { console.log('๐ŸŽ‰ All validation checks passed!'); console.log('\n๐Ÿ“ Next steps:'); console.log('1. Run: onyx-mcp test'); console.log('2. Run: onyx-mcp crawl all'); console.log('3. Run: onyx-mcp server'); } else { console.log('โš ๏ธ Some validation checks failed.'); 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/elias-michaias/onyx_mcp'

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