Skip to content

mcp: server inventory is a CLI command, not an event, and an unwrapped server still has no fingerprint #169

Open

Description

@blitzcrieg1

Correction, 2026-09-19. The claim below that an unwrapped server is
"invisible" is wrong, and I filed it from reading mcp_audit_proxy.py instead
of running the CLI. agentmetry mcp already 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 --project and --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:

  1. 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.
  2. An unwrapped server still gets no tools/list fingerprint, 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.json holds hooks, theme, agentPushNotifEnabled,
    inputNeededNotifEnabled. No mcpServers key. This is the file
    hook_bootstrap.py already reads and writes, and it is not where MCP servers
    are configured.
  • ~/.claude.json holds a top-level mcpServers object and a projects map,
    21 entries here, each of which can carry its own mcpServers.

Not verified here, and worth checking before coding rather than after:

  • .mcp.json in 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.py already treats
    ~/.claude/settings.json as 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_discovered carrying 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

  1. changed the title [-]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[/+] on Sep 19, 2026
  2. blitzcrieg1 commented on Oct 2, 2026

    @blitzcrieg1
    OwnerAuthor

    Part 1 landed in #213: with AGENTMETRY_MCP_INVENTORY=1, the recorder emits an mcp_inventory event 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/list fingerprint for servers nobody wrapped with the audit proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions