Skip to main content
Glama
dhhuston

APRS.fi MCP Server

by dhhuston

track_multiple_callsigns

Monitor multiple ham radio callsigns simultaneously using the APRS.fi API for real-time position tracking and data analysis.

Instructions

Track multiple callsigns at once

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiKeyNoAPRS.fi API key (optional if set via /set-api-key)
callsignsYesArray of callsigns to track

Implementation Reference

  • Core handler function that fetches current APRS positions for multiple callsigns by joining them in the API query parameter and parsing the response.
    async getMultiplePositions(callsigns: string[], apiKey?: string): Promise<APRSPosition[]> { const keyToUse = apiKey || this.apiKey; if (!keyToUse) { throw new APRSError('APRS API key not provided. Use /set-api-key command or provide apiKey parameter.'); } if (!callsigns?.length) { return []; } const cleanCallsigns = callsigns .map(c => c.trim().toUpperCase()) .filter(c => c.length > 0); if (cleanCallsigns.length === 0) { return []; } const params = new URLSearchParams({ name: cleanCallsigns.join(','), what: 'loc', apikey: keyToUse, format: 'json' }); try { const response = await fetch(`${this.baseUrl}?${params}`); if (!response.ok) { throw new APRSError( `APRS API request failed: ${response.status} ${response.statusText}`, response.status ); } const data: APRSResponse = await response.json(); if (data.result !== 'ok') { throw new APRSError(`APRS API error: ${data.result}`); } return data.entries.map(entry => ({ ...entry, timestamp: entry.timestamp * 1000, })); } catch (error) { if (error instanceof APRSError) { throw error; } if (error instanceof TypeError && error.message.includes('fetch')) { throw new APRSError('Network error: Unable to connect to APRS.fi API. Check your internet connection.'); } throw new APRSError(`Unexpected error: ${error instanceof Error ? error.message : 'Unknown error'}`); } }
  • index.ts:329-350 (registration)
    Tool registration in the ListTools response, defining name, description, and input schema.
    { name: 'track_multiple_callsigns', description: 'Track multiple callsigns at once', inputSchema: { type: 'object', properties: { callsigns: { type: 'array', items: { type: 'string', }, description: 'Array of callsigns to track', }, apiKey: { type: 'string', description: 'APRS.fi API key (optional if set via /set-api-key)', }, }, required: ['callsigns'], }, }, {
  • Input schema defining required 'callsigns' array and optional 'apiKey'.
    inputSchema: { type: 'object', properties: { callsigns: { type: 'array', items: { type: 'string', }, description: 'Array of callsigns to track', }, apiKey: { type: 'string', description: 'APRS.fi API key (optional if set via /set-api-key)', }, }, required: ['callsigns'], },
  • Dispatch handler in CallToolRequestSchema switch that invokes getMultiplePositions and formats response as JSON text.
    case 'track_multiple_callsigns': const multiplePositions = await this.aprsService.getMultiplePositions( args.callsigns as string[], args.apiKey as string ); return { content: [ { type: 'text', text: JSON.stringify(multiplePositions, null, 2), }, ], };

Other Tools

Related Tools

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/dhhuston/APRSFI-MCP-SERVER'

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