Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

391 B
Raw Blame
import { useListMcpServer } from '@/hooks/use-mcp-request';
import { useOwnerTenantId } from '../context';

export function useFindMcpById() {
  const ownerTenantId = useOwnerTenantId();
  const { data } = useListMcpServer(ownerTenantId, Boolean(ownerTenantId));

  const findMcpById = (id: string) =>
    data.mcp_servers.find((item) => item.id === id);

  return {
    findMcpById,
  };
}