Skip to main content
Glama

MCPMC (Minecraft MCP)

cli.ts931 B
import { z } from "zod"; export const cliSchema = z.object({ host: z.string().default("localhost"), port: z.number().int().min(1).max(65535).default(25565), username: z.string().min(1).default("Claude"), }); export type CLIArgs = z.infer<typeof cliSchema>; export function parseArgs(args: string[]): CLIArgs { const parsedArgs: Record<string, string | number> = {}; for (let i = 0; i < args.length; i++) { const arg = args[i]; if (arg.startsWith("--")) { const key = arg.slice(2); const value = args[i + 1]; if (value && !value.startsWith("--")) { parsedArgs[key] = key === "port" ? parseInt(value, 10) : value; i++; // Skip the value in next iteration } } } // Parse with schema and get defaults return cliSchema.parse({ host: parsedArgs.host || undefined, port: parsedArgs.port || undefined, username: parsedArgs.username || undefined, }); }

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/gerred/mcpmc'

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