Skip to content

insights: the scan reads MCP servers built into a person's own repos - #18

Merged
teocns merged 8 commits into
proxify-dev:mainfrom
AlexJov996:insights-mcp-built
Nov 12, 2026
Merged

teocns merged 8 commits into
proxify-dev:mainfrom
AlexJov996:insights-mcp-built

Conversation

@AlexJov996

@AlexJov996 AlexJov996 commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Before and after: The "MCP servers you wrote" row counted only stdio servers whose script sits in a plugin folder of yours, read from Claude Code's configs. An MCP server built into your own product (a JSON-RPC endpoint under /mcp that answers tools/list and tools/call, with a runbook and tests, called by an external client) read "none of yours", since no Claude Code config names it and no mcp__ tool call ever will. Now the scan reads such servers from the repo's files and the row says "1 MCP server built into your product (shop: /mcp/notes); Claude Code never called it", state built, 0 calls, with the evidence files listed; the Built tab lists it instead of folding it as unused.

How a server is read (collect_mcp_built in the anatomy inventory, anatomy.json mcp_built): five kinds of signal, from file contents, never a name alone: an MCP SDK dependency in package.json, composer.json, pyproject, requirements, go.mod, Cargo.toml or a Gemfile; a code file named mcp (or under a folder named mcp) that answers tools/call / tools/list or builds a server with an SDK; an HTTP route registered under /mcp; a doc named mcp that calls it an MCP server; a test named mcp that posts those methods. Two kinds at least, one of them code. Whose it is: one git log over the evidence files per repo, the artifacts' majority rule, manifests left out. Vendor, fixture and plugin folders are skipped. Candidates are kept by name during the walk, capped, and read under an 8 s budget per target.

Test: from plugins/insights/scripts, cd setup-snapshot/experiments/2026-10-27-anatomy && python3 -m unittest test_mcp_built (temp git repos: a composer.json or package.json MCP dependency plus an Mcp controller handling tools/call reads as the person's server; a folder merely named mcp does not; one signal is not enough; a teammate's server is not theirs; vendor copies are not read), cd v15/engine && python3 -m unittest test_board_mcp_write, and cd v15/engine/variants/views && python3 -m unittest test_view_built test_view_mylevel. All green on top of main. Two code-only runs on a laptop with such a product listed its server in the row with its route and evidence paths.

  • One change. I did not edit a version, a CHANGELOG.md, marketplace.json or kit.json.
  • Nothing personal: no names, no paths from my machine, no output of my own scan, no secrets.

… you wrote" even when Claude Code never connects to them

The row read only stdio servers whose script sits in a plugin folder of theirs, from Claude Code's configs. A product
that holds a JSON-RPC MCP endpoint an external client calls (a route under /mcp, a controller answering tools/list and
tools/call, a runbook, tests) read "none of yours": no config names it and no mcp__ tool call ever will.

The anatomy inventory now reads such servers from the repo's files (collect_mcp_built -> anatomy.json mcp_built):
an MCP SDK dependency in package.json, composer.json, pyproject, requirements, go.mod, Cargo.toml or a Gemfile; a code
file named mcp (or inside a folder named mcp) that answers tools/call or tools/list or builds a server with an SDK; an
HTTP route registered under /mcp; a doc named mcp that calls it an MCP server; a test named mcp that posts those methods.
Two kinds at least, one of them code, never a name alone; whose it is by one git log over the evidence files (the
manifests left out), the artifacts' majority rule. Candidate files are kept by name during the walk, capped, and read
under an 8 s budget per target (about 0.1 s on a laptop with a few repos).

board.r_mcp_write lists them beside the plugin-folder servers with their own wording ("1 MCP server built into your
product (<repo>: /mcp/<route>); Claude Code never called it"), 0 calls, state built, the evidence paths on the list
entry; "What you've built" shows such an entry in the list rather than folding it as unused. Unit tests next to each
module (test_mcp_built, test_board_mcp_write, test_view_built). The version is left for the release.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@AlexJov996 AlexJov996 changed the title insights 0.6.5: MCP servers built into your own repos count as "MCP servers you wrote" insights: MCP servers built into your own repos count as "MCP servers you wrote" Nov 12, 2026
…until it is decided

The row "MCP servers you wrote" feeds the level: a server listed there makes "MCP servers and tools you built" read as
yours, which can lift a laptop from L1 to L2 and add "could be L3" or "could be L4". Whether a server built into a
product, which an outside client calls and Claude Code never does, belongs in that row is a question for an issue. The
board, the Built tab and their tests are back as on main. Kept: the scan reads such servers from the repo's files into
anatomy.json (mcp_built), with its tests.
The new scan step judged a server's files by a majority rule of its own. ownership.py is the one place every part of
the scan asks, and it knows more than a majority: an install receipt, or a committed copy of someone else's file (a
server copied from an upstream clone on the same laptop reads installed, not theirs). classify_origin now takes the
server's files together, the commits that touched any of them, as a skill folder is judged by every commit on the
folder. A test builds the copied server.
…do not crowd out the repo's own files

A program that calls someone else's MCP server read as one built: the SDKs ship client and server in one package, and a
client sends "tools/call" too. A handler now has to answer the method (a case, a comparison or a key it dispatches on)
or build the server side of an SDK, and a dependency counts as serving code only beside a route under /mcp. On a real
laptop, a hand-written client of another product's server stopped reading as a server; the servers built there stayed.

The candidate files are capped per kind in walk order, so a vendor folder holding an MCP package could fill the cap
before the repo's own handler was seen. Vendored and example paths are now left out when the files are noted, a cap
that is reached is noted in could_not_read, and the 8 s for reading candidates is shared by every target (as git's
budget is), not given to each. Tests: a client in TypeScript and in Python, and a vendor folder larger than the cap.
The test file's docstring no longer points at whose laptop it was and says the rules the tests now hold, its run line
works under python3 -I, one route file sits in a made-up module folder, and a cap's comment says what the cap is for
instead of one repo's count.
…git budget is spent

Run to its end on a real laptop, the scan had spent its 40 s of per-file git history before it reached MCP servers, so
no server's commits were read and ownership.py read every one as theirs, a clone of someone else's server included. The
lookup is one git log per server found, so it now runs outside that budget. A test spends the budget first.
Every file and folder the walk meets was split at its capitals to look for "mcp" as a word. A plain substring test now
comes first. On a real laptop (20 folders) the walk with this step took 13.1 s against 12.5 s without it (medians of
six warm runs), and reading the candidates 0.3 s.
…another repo

Run to its end on a real laptop, the file inventory stopped with a KeyError: one codebase sat in three checkouts, and
ownership.py's copy rule asked git about the other checkouts. classify_origin kept the last of those answers as the
file's own, and with the per-file budget spent that answer held no commits. It now keeps the answer about the file it
was asked about. And since nothing reads the list of servers yet, a failure while reading one is noted in
could_not_read instead of ending the scan. A test builds the two checkouts with the budget spent.
@teocns

teocns commented Nov 12, 2026

Copy link
Copy Markdown
Member

Thank you for this one too, and for leaving the version alone. You found a real blind spot: an MCP server built into someone's own product never showed up, because the tool only looked inside their plugins.

Your scan part is in, and your commit stays exactly as you pushed it.

We added a few commits on your branch:

  • Whose a server is now goes through ownership.py, the one place the scan asks.
  • A program that only calls someone else's MCP server no longer reads as one built, and vendored copies can't crowd out a repo's own files.
  • A run to the end on a real laptop caught two problems in our own changes; both are fixed, with tests.
  • One test docstring now describes the case, not whose laptop it was.

We took the counting out for now and opened an issue (#24). It can move a level, so it needs a decision first. Your code for it stays in your commit.

It ships in the next release, with credit in the release notes.

@teocns teocns changed the title insights: MCP servers built into your own repos count as "MCP servers you wrote" insights: the scan reads MCP servers built into a person's own repos Nov 12, 2026
@teocns
teocns merged commit cd3ad0c into proxify-dev:main Nov 12, 2026
@teocns teocns mentioned this pull request Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants