Skip to main content
Glama
MaxwellCalkin

N2YO Satellite Tracker MCP Server

set_n2yo_api_key

Configure your N2YO API key to enable satellite tracking functionality, including position queries, pass predictions, and TLE data access.

Instructions

Configure N2YO API key for satellite tracking

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiKeyYesN2YO API key from your account

Implementation Reference

  • The primary handler function for the set_n2yo_api_key tool. It validates the provided API key and sets it on the N2YOClient instance, then returns a success response.
    private async setApiKey(apiKey: string): Promise<CallToolResult> { SatelliteValidator.validateApiKey(apiKey); this.n2yoClient.setApiKey(apiKey); return { content: [ { type: "text", text: "Successfully configured N2YO API key", }, ], }; }
  • Runtime input validation for the API key parameter, enforcing type, length, and character set requirements.
    static validateApiKey(apiKey: string): void { if (!apiKey || typeof apiKey !== "string") { throw new ValidationError("API key is required and must be a string"); } if (apiKey.length < 10 || apiKey.length > 100) { throw new ValidationError("API key must be between 10 and 100 characters"); } if (!/^[a-zA-Z0-9-_]+$/.test(apiKey)) { throw new ValidationError("API key must contain only alphanumeric characters, hyphens, and underscores"); } }
  • src/server.ts:20-33 (registration)
    Tool registration definition in the getTools() method, specifying name, description, and input schema.
    { name: "set_n2yo_api_key", description: "Configure N2YO API key for satellite tracking", inputSchema: { type: "object", properties: { apiKey: { type: "string", description: "N2YO API key from your account", }, }, required: ["apiKey"], }, },
  • Helper method in N2YOClient that stores the API key in the client instance for use in subsequent API requests.
    setApiKey(apiKey: string): void { this.apiKey = apiKey; }

Latest Blog Posts

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/MaxwellCalkin/N2YO-MCP'

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