Skip to content

Releases: nlink-jp/mac-lookup

v0.3.0

Choose a tag to compare

@magifd2 magifd2 released this 21 Sep 02:23

Changed

  • An MCP tool call carrying an argument the tool does not declare now fails
    instead of being quietly ignored.
    This is a deliberate behaviour change,
    required by org ADR-021 §4. Until now a misspelt argument was dropped and the
    call ran without it, which was worst on search_vendor: send offest
    instead of offset and every page of a broad registrant search comes back as
    the first 50 matches, so a loop that walks has_more repeats page one forever
    and never sees the rest. Every tool — including get_usage, update_db and
    db_status, which take no arguments — now decodes with
    DisallowUnknownFields and refuses the call, naming the offending field:
    arguments: json: unknown field "offest".

    A malformed argument object is refused for the same reason. The decode error
    used to be discarded along with the unknown field, so {"macs": "286FB9…"} —
    one address where an array was expected — ran as if no address had been
    supplied and came back with "provide 'mac' … or 'macs'", an answer that
    contradicted the request. It now reports the type mismatch.

    Nothing runs before the arguments decode, so a rejected call reads no
    registry and downloads nothing. Omitting arguments, or sending {} or
    null, still means "no arguments" and is not an error. There is no
    compatibility shim: an argument name this server does not declare has never
    meant anything, so the only fix is to correct it.

Fixed

  • Every MCP tool input schema is closed. The schemas omitted
    additionalProperties: false, so a mistyped argument read as a legitimate one
    to any client that validates against them. Schemas are now built through a
    single obj() helper that sets the flag, and an arch test fails if a tool's
    schema omits it — org ADR-021 §10 requires the test as well as the flag,
    because a rule stated only in prose is re-decided by whoever adds the next
    tool.

v0.2.1

Choose a tag to compare

@magifd2 magifd2 released this 20 Sep 23:35

Fixed

  • A number in the config file was accepted when it was not one. NaN passed the
    range check — it fails every comparison, so "reject what is below the floor"
    lets it through — and Inf or 1e300 overflowed the duration it became.
    Ranges are now stated from the inside, with a ceiling.

v0.2.0

Choose a tag to compare

@magifd2 magifd2 released this 30 Aug 16:35

Changed

  • search_vendor returns its matches inline. The MCP tool no longer writes
    a JSON Lines file: matches come back in matches, bounded by limit
    (default 50, was "no limit") and walked with the new offset, with has_more
    saying whether any are left. total is still the true count.

    Migration: replace a workspace_root call plus a file read with a loop that
    advances offset by limit while has_more is true.

Added

  • search_vendor takes offset, and every result carries offset, limit and
    has_more.

Removed

  • search_vendor's workspace_root argument and the matches_file /
    written / truncated / note / format result fields.
  • The [workspace] config section and MAC_LOOKUP_WORKSPACE. The server has no
    output directory: it touches no filesystem, so it works unchanged against a
    client that has none.

mac-lookup v0.1.0

Choose a tag to compare

@magifd2 magifd2 released this 26 Jul 02:20

First release.

Resolve a MAC address or BSSID to its manufacturer — and, before that, to what kind of address it actually is. Offline, from a locally cached copy of the IEEE Registration Authority registries. CLI and local MCP server.

Why it is not just an OUI table

  • A randomized MAC has no manufacturer. Phones rotate a locally administered address per network; virtual NICs and containers do the same. Reported as locally administered — vendor lookup does not apply, not as "vendor unknown".
  • The first six digits are not enough. IEEE subdivides 24-bit blocks into 28-bit (MA-M) and 36-bit (MA-S/IAB) assignments, so several vendors share one OUI. Matching is longest-prefix-first.
  • Some blocks belong to IEEE itself. ~429 MA-L rows are registered to "IEEE Registration Authority" — blocks held for subdivision, reported as OUI subdivided, never as a vendor.

Included

  • lookup / search / update / status / mcp
  • Grep-style exit codes for a single address; batch mode for many, stdin, or --json
  • MCP tools: lookup_mac, search_vendor (file-mediated), db_status, update_db, get_usage
  • Conditional downloads (ETag / Last-Modified); "unchanged upstream" and "IEEE unreachable" are reported distinctly
  • No credentials — the IEEE registries are public
  • Zero external dependencies (Go standard library only)

Install

brew install nlink-jp/tap/mac-lookup

The darwin/arm64 build is Developer ID signed and Apple-notarized.