Dev.to AI πŸ€– Ai πŸ‘ 2 πŸ“– 5 min read

scanned 459 public MCP server configs on GitHub. 1 in 25 leaks a real API key

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

scanned 459 public MCP server configs on GitHub. 1 in 25 leaks a real API key

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

  1. Never type a key straight into the file. Use the server's own env block 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.
  2. Pin your packages. npx -y @modelcontextprotocol/[email protected], not @latest, not a bare unpinned npx -y. Update because you chose to, not because the file didn't stop you.
  3. 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:

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.

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.