mac_lookup
Identify device manufacturers by querying MAC addresses to support network analysis and security investigations.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mac | Yes | MAC address to lookup vendor for |
Implementation Reference
- src/index.ts:451-459 (handler)The tool definition and registration for 'mac_lookup' in the main server file.
server.tool( "mac_lookup", { mac: z.string().describe("MAC address to lookup vendor for") }, async ({ mac }) => { const result = await macClient.getVendor(mac); return { content: [{ type: "text", text: result }], }; } - src/tools/mac.ts:13-26 (handler)The actual implementation of the MAC address vendor lookup logic.
async getVendor(mac: string): Promise<string> { try { const response = await fetch(`${this.baseUrl}${encodeURIComponent(mac)}`); if (response.status === 404) { return "Unknown Vendor"; } if (!response.ok) { throw new Error(`API failed: ${response.statusText}`); } return await response.text(); } catch (error) { throw new McpError(ErrorCode.InternalError, `MAC Address Lookup error: ${(error as Error).message}`); } }