A few weeks ago I scanned 918 public n8n workflows and found that 1 in 3 AI agent templates could
send emails, write to databases, or spend money with zero human approval in the loop. People
argued with me about that one in the comments, which was great, that's the point. So I went
looking for the next file nobody thinks about as "sensitive."
Turned out it was sitting on my own laptop the whole time.
If you use Claude Desktop, Claude Code, Cursor, or basically anything that speaks MCP, there's a
file on your machine right now that lists every server your AI assistant is allowed to talk to,
and what those servers can do once connected. Most people treat it like a .bashrc. Nobody
thinks twice about it. I didn't either, until I started wondering what mine actually said, and
then wondered how many other people's say the same thing.
So I scanned 459 of them, public ones on GitHub. Here's what I found.
How I actually did this
I searched GitHub for the exact filenames real MCP clients write: claude_desktop_config.json
for Claude Desktop, .mcp.json and mcp.json for Claude Code and most other clients, each
required to contain the literal string "mcpServers" so I wasn't scooping up random JSON files
that happened to share a name. Ran it 1 December 2026. I threw out anything that was obviously a
template, example, backup, or disabled (.mcp.json.bak, claude_desktop_config.json.template,
that sort of thing) because those aren't real configs, they're documentation.
465 files came back. 459 parsed as valid JSON with a real MCP shape. The other 6 either broke on
parse or turned out to be something else entirely, so I left them out rather than force them into
the count.
I only ever read these files. Nothing gets executed, no server gets started, no credential gets
tested to see if it still works. And like the n8n study, I'm not naming a single repo or person.
The pattern is the story here, not whoever happened to commit one of these without thinking about
it twice, because honestly, that could've been me.
One real caveat before the numbers: this is a sample of public GitHub repos, not a sample of
how people actually use MCP day to day. The people who push a personal config to a public repo
(often by accident, often a dotfiles repo) are a specific slice, not everyone. Think of these
numbers as a floor, not an estimate of the whole ecosystem.
The numbers
| Finding | Files | % of 459 |
|---|---|---|
| At least one issue | 175 | 38.1% |
| CRITICAL or HIGH severity | 31 | 6.8% |
| A literal credential typed into the file | 19 | 4.1% |
Runs at least one unpinned package (npx -y, @latest, uvx) |
120 | 26.1% |
| A remote server whose authorization needs a manual look | 42 | 9.2% |
| Unrestricted shell command execution | 6 | 1.3% |
A credential file/path handed straight to a server (a mounted .kube or .aws) |
7 | 1.5% |
1 in 25 has a real key sitting in plain text, right now
Not a placeholder. Not YOUR_API_KEY_HERE. A real Slack token. A real GitHub personal access
token. A Supabase service key. An Azure client secret. A Splunk token. Nineteen separate files,
each one just... sitting there, in a config most people would swear only lives on their own
machine.
Every single match went through the exact same secret-detection check from the n8n study, the one
that already throws out documentation placeholders and obvious example values before it counts
anything as real. I didn't test whether any of these keys still work. I don't want to know, and
it's not the point anyway. The point is simpler and worse: a file you think of as "my local
settings" is, for 1 in 25 people who happen to push it public, an actual leaked credential, sitting
in the open, indexed by GitHub's own search.
1 in 4 is running whatever got published this morning
The second thing jumped out almost as much. Roughly a quarter of these configs start a server with
npx -y @some/package or uvx some-mcp-server, no version pinned anywhere. Which means every
single time that assistant starts up, it quietly pulls and runs whatever the package author most
recently pushed. Not what you tested. Not what you reviewed. Whatever's live right now.
That's a supply chain hole dressed up as a convenience flag. If that package ever gets compromised,
it starts running with whatever access the MCP server already has, the next time anyone on that
config opens their assistant. No warning, no changelog you'd see, nothing.
What this scan can't tell you
I'd rather say this plainly than let the numbers above feel bigger than they are:
- It reads the config file. It never starts a server, calls a tool, or checks whether a credential still works.
- "Needs a manual look" means exactly that, a human has to judge it, not that it's wrong.
- A clean result isn't proof of safety. OAuth scopes, what a remote server actually does once it's connected, anything happening outside that one config file, none of that is visible to a static check.
If any of this sounds like your config
-
Never type a key straight into the file. Use the server's own
envblock to reference a variable instead ("${GITHUB_TOKEN}"), set the real value in your shell profile or a secrets manager, and the file itself stays safe to commit or accidentally share. -
Pin your packages.
npx -y @modelcontextprotocol/server-filesystem@1.0.2, not@latest, not a bare unpinnednpx -y. Update because you chose to, not because the file didn't stop you. - If you've ever committed a real key, it's burned, full stop. Rotate it at the provider first. Deleting it in a later commit doesn't erase it from git history, and it definitely doesn't erase it from anyone who already cloned the repo.
Go check your own
I built a free scanner to run exactly this check, and it just went properly open source this
week, Apache-2.0, every rule readable:
- In your browser, nothing uploaded anywhere: getnivoryn.com/check
- From your terminal:
npx nivoryn scan - The actual source: github.com/adamchemlelao-ai/nivoryn-scanner
Full methodology, the raw numbers, all of it, is at
getnivoryn.com/research/mcp-configs. If you scan
your own config and find something, I'd genuinely like to hear about it in the comments, no names
needed.
Update : Never type a key straight into the file. Use the server's own env block to reference a variable instead ("${GITHUB_TOKEN}"). Pull that variable from a secrets manager or your OS keychain at shell-init time (1Password's op run, for example) rather than just setting it in your shell profile — a shell-profile var still leaves the real secret sitting in plaintext, just one file over. (Thanks to a reader, Junfeng Zhou, for pushing on this one.)

Top comments (12)
Did most leaks sit in the env block of the config itself? Having that entry call a secret manager (op run, a keychain lookup) instead of holding the value keeps the file safe to commit.
Yes — all 19 were literal values directly in the server's own env block ("GITHUB_TOKEN": "ghp_...") rather than a ${VAR} reference. And you're pointing at a real gap in the fix I gave: "reference a variable, set it in your shell profile" still leaves the actual secret sitting in plaintext somewhere, just one file over. Pulling it from 1Password (op run) or the OS keychain at shell-init time instead of hardcoding it anywhere is the better version of that fix. Good catch — updating how I'd phrase that going forward.
That makes a pre-commit check easy: flag any env value in an MCP config that is not a ${VAR} reference, and all 19 would have been caught before the push.
Tested this directly before replying: nivoryn scan --path . --fail-on high already catches a literal credential (NIV-011, exits non-zero) — no new feature needed, it works today. One real gotcha I hit testing it: use --path pointed at the directory, not --file — --file is for scanning extra files outside the project, not an alternate way to target a single config, and silently treats it as an n8n export instead. Added a real "pre-commit hook" section to the README with the exact command. Good instinct — thanks for pushing this past "nice idea" into something I actually verified.
Good to know about --file versus --path. A one-line warning when a file gets scanned as an n8n export would save the next person from a quiet pass on the wrong file type.
Our November search over 10,659 config files came out lower: 152 with real-looking tokens, about 1 in 70. Ours was pattern matching only, so "real-looking" is doing some work there. Did you verify yours against the providers, or is 1 in 25 also by pattern?
No, ours is pattern-based too — we match known token shapes per provider (GitHub's ghp_, Slack's format, Supabase/Azure/Splunk patterns) and explicitly exclude anything that looks like a placeholder or an env-var reference, but we never called out to a provider to confirm a key is actually live. So "1 in 25" means "real-looking by format," same caveat as your "real-looking." The gap between 1-in-25 and 1-in-70 is probably sample/method (file-type scope, time window, how strict the placeholder filter is), not a verification difference — not really apples-to-apples without comparing the actual pattern lists directly. Genuinely curious what shapes you're matching, if you want to compare notes.
one in twenty-five public mcp configs leaks a real api key. the config file nobody treats as sensitive is the one that holds the keys.
Exactly — and the part that got me is these are AI coding assistant configs, so a lot of the people affected are developers who already think about security for a living. It's not a knowledge gap, it's that a file sitting in ~/.config or similar just never crosses your mind as "public-facing" until it accidentally is.
right. it is not a knowledge gap. the file never looks public-facing until the key is already out.
Exactly — and that's the whole argument for a scanner that runs locally over one more awareness post. Behavior doesn't change because people got the memo, it changes when the check happens automatically, before the push.
I checked my own config after seeing 120 of 459 run unpinned, did yours have one too?