mac_lookup
Look up the vendor or manufacturer of a MAC address using the OUI database. Identify network device origins quickly.
Instructions
Look up the vendor/manufacturer for a MAC address (OUI database).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mac | Yes |
Implementation Reference
- src/mcp_nettools/server.py:136-145 (handler)The mac_lookup tool handler function: an async MCP tool that takes a MAC address, uses AsyncMacLookup to look up the vendor/manufacturer from the OUI database, and returns {'mac', 'vendor'} or an error dict on failure.
@mcp.tool() async def mac_lookup(mac: str) -> dict: """Look up the vendor/manufacturer for a MAC address (OUI database).""" try: lookup = AsyncMacLookup() await lookup.load_vendors() vendor = await lookup.lookup(mac) return {"mac": mac, "vendor": vendor} except Exception as e: return {"error": str(e), "tool": "mac_lookup", "mac": mac} - src/mcp_nettools/server.py:136-136 (registration)The tool is registered with the MCP framework via the @mcp.tool() decorator on the async mac_lookup function.
@mcp.tool() - src/mcp_nettools/server.py:12-12 (helper)Import of AsyncMacLookup from mac_vendor_lookup library, used by the mac_lookup handler to perform vendor lookups against the OUI database.
from mac_vendor_lookup import AsyncMacLookup