Repository navigation
Releases: nlink-jp/mac-lookup
Release list
v0.3.0
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 onsearch_vendor: sendoffest
instead ofoffsetand every page of a broad registrant search comes back as
the first 50 matches, so a loop that walkshas_morerepeats page one forever
and never sees the rest. Every tool — includingget_usage,update_dband
db_status, which take no arguments — now decodes with
DisallowUnknownFieldsand 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. Omittingarguments, 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
singleobj()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
Fixed
- A number in the config file was accepted when it was not one.
NaNpassed the
range check — it fails every comparison, so "reject what is below the floor"
lets it through — andInfor1e300overflowed the duration it became.
Ranges are now stated from the inside, with a ceiling.
v0.2.0
Changed
-
search_vendorreturns its matches inline. The MCP tool no longer writes
a JSON Lines file: matches come back inmatches, bounded bylimit
(default 50, was "no limit") and walked with the newoffset, withhas_more
saying whether any are left.totalis still the true count.Migration: replace a
workspace_rootcall plus a file read with a loop that
advancesoffsetbylimitwhilehas_moreis true.
Added
search_vendortakesoffset, and every result carriesoffset,limitand
has_more.
Removed
search_vendor'sworkspace_rootargument and thematches_file/
written/truncated/note/formatresult fields.- The
[workspace]config section andMAC_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
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.