We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Arize-ai/phoenix'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
FunctionalityContext.tsx•942 B
import type { PropsWithChildren } from "react";
import { createContext, useContext } from "react";
/**
* Global static context for the functionality of the platform
*/
export type FunctionalityContextType = {
/**
* Will be set to true if the platform is deployed with authentication
*/
authenticationEnabled: boolean;
};
export const FunctionalityContext =
createContext<FunctionalityContextType | null>(null);
export function useFunctionality() {
const context = useContext(FunctionalityContext);
if (context === null) {
throw new Error(
"useFunctionality must be used within a FunctionalityProvider"
);
}
return context;
}
export function FunctionalityProvider(props: PropsWithChildren) {
return (
<FunctionalityContext.Provider
value={{
authenticationEnabled: window.Config.authenticationEnabled,
}}
>
{props.children}
</FunctionalityContext.Provider>
);
}