UNPKG

@aashari/boilerplate-mcp-server

Version:

TypeScript Model Context Protocol (MCP) server boilerplate providing IP lookup tools/resources. Includes CLI support and extensible structure for connecting AI systems (LLMs) to external data sources like ip-api.com. Ideal template for creating new MCP in

84 lines (83 loc) 2.75 kB
import { z } from 'zod'; /** * Zod Schema for the core IP details returned by the ip-api.com JSON endpoint. * Includes common fields and optional extended fields. */ export declare const IPDetailSchema: z.ZodObject<{ status: z.ZodString; message: z.ZodOptional<z.ZodString>; query: z.ZodOptional<z.ZodString>; country: z.ZodOptional<z.ZodString>; countryCode: z.ZodOptional<z.ZodString>; region: z.ZodOptional<z.ZodString>; regionName: z.ZodOptional<z.ZodString>; city: z.ZodOptional<z.ZodString>; zip: z.ZodOptional<z.ZodString>; lat: z.ZodOptional<z.ZodNumber>; lon: z.ZodOptional<z.ZodNumber>; timezone: z.ZodOptional<z.ZodString>; isp: z.ZodOptional<z.ZodString>; org: z.ZodOptional<z.ZodString>; as: z.ZodOptional<z.ZodString>; asname: z.ZodOptional<z.ZodString>; reverse: z.ZodOptional<z.ZodString>; mobile: z.ZodOptional<z.ZodBoolean>; proxy: z.ZodOptional<z.ZodBoolean>; hosting: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { status: string; message?: string | undefined; query?: string | undefined; country?: string | undefined; countryCode?: string | undefined; region?: string | undefined; regionName?: string | undefined; city?: string | undefined; zip?: string | undefined; lat?: number | undefined; lon?: number | undefined; timezone?: string | undefined; isp?: string | undefined; org?: string | undefined; as?: string | undefined; asname?: string | undefined; reverse?: string | undefined; mobile?: boolean | undefined; proxy?: boolean | undefined; hosting?: boolean | undefined; }, { status: string; message?: string | undefined; query?: string | undefined; country?: string | undefined; countryCode?: string | undefined; region?: string | undefined; regionName?: string | undefined; city?: string | undefined; zip?: string | undefined; lat?: number | undefined; lon?: number | undefined; timezone?: string | undefined; isp?: string | undefined; org?: string | undefined; as?: string | undefined; asname?: string | undefined; reverse?: string | undefined; mobile?: boolean | undefined; proxy?: boolean | undefined; hosting?: boolean | undefined; }>; /** * TypeScript type inferred from the IPDetailSchema. * Represents the expected structure of a successful ip-api.com response. */ export type IPDetail = z.infer<typeof IPDetailSchema>; /** * Options specifically for the ip-api.com request within the service. * Used by the service layer when calling fetchIpApi. */ export type IPApiRequestOptions = { useHttps?: boolean; fields?: string[]; lang?: string; };