Skip to main content
Glama

Convex MCP server

Official
by get-convex
useIsCloudDeploymentInSelfHostedDashboard.ts1.13 kB
import { useContext } from "react"; import { DeploymentInfoContext } from "./deploymentContext"; /** * Determines if the deployment URL is a default cloud deployment URL. * * This gives a false negative if the deployment is a cloud deployment with a custom domain. */ export function useIsCloudDeploymentInSelfHostedDashboard(): | { isCloudDeploymentInSelfHostedDashboard: false; deploymentName: undefined; } | { isCloudDeploymentInSelfHostedDashboard: true; deploymentName: string; } { const context = useContext(DeploymentInfoContext); if ( !context.isSelfHosted || !("deploymentUrl" in context) || !context.deploymentUrl ) { return { isCloudDeploymentInSelfHostedDashboard: false, deploymentName: undefined, }; } const match = context.deploymentUrl.match( /^https:\/\/([a-z]+-[a-z]+-[0-9]+)\.convex\.cloud$/, ); if (!match) { return { isCloudDeploymentInSelfHostedDashboard: false, deploymentName: undefined, }; } return { isCloudDeploymentInSelfHostedDashboard: true, deploymentName: match[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/get-convex/convex-backend'

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