We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/get-convex/convex-backend'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
npm.ts•585 B
import { type } from "arktype";
/**
* Fetch the latest version of the convex package from the NPM registry
*/
export async function fetchLatestNpmVersion(): Promise<string> {
const response = await fetch("https://registry.npmjs.org/convex/latest");
if (!response.ok) {
throw new Error(`Failed to fetch NPM data: ${response.status}`);
}
const NpmResponse = type({
version: "string",
});
const out = NpmResponse(await response.json());
if (out instanceof type.errors) {
throw new Error("Invalid NPM response: " + out.summary);
}
return out.version;
}