Repository navigation
Description
Correction, 2026-09-19. The claim below that an unwrapped server is
"invisible" is wrong, and I filed it from readingmcp_audit_proxy.pyinstead
of running the CLI.agentmetry mcpalready exists and already reads the
agent config files on the machine:$ agentmetry mcp No MCP servers configured (2 config file(s) read). Nothing is wired to an agent on this machine. schema digest: (none observed; wrap a server with mcp_audit_proxy to capture tools/list)It takes
--projectand--digest, and the digest names no server so it is
safe to publish. So inventory is not missing. What this issue is actually
about, restated:
- The inventory is an on-demand CLI command, not an event. Nothing reaches
the trail, so there is no record that a server appeared, and no SIEM sees it.- An unwrapped server still gets no
tools/listfingerprint, which the
command says itself in the line above. No baseline, no rug-pull detection,
no concealed-character scan.The original text is left below rather than edited away.
The MCP work in this repo is the most developed thing in it: per-tool digests,
_meta covered since #142, rebaseline distinguished from a first sighting in
#147, concealed Unicode in #152. All of it applies only to servers somebody
wrapped by hand with tools/mcp_audit_proxy.py.
A server a developer added and did not wrap is invisible. Not "recorded and not
analysed", invisible: no inventory event, no fingerprint, no baseline, nothing
in the trail to say it existed. The quiet week reads identically whether they
run two audited servers or twelve unaudited ones.
That is the gap a competitor's page calls shadow AI discovery, and it is the one
category where this project scores near zero while scoring highest on everything
downstream of it. Rug-pull detection on the servers you already trusted is worth
less than knowing which servers are there.
Where the config actually lives
Checked on a real install rather than assumed, because a proposal that reached
me named the wrong file.
Verified on this machine:
~/.claude/settings.jsonholdshooks,theme,agentPushNotifEnabled,
inputNeededNotifEnabled. NomcpServerskey. This is the file
hook_bootstrap.pyalready reads and writes, and it is not where MCP servers
are configured.~/.claude.jsonholds a top-levelmcpServersobject and aprojectsmap,
21 entries here, each of which can carry its ownmcpServers.
Not verified here, and worth checking before coding rather than after:
.mcp.jsonin a project root, which is the checked-in per-repo form.- Claude Desktop's
claude_desktop_config.json. ~/.cursor/mcp.json.
What to build
A read-only inventory pass, emitting one event per discovered server.
- Parse the locations above, tolerate every one of them being absent, and never
write to any of them.hook_bootstrap.pyalready treats
~/.claude/settings.jsonas user-owned and says so in a comment; the same
rule applies harder here, because these files are not ours at all. - Emit
mcp_server_discoveredcarrying the server name, transport (stdio
command, HTTP, SSE), which config file declared it, and whether Agentmetry
proxies it. Hash the command, do not store it. A command line is where
API keys live, and this project's whole redaction policy is that plaintext
does not cross the wire. - Report a covered / not-covered count, in the same three-state shape hook
coverage already uses. An operator who cannot see the denominator cannot tell
a clean week from an unmonitored one.
What this is not
Not a scanner that connects to discovered servers. Reaching out to a remote MCP
endpoint the operator did not ask us to contact is a network action taken on
their behalf, and it would also hand a hostile server a signal that it is being
audited. Inventory from local config only. Fingerprinting stays where it is, on
the proxy path, for servers the operator chose to route through us.
Scope
New module under core/diagnostics/, which is where mcp_schema.py already
lives and is outside _RULESET_SOURCES. Additive event class. Nothing under the
detection freeze.
Activity
[-]mcp: a server nobody wrapped by hand is invisible, which is how shadow MCP stays shadow[/-][+]mcp: server inventory is a CLI command, not an event, and an unwrapped server still has no fingerprint[/+]feat(mcp): the MCP inventory can reach the SIEM, when the operator asks
blitzcrieg1 commentedon Oct 2, 2026
Part 1 landed in #213: with
AGENTMETRY_MCP_INVENTORY=1, the recorder emits anmcp_inventoryevent at startup, on config change and daily. Each server goes out as name, launcher, package (fetch-and-run launchers only), URL host and finding codes, plus a fingerprint; never arguments or env values. It's off by default, and the heartbeat still names no server. The enterprise fleet dashboard reads it.Still open here: part 2, a
tools/listfingerprint for servers nobody wrapped with the audit proxy.docs(roadmap): refresh to 0.9.4, and the field that moved in September