We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nabid-pf/youtube-video-summarizer-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
import { readFileSync } from 'fs';
import { dirname, join } from 'path';
import { fileURLToPath } from 'url';
export function getPackageVersion(): string {
try {
// ESM doesn't have __dirname, so we need to calculate it
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
// Navigate to the package.json from the current file
const packageJsonPath = join(__dirname, '..', '..', 'package.json');
// Read and parse package.json
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
return packageJson.version || '1.0.0';
} catch (error) {
// Return a default version if we can't read the package.json
return '1.0.0';
}
}