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

61 lines (60 loc) 2.28 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IPDetailSchema = void 0; const zod_1 = require("zod"); /** * Zod Schema for the core IP details returned by the ip-api.com JSON endpoint. * Includes common fields and optional extended fields. */ exports.IPDetailSchema = zod_1.z.object({ status: zod_1.z.string().describe('Response status, e.g., "success" or "fail"'), message: zod_1.z .string() .optional() .describe('Error message if status is "fail"'), query: zod_1.z.string().optional().describe('The IP address used for the query'), country: zod_1.z.string().optional().describe('Country name'), countryCode: zod_1.z .string() .optional() .describe('Two-letter country code (ISO 3166-1 alpha-2)'), region: zod_1.z .string() .optional() .describe('Region/state short code (FIPS or ISO)'), regionName: zod_1.z.string().optional().describe('Region/state name'), city: zod_1.z.string().optional().describe('City name'), zip: zod_1.z.string().optional().describe('Zip/postal code'), lat: zod_1.z.number().optional().describe('Latitude'), lon: zod_1.z.number().optional().describe('Longitude'), timezone: zod_1.z .string() .optional() .describe('Timezone (e.g., America/New_York)'), isp: zod_1.z.string().optional().describe('Internet Service Provider name'), org: zod_1.z.string().optional().describe('Organization name'), as: zod_1.z .string() .optional() .describe('Autonomous System number and name (e.g., "AS15169 Google LLC")'), asname: zod_1.z .string() .optional() .describe('Autonomous System name (e.g., "Google LLC")'), reverse: zod_1.z .string() .optional() .describe('Reverse DNS host name of the IP address'), mobile: zod_1.z .boolean() .optional() .describe('Whether the IP belongs to a mobile carrier'), proxy: zod_1.z .boolean() .optional() .describe('Whether the IP is identified as a proxy/VPN/Tor'), hosting: zod_1.z .boolean() .optional() .describe('Whether the IP belongs to a hosting provider'), });