Skip to main content
Glama

@arizeai/phoenix-mcp

Official
by Arize-ai
PreferencesContext.tsx989 B
import { createContext, PropsWithChildren, useContext, useState } from "react"; import { useZustand } from "use-zustand"; import { createPreferencesStore, PreferencesProps, PreferencesState, PreferencesStore, } from "@phoenix/store/preferencesStore"; export const PreferencesContext = createContext<PreferencesStore | null>(null); export function PreferencesProvider({ children, ...props }: PropsWithChildren<Partial<PreferencesProps>>) { const [store] = useState<PreferencesStore>(() => createPreferencesStore(props) ); return ( <PreferencesContext.Provider value={store}> {children} </PreferencesContext.Provider> ); } export function usePreferencesContext<T>( selector: (state: PreferencesState) => T, equalityFn?: (left: T, right: T) => boolean ): T { const store = useContext(PreferencesContext); if (!store) throw new Error("Missing PreferencesContext.Provider in the tree"); return useZustand(store, selector, equalityFn); }

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/Arize-ai/phoenix'

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