Skip to main content
Glama
NU-AquaLab

The Aleph MCP

by NU-AquaLab

thealeph_asn_infrastructure_mapping

Map infrastructure locations for an Autonomous System Number to identify network assets and their geographical distribution.

Instructions

Map infrastructure locations for an ASN

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asnYesAutonomous System Number

Implementation Reference

  • Main handler function that executes the tool: extracts ASN, calls client API, formats response with infrastructure locations or error message.
    async asnInfrastructureMapping(params) { try { const { asn } = params; const result = await this.client.getASNInfrastructureMapping(asn); let response = `πŸ—ΊοΈ Infrastructure Mapping for ASN ${asn}\n\n`; if (Array.isArray(result) && result.length > 0) { result.forEach((location, idx) => { response += `**Location ${idx + 1}:**\n`; for (const [key, value] of Object.entries(location)) { response += ` - ${key}: ${value}\n`; } response += '\n'; }); } else { response += 'No infrastructure mapping available for this ASN.'; } return response; } catch (error) { return `❌ Failed to retrieve infrastructure mapping: ${error.message}`; } }
  • Input schema definition for the tool in getToolDefinitions(), specifying required 'asn' string parameter.
    { name: 'thealeph_asn_infrastructure_mapping', description: 'Map infrastructure locations for an ASN', inputSchema: { type: 'object', properties: { asn: { type: 'string', description: 'Autonomous System Number' } }, required: ['asn'] } },
  • src/tools.js:244-245 (registration)
    Switch case registration in executeTool() that maps tool name to the handler function.
    case 'thealeph_asn_infrastructure_mapping': return this.asnInfrastructureMapping(params);
  • API client helper method that performs the HTTP GET request to the /api/asn/{asn}/infrastructure_mapping endpoint.
    async getASNInfrastructureMapping(asn) { return this.makeRequest('GET', `/api/asn/${asn}/infrastructure_mapping`); }
  • src/tools.js:16-220 (registration)
    The getToolDefinitions method registers all MCP tools including this one by returning their definitions.
    getToolDefinitions() { return [ { name: 'thealeph_health_check', description: 'Check the health and operational status of The Aleph API', inputSchema: { type: 'object', properties: {}, required: [] } }, { name: 'thealeph_current_stats', description: 'Get current API usage statistics for the last N days', inputSchema: { type: 'object', properties: { days: { type: 'integer', description: 'Number of days to retrieve statistics for (1-30)', minimum: 1, maximum: 30, default: 1 } }, required: [] } }, { name: 'thealeph_daily_stats', description: 'Get API usage statistics for a specific date', inputSchema: { type: 'object', properties: { date: { type: 'string', description: 'Date in YYYY-MM-DD format', pattern: '^\\d{4}-\\d{2}-\\d{2}$' } }, required: ['date'] } }, { name: 'thealeph_summary_stats', description: 'Get a quick summary of API usage statistics', inputSchema: { type: 'object', properties: {}, required: [] } }, { name: 'thealeph_export_stats', description: 'Export all monitoring data in specified format', inputSchema: { type: 'object', properties: { format: { type: 'string', description: 'Export format', enum: ['json', 'csv'], default: 'json' } }, required: [] } }, { name: 'thealeph_asn_classifications', description: 'Get classification information for a specific ASN', inputSchema: { type: 'object', properties: { asn: { type: 'string', description: 'Autonomous System Number (e.g., "15169" for Google)' } }, required: ['asn'] } }, { name: 'thealeph_asn_regex', description: 'Get regex patterns associated with an ASN for PTR record parsing', inputSchema: { type: 'object', properties: { asn: { type: 'string', description: 'Autonomous System Number' } }, required: ['asn'] } }, { name: 'thealeph_asn_hints', description: 'Get geographic and network hints for an ASN', inputSchema: { type: 'object', properties: { asn: { type: 'string', description: 'Autonomous System Number' } }, required: ['asn'] } }, { name: 'thealeph_asn_infrastructure_mapping', description: 'Map infrastructure locations for an ASN', inputSchema: { type: 'object', properties: { asn: { type: 'string', description: 'Autonomous System Number' } }, required: ['asn'] } }, { name: 'thealeph_asn_hint_mapping', description: 'Get hint-based location mapping for an ASN', inputSchema: { type: 'object', properties: { asn: { type: 'string', description: 'Autonomous System Number' } }, required: ['asn'] } }, { name: 'thealeph_query_ptr', description: 'Query reverse DNS (PTR) records and retrieve network intelligence including ASN, location, and geo hints', inputSchema: { type: 'object', properties: { ptr_record: { type: 'string', description: 'PTR record hostname to query' }, ip: { type: 'string', description: 'IP address to query' }, asn: { type: 'integer', description: 'ASN number to query' } }, required: [] } }, { name: 'thealeph_batch_query_ptr', description: 'Query multiple PTR records in a single batch request', inputSchema: { type: 'object', properties: { queries: { type: 'array', description: 'Array of query objects, each with optional ptr_record, ip, and/or asn', items: { type: 'object', properties: { ptr_record: { type: 'string' }, ip: { type: 'string' }, asn: { type: 'integer' } } }, minItems: 1, maxItems: 100 } }, required: ['queries'] } }, { name: 'thealeph_traceroute_mapper', description: 'Enrich traceroute hops with network intelligence including ASN, PTR records, and geographic locations', inputSchema: { type: 'object', properties: { traceroute: { type: 'string', description: 'Traceroute output as a string' }, mode: { type: 'string', description: 'Traceroute format mode', enum: ['string', 'RIPE'], default: 'string' } }, required: ['traceroute'] } } ];

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/NU-AquaLab/thealeph-mcp'

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