Skip to main content
Glama

SearXNG Server

#!/usr/bin/env node import fs from 'fs'; import path from 'path'; import { fileURLToPath } from 'url'; import { createRequire } from 'module'; // Setup dirname equivalent for ES modules const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); // Use createRequire to load JSON files const require = createRequire(import.meta.url); const packageJson = require('../package.json'); const version = packageJson.version; // Path to index.ts const indexPath = path.join(__dirname, '..', 'index.ts'); // Read the file let content = fs.readFileSync(indexPath, 'utf8'); // Define a static version string to replace const staticVersionRegex = /const packageVersion = "([\d\.]+|unknown)";/; // Replace with updated version from package.json if (staticVersionRegex.test(content)) { content = content.replace(staticVersionRegex, `const packageVersion = "${version}";`); // Write the updated content fs.writeFileSync(indexPath, content); console.log(`Updated version in index.ts to ${version}`); } else { console.error('Could not find static version declaration in index.ts'); 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/ihor-sokoliuk/mcp-searxng'

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