Skip to main content
Glama
config-provider.tsx893 B
"use client"; import { createContext, useContext, type ReactNode } from "react"; export interface MenuItem { href: string; label: string; icon: any; // Using any here since icons are dynamic imports active?: boolean; submenus?: MenuItem[]; } export interface MenuGroup { groupLabel?: string; menus: MenuItem[]; } interface ConfigContextType { sidebarMenu?: MenuGroup[]; headerMenu?: MenuItem[]; } const ConfigContext = createContext<ConfigContextType | undefined>(undefined); export function ConfigProvider({ children, value }: { children: ReactNode; value: ConfigContextType }) { return <ConfigContext.Provider value={value}>{children}</ConfigContext.Provider>; } export function useConfig() { const context = useContext(ConfigContext); if (context === undefined) { throw new Error("useConfig must be used within a ConfigProvider"); } return context; }

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/madarco/ragrabbit'

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