Skip to main content
Glama
app-config.ts886 B
import { ApplyParsedAppConfigRequest, SerializedAppConfig, } from "@mcpx/shared-model"; import { useMutation, useQuery } from "@tanstack/react-query"; import { axiosClient } from "./axios-client"; import { useSocketStore } from "@/store/socket"; export async function getAppConfig(): Promise<SerializedAppConfig> { const response = await axiosClient.get("/app-config"); return response.data; } export const useGetAppConfig = () => useQuery({ queryKey: ["get-app-config"], queryFn: getAppConfig, }); export function useUpdateAppConfig() { const emitPatchAppConfig = useSocketStore( (state) => state.emitPatchAppConfig, ); return useMutation({ mutationKey: ["update-app-config"], mutationFn: async ( params: ApplyParsedAppConfigRequest, ): Promise<SerializedAppConfig> => { return await emitPatchAppConfig(params); }, }); }

Latest Blog Posts

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/TheLunarCompany/lunar'

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