Skip to main content
Glama
mcp-search.ts991 B
import { z } from "zod"; import { publicProcedure, router } from "../../trpc"; import { mcpAppsDataAccess } from "@repo/db/database/web"; export const mcpSearchRouter = router({ searchApps: publicProcedure .input( z.object({ appId: z.string().optional(), category: z.string().optional(), tag: z.string().optional(), limit: z.number().optional(), query: z.string().optional(), }) ) .query(async ({ input }) => { const apps = await mcpAppsDataAccess.getAppsBySearch({ appId: input.appId, limit: input.limit, category: input.category, tag: input.tag, query: input.query, }) return apps; }), getAppById: publicProcedure .input( z.object({ id: z.string(), }) ) .query(async ({ input }) => { const { id } = input; // Mock data for demonstration const app = { id, name: `App ${id}` }; return app; }), });

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/metacode0602/open-mcp'

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