Back to skill

Security audit

MCP Server Discovery

Security checks for vulnerabilities and agentic risk

Overview

The skill appears purpose-built for MCP server discovery, but its generated configurations can run unpinned third-party servers with sensitive access and little safety guidance.

Review this skill before installing. It does not appear malicious and does not directly execute or save MCP server configs, but any generated config should be treated as a command that may later run third-party software. Pin package versions, verify publishers, limit filesystem paths and credentials, use read-only database accounts where possible, and avoid enabling memory or browser automation servers unless you trust and need them.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
scripts/mcp_discover.py:120
Finding

Generated MCP configurations execute unpinned npm packages without confirmation

Content
View full analysis

Vulnerability Details

File Location: scripts/mcp_discover.py:120-122
Supporting Locations: scripts/mcp_discover.py:28-84, SKILL.md:44-51, references/registry.md:9-48, references/registry.md:72-81, README.md:47-58
Vulnerability Type: Unsafe use of unpinned third-party dependencies
Risk Level: Medium

Vulnerable Code

python
config["mcpServers"][server_name] = {
    "command": "npx",
    "args": ["-y", f"@modelcontextprotocol/server-{server_name}"]
}

The hard-coded registry also recommends the same installation pattern, for example:

python
"filesystem": {
    "name": "filesystem",
    "description": "Secure file system access with configurable permissions",
    "url": "https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem",
    "install": "npx -y @modelcontextprotocol/server-filesystem",
    "category": "filesystem"
},

Technical Analysis

The configuration generator emits commands that use npx -y to retrieve and execute npm packages without a pinned version, integrity hash, lockfile, publisher verification, or interactive confirmation. The -y option automatically accepts installation prompts.

Consequently, the code reviewed during the audit is not necessarily the code executed later. Package resolution occurs when the generated MCP configuration is launched and may select a newer, compromised, transferred, or otherwise unexpected package release. The Skill does not verify that each package exists, is still maintained by the expected publisher, or corresponds to the repository URL shown in its local catalog.

This behavior is especially sensitive because the suggested MCP servers may be granted access to files, GitHub credentials, databases, browser sessions, network resources, or persistent memory. Package retrieval is relevant to the Skill's installation workflow, but automatic execution of mutable versions exceeds the minimum privil ...[truncated 1589 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin every approved MCP package to an explicitly reviewed version, such as @modelcontextprotocol/server-filesystem@X.Y.Z.
  2. Maintain a lockfile or trusted manifest containing expected package names, versions, publishers, source repositories, and integrity hashes.
  3. Verify downloaded package integrity before execution and reject versions absent from the approved manifest.
  4. Avoid npx -y in generated configurations. Separate configuration generation from installation and require explicit user confirmation before retrieving or executing packages.
  5. Validate that each package is published by the expected organization and maps to the repository displayed by the Skill.
  6. Run MCP servers with least privilege, including restricted filesystem paths, narrowly scoped tokens, read-only database accounts where possible, minimal environment variables, and constrained network access.
  7. Warn users that generated server entries execute third-party software and identify the exact package version that will run.
  8. Periodically review pinned versions and update them through a controlled security-review process rather than automatically selecting the newest release.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (23)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The markdown describes generating configuration and includes example servers that provide filesystem access and persistent memory, both of which can affect user data and privacy. There is no warning or disclosure explaining these capabilities or advising users to review and limit configured servers before use.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises and instructs use of a discovery/configuration script for MCP servers, which inherently involves network-capable behavior, but it declares no explicit tool scope or permission boundaries. This increases the chance an agent invokes networked discovery or configuration generation without clear authorization constraints, making unintended external connections or unsafe follow-on use more likely.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger text is broad enough to activate on general discussion of MCP or configuration topics, not just concrete requests to discover or manage servers. Overbroad invocation can cause the agent to enter a workflow that surfaces external integrations or generates sensitive connection configs when the user only wanted conceptual information.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation encourages generating MCP client configurations without warning that those configs may enable access to external systems such as filesystems, databases, APIs, web resources, or memory stores. A user or agent could apply the generated configuration without understanding the trust and access implications, leading to unintended data exposure or privileged external connectivity.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The documentation recommends executing an unpinned npm package via npx, which resolves and runs the latest published version at execution time. This creates a supply-chain risk: if the package is compromised, a malicious version is published, or a breaking release appears, users may execute unintended code directly from the registry.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This entry instructs users to run an unversioned npm package with npx, implicitly trusting the newest package version at runtime. If the upstream package or dependency chain is compromised, users could execute attacker-controlled code, and this server is especially sensitive because it is paired with a GitHub token.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

Using npx without a pinned version means the command may fetch and execute whatever version is current when the user runs it. That exposes consumers to supply-chain compromise and unexpected behavior changes, which is risky for a database-oriented server that may access sensitive data.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

The documentation references an unpinned package executable, so users may run a different codebase over time without notice. If a malicious or vulnerable release is introduced upstream, this can lead to arbitrary code execution in the user's environment.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This command executes an unpinned browser-automation package via npx, creating a supply-chain exposure to newly published upstream code. Because browser automation often interacts with untrusted web content and local resources, unexpected package changes can materially increase risk.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

The unversioned npx command allows execution of the latest available package rather than a known-good build. That introduces preventable supply-chain and reproducibility risks, even if the referenced server is official.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

Referencing an unpinned fetch server package means the actual code executed depends on the current npm registry state at runtime. A compromised release could lead to arbitrary code execution or data exfiltration, especially for a component designed to retrieve remote content.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

This documentation directs users to execute an unversioned memory server package from npm, exposing them to any future upstream release at runtime. For a persistent-memory component, compromise could affect stored data confidentiality and integrity in addition to code execution risk.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/mcp_discover.py (reported line 18)May include surrounding context.

python
MCP_REGISTRIES = {
    "official": "https://raw.githubusercontent.com/modelcontextprotocol/servers/main/README.md",
    "awesome": "https://raw.githubusercontent.com/appcypher/awesome-mcp-servers/main/README.md",
    "community": "https://api.github.com/search/repositories?q=topic:mcp-server+sort:updated"
}

# 已知的高质量 MCP 服务器列表

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The skill hardcodes npx -y @modelcontextprotocol/server-filesystem without a pinned package version, so any later upstream package release will be silently pulled when a user follows the generated install/config instructions. This creates a supply-chain risk where a compromised maintainer account, malicious release, or breaking update could change the executed code without review.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The unpinned npx -y @modelcontextprotocol/server-github reference allows execution of whatever version is current at runtime rather than a reviewed, known-good build. In a discovery/configuration skill, this is especially relevant because the tool is explicitly guiding users toward installing and executing external MCP servers.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

Using npx -y @modelcontextprotocol/server-postgres without a version exposes users to upstream package substitution or malicious updates. Because MCP servers may receive credentials or database access, silently changing code versions increases the chance of privilege misuse or data exposure.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The skill recommends npx -y @modelcontextprotocol/server-sqlite without a version constraint, making users dependent on mutable latest releases. This is a classic supply-chain weakness because the actual code executed can change after the skill is shipped or reviewed.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The npx -y @modelcontextprotocol/server-puppeteer install string is unpinned, so a future compromised or unsafe release could be installed automatically. Browser-automation servers can be high-value from an attacker perspective because they may interact with authenticated web sessions or sensitive web content.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

npx -y @modelcontextprotocol/server-brave-search is referenced without a fixed version, enabling unintended code changes over time through upstream package updates. Since users may trust the tool's curated list, the lack of version pinning increases the likelihood they execute an unreviewed release.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The skill suggests npx -y @modelcontextprotocol/server-fetch with no version pin, which means the runtime artifact is mutable and outside the reviewed source state. This makes the tool susceptible to supply-chain compromise or unexpected behavior changes that could affect fetched content handling.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The npx -y @modelcontextprotocol/server-memory reference is unpinned, exposing users to arbitrary future package changes. For a memory-oriented server that may process persistent context, a malicious update could materially affect confidentiality or integrity of stored data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill documentation is presented in Chinese throughout, with no indication that this is a region-specific skill or that alternative language support is available. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module docstring includes a Chinese description line while the CLI description and help text are in English. This creates a fixed mixed-language experience without any opt-in or language-selection mechanism, which may violate a language/locale policy requiring user choice.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.