Third-party MCP server: vet its security before install
Why is a third-party MCP server a supply chain risk?
Because an MCP server is code running at your side or next to your data, and its tool descriptions are read by the model. It therefore combines two risks: that of any software package and that of text influencing the agent. In the OWASP Top 10 for LLM Applications 2025, this falls under LLM03 (Supply Chain). The reference page on the topic is MCP security.
Two public cases each show one facet:
- postmark-mcp (September 2025): an unofficial npm package presenting itself as an e-mail sending server. According to Koi Security researchers, version 1.0.16, published on 17 September 2025, added a hidden copy (BCC) of every e-mail sent to an external address. The fifteen earlier versions were clean, which shows that a clean history guarantees nothing. The package reportedly was downloaded about 1,500 times in a week. Postmark stated that the package was not its own. Accounts differ on the exact number of the trojanized version; keep the principle.
- mcp-remote, CVE-2025-6514 (CVSS 9.6): a vulnerability in this proxy used to connect clients such as Claude Desktop to remote MCP servers. According to JFrog, versions 0.0.5 to 0.1.15 are affected: a malicious or hijacked MCP server can make the client machine run commands, through a forged
authorization_endpointvalue in the OAuth metadata. Version 0.1.16 fixes the flaw.
The first case is a server betraying its user; the second is a vulnerable client facing a hostile server. An evaluation must cover both directions.
Which criteria should you examine before installing?
Five families of criteria are enough for a first decision, with an expected answer for each.
| Criterion | Question to ask | Warning sign |
|---|---|---|
| Author | Who maintains the package, and can that be verified somewhere other than the package itself? | Name close to a known vendor, account with no history, no link to an official repository |
| Permissions | What does the server access: files, network, secrets, accounts? | Write access or a global token for a read-only need |
| Dependencies | How many packages does it pull in, which ones, at which versions? | Many dependencies, unpinned or abandoned |
| Updates | What cadence, what changelog, who publishes? | Maintainer change, release that alters how data is sent |
| Behavior | What does each tool description contain, and what happens on the network? | Hidden instructions in descriptions, unexpected connections |
A fifth question often completes the table: is the server really needed? Every added server widens the surface. If a direct API call, written by you, covers the need, it gives you code you control.
How do you verify the author and provenance?
Match the package name to the official vendor's repository, then check that the vendor itself points to that package. The postmark-mcp case illustrates it: the service vendor had published its server on GitHub, and the npm package of the same name was not its own. A link in the package README proves nothing, since it can point anywhere; verification must start from the vendor's official documentation.
Useful checks:
- Official source: does the service documentation mention this MCP server?
- Repository: does the code published on npm or PyPI match the public repository? Compare the files.
- History: age of the account, number of contributors, recent activity.
- Lookalike names: packages with a neighboring name (typo, suffix) trying to pass for another.
Which permissions should an MCP server have?
The useful minimum and nothing more: a read server does not need a write token. For each server, note the secrets it receives (environment variables, configuration files), the scope of OAuth tokens and the folders it can reach. The least-privilege principle is detailed in the article on API keys and OAuth for an agent.
The postmark-mcp case shows why: a server that sends e-mails has, by nature, access to their content. The permission to send was enough to copy everything that went out. If you cannot reduce what a server sees, isolate it: dedicated account, test mailbox, container with no access to other secrets.
How do you review dependencies and updates?
Pin the exact version, read the changelog before each update and treat every update as a fresh installation. The main trap is the silent update: a latest tag or a version range lets a malicious or faulty change reach you without anyone deciding it.
- Pin the version and, when possible, the package fingerprint (lock file).
- List direct dependencies and their state (maintained or not).
- Watch the package security advisories, like the mcp-remote one cited above: knowing which version you run means knowing whether you are concerned.
- Review the diff between two versions before accepting: the postmark-mcp BCC fit in a single line.
- Plan a fast removal: a server must be disableable within minutes.
How do you test a server's behavior before plugging it in?
Run it first in an isolated environment, without real secrets, and observe what it does. This is the step that catches what reading misses.
- Disposable environment: separate machine or container, test account, no real data.
- List the exposed tools and read every description in full, including fields the interface does not display. A description can contain instructions meant for the model; the test is detailed in the article on MCP tool poisoning.
- Watch the network: which domains does the server connect to during normal use? Any unexpected destination needs an explanation.
- Call each tool with dummy data and verify it only does what it announces.
- Replay after an update: a server's behavior can change after the initial approval.
- Test the agent: can content returned by the server trigger another tool? That question belongs to indirect injection.
Decision: install, install with restrictions (dedicated account, read-only, human approval of actions), or refuse. Keep a written record of the reason, useful for a customer security questionnaire.
How do you keep a register of the servers you approved?
Keep one line per server: name, exact version, author and source checked, permissions granted, date of the last review and the person who approved it. This register answers the question every customer and every incident will eventually raise: which servers were running, with which rights, and who decided. Review it on a fixed schedule, and again whenever a server's maintainer or permissions change.
Which behavior test should you run before plugging a server in?
The one I run first: follow an untrusted value to the place where the server uses it. That test is how I found the flaw in clawdcursor, a desktop-control MCP server (advisory GHSA-9ppf-38v8-h97v, fixed in 1.5.26).
- Trapped input: a test string containing the delimiters of the target interpreter (straight and typographic quotes, double quotes,
;, newline), passed to every tool that accepts free text. - Expected behavior: the string reaches its destination intact (file, field, clipboard) and nothing else happens.
- Verdict: FAIL if a process, a network request or a file appears on top of the expected effect.
```text
$ grep -rnE "replace\(/'/g|powershell|osascript|exec\(|spawn\(" src/
# pattern to look for (simplified form):
const script = "Set-Clipboard -Value '" + text.replace(/'/g, "''") + "'"
`
A line like this one, where text received from the agent is pasted into an interpreter's source code with hand-made escaping, is enough to rate the server "test before installing". The fix the maintainer chose is the right model: the text is passed separately, encoded, and is never interpreted as code again.
What if the server comes from a well-known vendor?
A well-known vendor lowers the author risk without removing the rest. Permissions, dependencies, behavior and the configuration of your own agent still need checking. The flaw can also come from the client, as with mcp-remote, or from what the agent does with returned content.
If you integrate several MCP servers into a production agent, an AI agent penetration test examines the whole under attack conditions: the Agent Red Team Express takes five days, with a scope and an authorization signed before starting.
Does your product ship an AI agent? CleanIssue tests what a stranger can make it do with the Agent Red Team Express (5 days, €1,900), or a custom red team for several agents and MCP servers. First step: a free 30-minute discovery call.
Related articles
Three adjacent analyses to keep exploring the same attack surface.
AI agent security checklist before production
The 20-point checklist to validate before putting an AI agent into production: permissions, inputs, outputs, human approval and observability.
Confused Deputy in AI Agents: OAuth and Delegation
An AI agent that carries out a third party’s wishes with your rights is a confused deputy. OAuth, MCP, delegation and tests to run.
MCP Python SDK OAuth Flaw: Credential Leak
MCP Python SDK OAuth flaw: a malicious server could collect the client secret. Affected versions, the issuer parameter to set, rotation and tests.
Sources
Related services
If this topic maps to a real risk in your stack, these are the most relevant CleanIssue audits.