Skip to main content
Glama

GitMCP

utils.ts674 B
import type { ZodRawShape } from "zod"; export class MockMcp { #tools: Record< string, { description: string; cb: (args: Record<string, any>) => Promise<any>; } > = {}; tool( name: string, description: string, paramsSchema: ZodRawShape, cb: (args: Record<string, any>) => Promise<any>, ): void { this.#tools[name] = { description, cb }; } getTool(name: string) { return this.#tools[name]; } getTools() { // filter out the cb from the tools return Object.fromEntries( Object.entries(this.#tools).map(([name, { description }]) => [ name, { description }, ]), ); } }

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/idosal/git-mcp'

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