Skip to main content
Glama

@jpisnice/shadcn-ui-mcp-server

by Jpisnice
version.ts782 B
export async function readVersion(fallback = "1.0.3"): Promise<string> { try { const fs = await import("fs") const path = await import("path") const { fileURLToPath } = await import("url") const __filename = fileURLToPath(import.meta.url) const __dirname = path.dirname(__filename) const candidates = [ path.resolve(__dirname, "..", "..", "package.json"), path.resolve(__dirname, "..", "package.json"), path.resolve(process.cwd(), "package.json"), ] for (const candidate of candidates) { if (fs.existsSync(candidate)) { const content = fs.readFileSync(candidate, "utf8") const pkg = JSON.parse(content) return pkg.version || fallback } } } catch { // ignore } return fallback }

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/Jpisnice/shadcn-ui-mcp-server'

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