The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
import { useQuery } from "@tanstack/react-query";
import { createQueryKeys } from "../common/queryKeysFactory";
import { fetchMCPServers } from "@/components/networking";
import { MCPServer } from "@/components/mcp_tools/types";
import useAuthorized from "../useAuthorized";
export const mcpServersKeys = createQueryKeys("mcpServers");
export const useMCPServers = (teamId?: string | null, userId?: string | null) => {
const { accessToken } = useAuthorized();
const filters = { ...(teamId ? { teamId } : {}), ...(userId ? { userId } : {}) };
return useQuery<MCPServer[]>({
queryKey: mcpServersKeys.list(Object.keys(filters).length > 0 ? { filters } : undefined),
queryFn: async () => await fetchMCPServers(accessToken!, teamId, undefined, userId),
enabled: !!accessToken,
});
};