asn_lookup
Look up Autonomous System Number details to identify network ownership and infrastructure for security research and intelligence gathering.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asn | Yes | ASN string (e.g., '15169') to lookup |
Implementation Reference
- src/tools/network-adv.ts:13-20 (handler)The lookupAsn function in the NetworkAdvClient class performs the ASN lookup by fetching data from the bgpview.io API.
async lookupAsn(asn: string): Promise<any> { try { const response = await fetch(`https://api.bgpview.io/asn/${asn}`); return await response.json(); } catch (error) { throw new McpError(ErrorCode.InternalError, `ASN Lookup error: ${(error as Error).message}`); } } - src/index.ts:675-684 (registration)The 'asn_lookup' tool is registered in src/index.ts, which calls the lookupAsn method of the NetworkAdvClient.
server.tool( "asn_lookup", { asn: z.string().describe("ASN string (e.g., '15169') to lookup") }, async ({ asn }) => { const result = await netAdvClient.lookupAsn(asn); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; } );