Skip to main content
Glama
version.mts910 B
import { readFileSync } from 'node:fs' let crateVersion: string = 'latest' // Try GitHub releases first try { const res = await fetch('https://api.github.com/repos/brenoepics/prometheus-mcp/releases/latest', { headers: { 'Accept': 'application/vnd.github+json', 'User-Agent': 'prometheus-mcp-docs' } }) if (res.ok) { const data = await res.json() const tag = (data?.tag_name || '').toString() if (tag) { // Normalize common prefixes like v0.1.0 crateVersion = tag.startsWith('v') ? tag : `v${tag}` } } } catch {} // Fallback: read from Cargo.toml if (crateVersion === 'latest') { try { const cargoTomlPath = new URL('../../Cargo.toml', import.meta.url) const text = readFileSync(cargoTomlPath, 'utf8') const m = text.match(/\bversion\s*=\s*"([^"]+)"/) if (m && m[1]) crateVersion = `v${m[1]}` } catch {} } export { crateVersion }

Latest Blog Posts

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/brenoepics/prometheus-rs'

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