We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/xkloveme/cloud-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
use-theme.ts•412 B
import { useHostGlobal } from "./use-host-global";
import { type Theme } from "./types";
/**
* React hook to get the current theme (light or dark).
* Use this to adapt your widget's styling to match the MCP Apps host.
*
* @example
* const theme = useTheme();
* const bgColor = theme === "dark" ? "#1a1a1a" : "#ffffff";
*/
export const useTheme = (): Theme | null => {
return useHostGlobal("theme");
};