Skip to main content
Glama

@arizeai/phoenix-mcp

Official
by Arize-ai
NavBreadcrumb.tsx1.05 kB
import { Link, useMatches } from "react-router"; import { Breadcrumb, Breadcrumbs } from "@phoenix/components"; export type CrumbFn = (data: unknown) => string; type Matches = ReturnType<typeof useMatches>; type Match = Matches[number]; type RouteMatchWithCrumb = Match & { handle: { crumb: CrumbFn; }; }; function isRouteMatchWithCrumb(match: Match): match is RouteMatchWithCrumb { return ( typeof match.handle == "object" && // eslint-disable-next-line @typescript-eslint/no-explicit-any typeof (match.handle as any)?.crumb === "function" ); } export function NavBreadcrumb() { const matches = useMatches(); // Get rid of any matches that don't have handle and crumb const matchesWithCrumb = matches.filter(isRouteMatchWithCrumb); return ( <Breadcrumbs size="L"> {matchesWithCrumb.map((match, index) => { return ( <Breadcrumb key={index}> <Link to={match.pathname}>{match.handle.crumb(match.data)}</Link> </Breadcrumb> ); })} </Breadcrumbs> ); }

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