MCPcopy Create free account
hub / github.com/cursor/community-plugins / getMCPsClient

Function getMCPsClient

apps/cursor/src/data/client-queries.ts:62–87  ·  view source on GitHub ↗
({
  page = 1,
  limit = 36,
  search,
}: {
  page?: number;
  limit?: number;
  search?: string | null;
} = {})

Source from the content-addressed store, hash-verified

60}
61
62export async function getMCPsClient({
63 page = 1,
64 limit = 36,
65 search,
66}: {
67 page?: number;
68 limit?: number;
69 search?: string | null;
70} = {}) {
71 const supabase = createClient();
72 const query = supabase
73 .from("mcps")
74 .select("*")
75 .eq("active", true)
76 .order("company_id", { ascending: true, nullsFirst: false })
77 .limit(limit)
78 .range((page - 1) * limit, page * limit - 1);
79
80 if (search) {
81 query.textSearch("fts", `%${search}%:*`);
82 }
83
84 const { data, error } = await query;
85
86 return { data, error };
87}

Callers

nothing calls this directly

Calls 1

createClientFunction · 0.90

Tested by

no test coverage detected