Security firm Corelight published research on November 10 showing that one community MCP server, configured to run a single release from a single commit, ran with 15 different dependency sets over five weeks. Nobody touched its config. The launcher quietly rebuilt the environment from PyPI, and 23 of its 69 packages changed versions underneath it.
That gap is exactly where most MCP server security best practices go quiet. The guides cover OAuth, scopes and input validation, which all matter. But if the code your agent launches can change every few days without anyone noticing, you've handed your API keys to whichever package maintainer gets compromised next.
TL;DR#
- Pinning an MCP server's release doesn't pin its dependencies. Launchers like
uvxandnpxcan pull fresh transitive packages on rebuild. - In Corelight's review, 23 of 35 MCP servers recommended an install that resolves dependencies from a public registry.
- Freeze credential-holding servers with a commit pin and a hash-locked install, launch them directly, and give each one its own narrow credentials.
What Corelight found#
The research started on an admin's workstation running two AI coding assistants. Those assistants launched MCP servers that held privileged credentials for security tools. Corelight's network logs showed more than 1,600 connections in a week from those servers to 11 management systems, including the firewall and SIEM.
Then they looked at how the servers were started. One server had seven direct dependencies pinned exactly, about 60 more underneath, and was launched with a one-step command like uvx --from git+https://github.com/<owner>/<server>@<tag>. Over five weeks it was rebuilt from the launcher's cache 19 times, producing 15 distinct environments. Packages that changed included cryptography, the JWT library (four versions) and the MCP SDK itself.
A second server, pinned to a commit, still produced 17 distinct environments across 19 builds. Its MCP framework ended up two major versions ahead of the project's own lock file.
Corelight found no malware. The Cyber Security News write-up frames it as a path to stolen API keys and admin credentials, and that's the honest read: nothing bad happened yet, but nothing would have stopped it.
Why this matters for MCP server security#
An MCP server isn't a library sitting in a test suite. It runs in the same process as its dependencies, with the same credentials, files and network paths. If one of 69 packages ships a bad release, that code gets your Stripe key or your CRM token.
The timing makes it worse. Corelight points out that malicious releases in recent incidents were live for minutes to hours before removal. Your exposure comes down to one thing: did your launcher happen to rebuild during that window? With rebuilds roughly every couple of days and 162 server starts in a single week on one machine, the odds aren't comfortable.
There's a second, separate risk in the same week. AWS disclosed an SSRF flaw in mcp-gateway-registry (CVE-2026-125926), fixed in 1.35.0, that lets a user with server-registration rights point the gateway at internal services. Different bug, same lesson: MCP infrastructure sits next to your most sensitive systems, so it needs the same discipline as production code.
Technical breakdown: pinned vs frozen#
"Pinned" usually means you named a version or tag. "Frozen" means every package, all the way down, is fixed and verified by hash. Here's how the common setups compare.
| Setup | What's fixed | What can still change | Risk for credential-holding servers |
|---|---|---|---|
npx <server>@latest | Nothing | Everything, every start | High |
uvx with a release tag | Top-level package | Transitive dependencies on rebuild | High |
uvx with a commit | Server code | Transitive dependencies on rebuild | Medium to high |
| Hash-locked install, direct launch | Every package | Nothing until you re-lock | Low |
What a frozen install looks like#
# 1. Generate a hash-pinned lock file once, from the author's versions
uv pip compile pyproject.toml --generate-hashes -o requirements.lock
# 2. Install into a dedicated environment, hashes enforced
python -m venv /opt/mcp/billing
/opt/mcp/billing/bin/pip install --require-hashes -r requirements.lock
/opt/mcp/billing/bin/pip install --no-deps git+https://github.com/<owner>/<server>@<commit-sha>
# 3. Point the AI client at the installed binary, not a launcher
"command": "/opt/mcp/billing/bin/<server>"
pip's secure installs guide explains hash-checking mode in detail. The trade-off is real: you stop getting fixes automatically, so someone has to own updates. Corelight also found frozen servers started in about 2 seconds versus 4 to 11 before, which is a nice side effect.
What this means for your business#
If your team has wired Claude, Cursor or another assistant into internal tools, you probably have MCP servers running on laptops right now. Many were installed by copying a README snippet. That's normal, and it's also the problem.
Three practical implications:
Your AI tooling is now part of your attack surface#
Corelight says it plainly: AI coding assistants and the keys they hold are now targets. A server with write access to your billing system deserves the same review as a deploy pipeline.
Least access limits the blast radius#
Even a frozen server can have a vulnerable pinned version. Give each server its own account or API client, read-only where the tool allows, with short-lived tokens. A compromised reporting server shouldn't be able to issue refunds.
Updates need an owner#
Freezing without a re-lock schedule just trades drift for stale packages. Pick a person and a cadence, and check pinned versions against known vulnerabilities.
How to act on it: a checklist#
- Inventory. List every MCP server configured in your team's AI clients, and note which ones hold credentials.
- Search configs for launchers. Flag any
npx,uvx,@latestor tag-only references. - Freeze the risky ones first. Commit pin, hash-locked lock file, dedicated environment, direct launch.
- Turn off startup update checks. Some MCP frameworks check PyPI at launch. Disable it.
- Verify by what's installed. Confirm the package list is identical across restarts and the server still offers the same tools. Corelight warns that quiet network logs alone don't prove a fix.
- Scope credentials. One account per server, least access, short-lived tokens.
- Watch the network. Look for launch-time traffic to
pypi.org,files.pythonhosted.org,registry.npmjs.organd GitHub from hosts that shouldn't be installing anything. - Name an owner to re-lock, review diffs and patch on a schedule.
If you maintain an MCP server, ship a hash-pinned requirements file with each release and make the frozen install your default README example.
How MagicMakers Lab approaches this#
When we build MCP servers for clients, we treat them like production services: locked dependencies, a single install path, per-server credentials scoped to exactly what the agent needs, and decision logging so you can see what the agent touched. It's the same approach we used for Framico, where automation runs 200+ orders a day with zero manual steps, and that only works if the system behaves the same on day 100 as on day one.
Key takeaways#
- A pinned MCP server release can still run different code every few days because transitive dependencies get re-resolved.
- 23 of 35 servers Corelight reviewed recommended installs that pull fresh packages from public registries.
- MCP servers run with your credentials, so a single bad dependency release can expose API keys and admin access.
- Freeze credential-holding servers with commit pins, hash-locked installs and direct launches.
- Scope each server's credentials tightly and name an owner for scheduled updates.
FAQ#
What are the most important MCP server security best practices?#
Start with authentication and least-privilege credentials, then lock down what code actually runs. Pin each server to a commit, install from a hash-pinned lock file into a dedicated environment, and launch it directly instead of through npx or uvx. Give every server its own scoped, short-lived credentials and assign an owner to review and re-lock dependencies on a schedule.
Is it safe to run MCP servers with npx or uvx?#
It's convenient for testing, but risky for servers holding real credentials. These one-step launchers can resolve dependencies from public registries when they rebuild, so the code you run can change without any config change. Corelight saw one server produce 15 distinct dependency sets in five weeks this way. For anything touching production data, use a frozen install.
What does pinning dependencies actually protect against?#
Pinning with hashes means only the exact package files you approved can install. If a maintainer account is hijacked and a malicious version is published, your environment won't pick it up because the hash won't match. It doesn't protect against a flaw already in your pinned version, which is why you still need scheduled updates and vulnerability checks.
How do I know if my MCP servers are pulling new packages?#
Compare the installed package list across several restarts; any change means drift. You can also check network or endpoint logs for launch-time connections to pypi.org, files.pythonhosted.org, registry.npmjs.org or GitHub from machines running AI assistants. Corelight's research used exactly that combination of DNS, TLS and process data.
If your team has plugged AI assistants into billing, CRM or ops tools and nobody's sure what's running underneath, that's a short conversation worth having before it becomes a long incident. We'll look at your setup and tell you what to freeze first. Book a free audit.
Sources#
- The supply-chain risk hiding in your MCP servers (Corelight)
- Hackers Could Exploit MCP Server Supply Chain Weaknesses to Steal API Keys and Administrator Credentials (Cyber Security News)
- AWS MCP Gateway Security Flaw Allowing Access to Internal Networks and Cloud Credentials (Cyber Security News)
- Secure installs (pip documentation)